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?
The watchdog timer doesnt work on my nrf51822! I set the timer and started as in the example just like that but thje system doesnt reset or do a interrupt (for ISR i enable the interrupt).
I also use the RTC for a simple timer in my system and use as source the RC.
The watchdog timer doesnt work on my nrf51822! I set the timer and started as in the example just like that but thje system doesnt reset or do a interrupt (for ISR i enable the interrupt).
I also use the RTC for a simple timer in my system and use as source the RC.
This would probably have been better as a separate question. :-)
A quick guess is however that you haven't done a pin reset after enabling the watchdog. The watchdog doesn't run as long as the debugger is enabled, and the debug interface stays enabled till a power-cycle or a pin-reset (which can be done with for example nrfjprog -p).
Sorry but this doesnt work, too. I use this steps:
lfclk_config(); CRV = (32768) - 1;
NRF_WDT->RREN = (WDT_RREN_RR0_Enabled INTENSET = 1;
NVIC_EnableIRQ(WDT_IRQn);
NVIC_SetPriority(WDT_IRQn,0);
in the ISR I pull down the enable pin from my 3V LDO to power off the uC.
Ah now it works, the problem was: At the beginning I set the 3V_enable_switch to on. After the WDT reset+pull down the 3V_enable_switch the uC reset very fast and have enough power to reach the row with the 3V_enable_switch command.