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

How to identify reset reason

hello,

I'm using S132/nRF52/SDK11.

I start a firmware development based on Nordic UART example, I kept the BLE NUS part (I loop back the data received over BLE) and removed the usage of the UART peripheral. I observe a strange behaviour.

I have cleaned the code, made some modules so that the main file is minimalistic (I mainly moved the example code into C modules).

The main() function does nothing else but initializing the BLE NUS service and start advertising. The endless for() loop is empty. A breakpoint which I set before the endless loop shows me that it is periodically reached, this means that the execution is periodically restarted.

Could someone inform me how I can identify the source of this restart? For sure I made something wrong when I moved/cleaned the example project but I am unable to fin what.

Without breakpoint and using RTT_WriteString() function, it appears that there is no restart => the use of the debugger make the execution restart.

Thanks in advance for your help.

Parents
  • Excellent, thanks a lot!

    It looks like that the reset is caused by a Softdevice assertion (softdevice_fault_handler is called with id=0x01 and then lead in a NVIC_SystemReset() ).

    The Softdevice assertion only happens when using breakpoints. I have read this that tells me that the breakpoints are a potential source.

    Does it mean that the usage or breakpoints is useless as soon as the BLE is started (e.g.: only advertising)?

    It there a way to look at the reason for a Softdevice assertion?

Reply
  • Excellent, thanks a lot!

    It looks like that the reset is caused by a Softdevice assertion (softdevice_fault_handler is called with id=0x01 and then lead in a NVIC_SystemReset() ).

    The Softdevice assertion only happens when using breakpoints. I have read this that tells me that the breakpoints are a potential source.

    Does it mean that the usage or breakpoints is useless as soon as the BLE is started (e.g.: only advertising)?

    It there a way to look at the reason for a Softdevice assertion?

Children
No Data
Related