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?
Thank you Sébastien, Unfortunately it still does not work. I tried it with this: NVIC_SetPriority(WDT_IRQn, APP_IRQ_PRIORITY_LOW); Regards, Gil
An update: It now resets. I'm going into sleep mode, so I had to change WDT_CONFIG_SLEEP_Pause to WDT_CONFIG_SLEEP_Run.
But it still does not go to the WDT_IRQHandler() ISR. So I'm guessing the problem is in the INTENSET and NVIC instructions.
An update: It now resets. I'm going into sleep mode, so I had to change WDT_CONFIG_SLEEP_Pause to WDT_CONFIG_SLEEP_Run.
But it still does not go to the WDT_IRQHandler() ISR. So I'm guessing the problem is in the INTENSET and NVIC instructions.
Another update: It is going to the WDT_IRQHandler() ISR as intended. I couldn't tell earlier because it's only there for 2 clock cycles (of the 32 kHz clock - 60 us) before it finally resets. So, it works!!!
Being new at this... We're attempting to use the WDT w/ nrf_wait_for_app_event to pause execution of loop.
Is there a better mechanism to let the CPU/PPI power relax & time the loop? What is it? Examples?
Thank you!