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

Parents Reply
  • yep, here I have the ultra minimal code, which still shows this strange behaviour.

    #include "RTT/SEGGER_RTT.h"
    #include "WatchdogTimer.h"
    int main() {
    SEGGER_RTT_Init();
    SEGGER_RTT_WriteString(0,"startup\n");
    WatchdogTimer WDT(3);
    
      while(1) {
        SEGGER_RTT_WriteString(0,"looping\n");
        Thread::wait(1000);
        while(1);
      }
    
    }

    when used exactly like this the code resets after some time (I noticed its not the WDT timeout, but rather random when it resets...)

    if you remove the while(1); the code will print "looping" all the time without restarting.

    my guess is still that it has something to do with the bitfields file, because thats the only thing I modified. But I dont find this file anywhere... only versions that are different from mine.

Children
Related