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

about setting bread point using IAR after running ble softdevice

Dear all,

I have tried using a setting a break point in main() of my program. Without running the softdevice, it is fine to pause in the break point and continue to run my program. However, after I init the softdevice and pause at a break point. The program cannot continue to run as before, but reset (back to initialization). I wonder is this normal and what is the reason for that. Please comment.

Jones

  • When you hit a breakpoint there's only the CPU that is being halted while the timers are kept running. This causes the real time requirements of the softdevice stack to be exceeded once execution is resumed afterwards. An option is to set the primask register to stop stack interrupts from being serviced as explained in this thread, but note the mentioned limitation with this approach.

    Note that errors in the softdevice API can commonly be caught by setting a breakpoint in the assert handler located in app_error.c

Related