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

Watchdog reset with no WDT IRQ Handling

Hi,

We have implemented a custom Watchdog Timeout handler, where we do the stack-dump. It has worked fine and we were able to analyze and fix the Watchdog resets. But now for one of the resets, the stack dump is missing. The RESETREAS register always points to WDT as the reason. There is no stack-dump and also GDB doesn't hit the NRF_BREAKPOINT_COND placed at the very beginning(before the stackdump) of Watchdog Timeout handler. (but it hits the breakpoint in main) The guess here is, watchdog timeout might be inside some high priority interrupt or at the same time another high priority interrupt is set. How can I debug this issue? Can I log any registers in the beginning to know what other interrupts were present? 

PS:

1. This issue happened when we changed some code of a module that uses TWI interface.

2. These are my WDT settings 

NRFX_WDT_CONFIG_IRQ_PRIORITY 0

NRFX_WDT_CONFIG_NO_IRQ 0

Parents
  • Hi,

    Maybe you are getting a hardfault, or have you implemented your own hardfault handler as well? The weakly declared hardfault handler included in the startup file will just enter an infinite loop and thus block the WDT IRQ until the WD reset gets effectuated.

    Another possible explanation could be that the NRFX_WDT_CONFIG_IRQ_PRIORITY configuration is not being applied. Please check if WDT_CONFIG_IRQ_PRIORITY is defined in your sdk_config header. It will override the NRFX_WDT_CONFIG_IRQ_PRIORITY value if it is.


Reply
  • Hi,

    Maybe you are getting a hardfault, or have you implemented your own hardfault handler as well? The weakly declared hardfault handler included in the startup file will just enter an infinite loop and thus block the WDT IRQ until the WD reset gets effectuated.

    Another possible explanation could be that the NRFX_WDT_CONFIG_IRQ_PRIORITY configuration is not being applied. Please check if WDT_CONFIG_IRQ_PRIORITY is defined in your sdk_config header. It will override the NRFX_WDT_CONFIG_IRQ_PRIORITY value if it is.


Children
Related