Stopping the program at a breakpoint causes a software reset.

Hi
I'm using MDK-ARM to create an application with softdevice.
I set breakpoints to see the values of variables in the program.
However, when I stop the program at a breakpoint, a software reset occurs.
This seems to issue a reset on softdevice.
Isn't there a way to prevent this reset?

Parents
  • Hi,

    When you step or use breakpoints, the CPU is paused, but other peripherals continue to run. The SoftDevice use an RTC and TIMER to keep track of time, and if it loose timing, it will assert. Therefor, when using a SoftDevice, you will typically get an assert whenever you continue from a breakpoint or step in the code. To work around this, the simplest way to debug while using a SoftDevice is to set a breakpoint wherever you want, but never continue from a break-point. Instead, reset the device. To mimic stepping, you can then move the breakpoint before resetting.

Reply
  • Hi,

    When you step or use breakpoints, the CPU is paused, but other peripherals continue to run. The SoftDevice use an RTC and TIMER to keep track of time, and if it loose timing, it will assert. Therefor, when using a SoftDevice, you will typically get an assert whenever you continue from a breakpoint or step in the code. To work around this, the simplest way to debug while using a SoftDevice is to set a breakpoint wherever you want, but never continue from a break-point. Instead, reset the device. To mimic stepping, you can then move the breakpoint before resetting.

Children
Related