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

Keil doesnt stop on softreset/watchdog

Hello, 

Im trying to debug my fw using Keil, its running in debug mode and I have RTT printouts, but once softreset occurs debugger doesnt halt it. Device reboots and starts working again. Any idea how I can make it halt ? Or any other way to understand what triggers softreset. I think its watchdog, but where does the program get stuck before watchdog reset is triggered?

Im using FreeRTOS SD132v 7.2.0 and SDK 17.0.2 on NRF52832 with Level 0 optimization and DEBUG flag in compilation flags.

Parents Reply
  • Hi,

    I am not sure what is going on, but with DEBUG defined you will catch any APP_ERROR_CHECK's that detect an error. It does not mean that any and all errors will be detected by this approach, though. There is no generic way to make the debugger halt on any error as an error could be anything.

    If the thing is that you want to detect if a reset is caused by a watchdog or a soft reset, then you can either disable the watchdog to rule that out, or check the RESETREAS register. If you want to know if a soft reset occurs, then you can set a breakpoint on all calls to NVIC_SystemReset().

Children
Related