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

How to disable the WDT (watchdog timer)?

After enabling and starting the watchdog timer (RR0), how can it be disabled?

This following code does not work:

NRF_WDT->RREN &= ~(1 << WDT_RREN_RR0_Pos);

Neither does:

NRF_WDT->POWER = 0;

Edit: I'm using a Rev G0 chip.

Parents
  • I don't believe this is an errata item. Rather, it appears to be a designed in behavior. If you look at the Reference Manual (2.0) section 11.1.6.8 on reset behaviors, the WDT is preserved on a soft reset. It requires one of the following reset types to be cleared on reset: power, pin, brownout or watchdog.

    It could be more clearly stated in the watchdog section of the document as well, but it appears to be design intent.

  • All I did was add a service of the WDT in the wait for events loop and also when the loop exits so that the WDT has its full amount of time while the system restarts. Just put this line in two spots in your wait_for_events function:

    NRF_WDT->RR[0] = WDT_RR_RR_Reload;
    
Reply Children
No Data
Related