How can I use the watchdog?


I would like to use the watchdog to reset the system if my application gets hung, but I don’t understand how to do it.

From the NET+OS API Reference, I understand that I have to use the watchdogServicePeriodically() function to start the watchdog timer, but I don’t want the kernel to service the watchdog, I want to do it from the application, so that if the application does not service it there is a system reset, even if the kernel is still working. Is it possible to do this with the NET+OS watchdog driver?

Best regards,

I think I found the answer. Although in the API Reference help says about the watchdogServiceOnce() function: “The watchdog timer mechanism must already be set up via a call to watchdogServicePeriodically().”, looking at the code I can see this is not true and watchdog is initialized the first time the watchdogServiceOnce() function is called. So, that is the only function I need to call.