I´m new to freeRTOS. I´m working on a project, where i try to implement a Watchdog. I use the Arduino IDE and i´m trying to find a solution, how to implement a watchdog that checks if my tasks arent stuck. Can somebody help me out with a code example?
Deleted - replied to the wrong post.
First, you need to write some code to turn on the watchdog, and periodically kick it. You can try a “software only” watchdog, but those are prone to failure if something really goes wrong.
Then you need to define a method to see if tasks are stuck, and what that actually means FOR YOUR SYSTEM. This is extremely system dependent.
Typically i have tasks periodically post somehow to a watchdog task that “their good”, and the watchdog task monitors these and with knowledge of what needs to be running, keeps the watchdog refreshed.