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

NRF52 Watchdog not resetting

Hi,

Currently I am trying to implement Watchdog functionality into my Project.

I have the followowing problem:

I use the Nordic WatchdogTimer.h and instance the class with 1s in the constructor.

now, if I just do a 'while(1);' the code succesfuly resets after about 1 Second.

But If I dont use a while loop, it does not reset, even if I dont use the WDT::Kick() function..?!

I think I altered some of the nrf52_bitfields.h parameters, but I dont remember which ones, so maybe thats the cause, but what could it be?

Its really strange that it resets on a while loop, but not without it and without WDT::Kick()

Thanks,

jonas

  • jonas.woerner said:
    the chip does not sleep, nor am i debugging it(or does connecting over Segger RTT count as debugging?), but it simply wont reset if I set the config register to 0x00. I do start the chip after configuring it.

     That's odd. So you let CONFGIG be 0x00 (which is equivalent with not writing to it), and starts the watchdog, but do not feed it, and then it does not reset? Did you also remember to set the CRV register to something sensible (the default value is all 1's, so it will take a long time to timeout)?

    jonas.woerner said:
    regarding the power cycle, does that mean I can reconfigure the WDT every program start or every power cycle?

     A power on reset will reset the watchdog, but soft reset would not. You can see mor details under Reset behavior.

  • yep, its very odd. Also If I set the CONFIG to 0x00000009 I am not able to prevent the reset, even though I set the reload value to the RR0 register.

    I will try a different chip soon, maybe its defective.

Related