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

How to catch the source of a Reset ?

Hi all,

I have a functional FW, which is running properly 99 % of the time. 

But sometimes I have some RESET with RESETREAS register set to SREQ, but I'm not able to find the source of this reset !

I can reproduce similar case under debugger, with a breakpoint set to Reset Exception, but it's too late, I don't have the stack causing the issue : my stack is on the SoftDevice section (0x00008E4) and when I step on it, I end up into the "reset_handler" of my Bootloader.

So any hint to debug this case ?

I read that SREQ case is caused by (and only by ?) sd_nvic_SystemReset() or NVIC_SystemReset() calls. But I put breakpoint on them and never hit them...

Any help or link is welcome.

Thanks !

Parents
  • Hi Thierry, 

    you are correct that the SREQ bit is only set when a SoftReset has been performed, i.e. sd_nvic_SystemReset() or NVIC_SystemReset(). 

    I assume that you're debugging the application(not the BL) when you reproduce the issue?  Have you disabled optimization to ensure that you do not remove any debug information. Are you checking if you're ending up in the  app_error_fault_handler in app_error_fault_handler?

    Lastly, which SDK and SoftDevice versions are you using?

    Best regards

    Bjørn

Reply
  • Hi Thierry, 

    you are correct that the SREQ bit is only set when a SoftReset has been performed, i.e. sd_nvic_SystemReset() or NVIC_SystemReset(). 

    I assume that you're debugging the application(not the BL) when you reproduce the issue?  Have you disabled optimization to ensure that you do not remove any debug information. Are you checking if you're ending up in the  app_error_fault_handler in app_error_fault_handler?

    Lastly, which SDK and SoftDevice versions are you using?

    Best regards

    Bjørn

Children
Related