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

Force WDT reset

Hi,

I am using NRF51822 and SDK11 with S130. I have enabled WDT with 2000 as reload value as I'm using 1 second timer. But I want to immediately reset when a certain condition is met. I tried to change CRV register and then reload WDT, but it doesn't work. Is there any way?

Thanks in advance :)

Parents
  • There is no way to force WDT reset and you cannot change the CRV register after WDT is started as said in the Reference Manual:

    The watchdog must be configured before it is started. After it is started, the watchdog’s configuration registers, which comprises registers CRV, RREN, and CONFIG, will be blocked for further configuration.

    You can reset the device through a soft reset (NVIC_SystemReset()) instead. Be aware that this will not reset the WDT. You can see which registers are reset under part 12.1.19 "Reset behavior" in the Reference Manual.

Reply
  • There is no way to force WDT reset and you cannot change the CRV register after WDT is started as said in the Reference Manual:

    The watchdog must be configured before it is started. After it is started, the watchdog’s configuration registers, which comprises registers CRV, RREN, and CONFIG, will be blocked for further configuration.

    You can reset the device through a soft reset (NVIC_SystemReset()) instead. Be aware that this will not reset the WDT. You can see which registers are reset under part 12.1.19 "Reset behavior" in the Reference Manual.

Children
Related