This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Another NRF51822 Watchdog question.

Hello,

I have been attempting to get the watchdog timer working in my project without any success. I have read through all of the watch dog related threads that I could find in the forums. I made sure to pin reset and power cycle the board after quitting the debugger. I made sure that I am not configuring the WDT to run while halted etc.

I have a fairly simple function to configure and start the WDT, and I have commented out the line of code in my main loop that reloads the WDT but it never resets.

I am running the 5.2.0 version of the SDS on silicon revision QFAACA. I'll put my WDT configuration function below. Any thoughts on what I am doing wrong will be appreciated.

Regards, John DeWitt

void watchDogInit(void) { NRF_WDT->CONFIG = (WDT_CONFIG_SLEEP_Run << WDT_CONFIG_SLEEP_Pos) | (WDT_CONFIG_HALT_Pause << WDT_CONFIG_HALT_Pos);

NRF_WDT->CRV = 32768; 	 
NRF_WDT->RREN |= WDT_RREN_RR0_Msk;									

NRF_WDT->TASKS_START = 1; // Watchdog start

}

Parents Reply
  • Thanks, the comment was helpful as I did not realize that merely flashing would set the debug mode. I can infer that the watchdog is working using a sniffer. My application advertises every 20mS for the first 30 seconds after power up and then enters a mode where it advertises every ~600mS in 5 second bursts with periods of sleep in between. Power cycling the device after programming shows the device never enters the slow advertising mode with the watchdog reload commented out.

Children
No Data
Related