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

RESETREAS issue after WD Reset

Hi, I am using nRF5_SDK_15.0.0_a53641a.

I'm using code below to start WD and I'm not feeding WD.

NRF_WDT->CONFIG = (WDT_CONFIG_HALT_Pause << WDT_CONFIG_HALT_Pos) | ( WDT_CONFIG_SLEEP_Run << WDT_CONFIG_SLEEP_Pos);
NRF_WDT->CRV = 10*32768;             // 10sec timout
NRF_WDT->RREN |= WDT_RREN_RR0_Msk;  // Enable reload register 0
NRF_WDT->TASKS_START = 1;           // Start the Watchdog timer

After WD reset, I'm looking at RESETREAS register and DOG bit is not high, only PINRESET is high. 

What am I missing?

I found that in in system_nrf52840.c there is errata136 that resets all bits but PINRESET, when I remove that code it works fine. Why does this errata exist and if I need it?

Parents
  • Hi,

    After WD reset, I'm looking at RESETREAS register and DOG bit is not high, only PINRESET is high.  What am I missing?

    After PINRESET bit is set, you need to clear the RESETREAS register yourself after you have read the register and taken appropriate actions based on the value. If you don't clear the register, the DOG bit will always be masked out after a PINRESET.

    Snippet:

        do_something_based_on_resetreas_value();
        // Action taken. Now clear the flag
        NRF_POWER->RESETREAS = 0xFFFFFFFF;

Reply
  • Hi,

    After WD reset, I'm looking at RESETREAS register and DOG bit is not high, only PINRESET is high.  What am I missing?

    After PINRESET bit is set, you need to clear the RESETREAS register yourself after you have read the register and taken appropriate actions based on the value. If you don't clear the register, the DOG bit will always be masked out after a PINRESET.

    Snippet:

        do_something_based_on_resetreas_value();
        // Action taken. Now clear the flag
        NRF_POWER->RESETREAS = 0xFFFFFFFF;

Children
No Data
Related