This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Watchdog behavior while debugging

Recently while debugging my application i noticed strange behavior: i set watchdog timer to restart application if my peripheral is not receiving any data for some time.

In normal way - it seems to work, but when debugger session is open it is not restarting my app.

Does watchdog work while debugging?

void wdt_init(void){
_timer = 0;

_connected = false;
_reload_enabled = true;

NRF_WDT->POWER = 1;
NRF_WDT->CONFIG = (WDT_CONFIG_HALT_Pause << WDT_CONFIG_HALT_Pos) | ( WDT_CONFIG_SLEEP_Run << WDT_CONFIG_SLEEP_Pos);
// Configure Watchdog.
//  a) Pause watchdog while the CPU is halted by the debugger.
//  b) Keep the watchdog running while the CPU is sleeping.

NRF_WDT->CRV = 10UL * 32768UL;      //ca 10 sek. timout
NRF_WDT->RREN |= WDT_RREN_RR0_Msk;  //Enable reload register 0
NRF_WDT->TASKS_START = 1;           //Start the Watchdog timer}

I am using QFAA C0 chip

Parents Reply Children
Related