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

RESETREAS DOG without WDT Handler Firing

SDK 15.2, nrf52840 SD 6.1


I'm having an issue where a reset with RESETREAS DOG 0x02 is not coming through the WDT handler before executing reset.
I can force this reset by jumping into a while(1) spin loop, but the WDT expired handler does not fire before the jump to 0 reset.
The code resets, and the reset reason is watchdog, however my breakpoint and routine in wdt_event_handler are not executed before the reset. (I make sure to clear the reason after each reboot)
I also made sure APP_ERROR_CHECK is not executed either.

What is the path of this execution? Is this a valid watchdog reset, or am I looking in the wrong place?
Does the soft device not being able to run in the while loop cause the reset? The breakpoint that happens at the reset instruction does not give any context. 


Any help/insight would be appreciated,
Jeff

Parents
  • Hi Jeff,

    Can you try the WDT example in \nRF5_SDK_15.2.0_9412b96\examples\peripheral\wdt to see if you get the same result? I did not manage to reproduce this behavior here. I placed a breakpoint in the wdt_event_handler() and observed that the CPU was halted before the WD had time to reset. 

  • Vidar, 

    I appreciate you running tests!
    The WDT example works as you describes, but this result varies from my real application experience.
    Do you know of any interaction with the soft device enabled where a while(1) loop will trigger a WDT reset reason without coming through the WDT handler?

    It's strange to me, but maybe I'm missing something at a low level.
    --Jeff

    Edit: Ran a few tests, my breakpoint and log/flush in the WDT_handler weren't being spit out in the RTT before reset. I am running a few more tests on this.

Reply
  • Vidar, 

    I appreciate you running tests!
    The WDT example works as you describes, but this result varies from my real application experience.
    Do you know of any interaction with the soft device enabled where a while(1) loop will trigger a WDT reset reason without coming through the WDT handler?

    It's strange to me, but maybe I'm missing something at a low level.
    --Jeff

    Edit: Ran a few tests, my breakpoint and log/flush in the WDT_handler weren't being spit out in the RTT before reset. I am running a few more tests on this.

Children
Related