Is there an app-note, tutorial, or example of how to use the watchdog timer to reset the MCU if the application hangs?
Is there an app-note, tutorial, or example of how to use the watchdog timer to reset the MCU if the application hangs?
Please take a look at the main-file that should show the basics.
The attached file does show some of the basics but not much. I took a look at nrf51.h where the data structures are defined and the comments are pretty terse there too. I want to make sure I use this timer correctly in the context of a device that sleeps, wakes on one of a number of interrupt signals, does some processing, and goes back to sleep. Should the processing hang, I'd like the watchdog to interrupt the MCU, for the watchdog handler to log a message and a stack trace to flash, and then do a reset. I would expect that everyone would want to do this for production code and I'm surprised I couldn't find an example or at least more documentation.
For example, what is the name of the watchdog interrupt handler and what utilities exist to log a stack trace?
The attached file does show some of the basics but not much. I took a look at nrf51.h where the data structures are defined and the comments are pretty terse there too. I want to make sure I use this timer correctly in the context of a device that sleeps, wakes on one of a number of interrupt signals, does some processing, and goes back to sleep. Should the processing hang, I'd like the watchdog to interrupt the MCU, for the watchdog handler to log a message and a stack trace to flash, and then do a reset. I would expect that everyone would want to do this for production code and I'm surprised I couldn't find an example or at least more documentation.
For example, what is the name of the watchdog interrupt handler and what utilities exist to log a stack trace?