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

Device not starting after power off reset, but suddenly starts if i start debug session

In our setup several devices are suddenly not working anymore, power off and power on is not working. However, if I connect the debugger it suddenly starts working.

So the flash image is not damaged, but some kind of state is destroyed, which seems be only restored if I connect the debugger.

Since the debugger itself is affecting the state, it is impossible for me to debug this problem. What can be the cause of this problem.

Parents
  • Hello,

    Do you use UART or UART logging in your application? I suspect that you receive an event: APP_UART_COMMUNICATION_ERROR.

    Search for this in your project, and locate and comment out the line:

    APP_ERROR_HANDLER(p_event->data.error_communication);

    inside this event. Does that change the behavior of your device when you don't have the debugger attached?

  • I am not using the UART, i am using the RTT debugger for the console logging. But the problem was that a hard reset(power off on) was not working, Only if I connected the debugger and started a debug session it suddenly started working again, as if a hidden bit inside the cpu somehow got in a illegal state, which somehow got restored after it was connected to the debugger.

Reply
  • I am not using the UART, i am using the RTT debugger for the console logging. But the problem was that a hard reset(power off on) was not working, Only if I connected the debugger and started a debug session it suddenly started working again, as if a hidden bit inside the cpu somehow got in a illegal state, which somehow got restored after it was connected to the debugger.

Children
No Data
Related