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

Segger Embedded Studio - Execute Function Timed Out, Can't Start / Pause / Restart execution from IDE

Hello:

I am able to compile, load/flash successfully for my BLE + FreeRTOS application to my nRF52840 DK board. However, I am not able to start or pause execution of the application using Segger. Starting execution ('Go' in Debug Menu) doesn't seem to start / restart the application on the nRF52840. In addition, if I pause execution, the Segger Debugger interface will show that execution was paused within the application (i.e., the debugger stops at an actual function in the application) but then my debugger session ends (within about 1 second of me pausing the debugger) and I am shown the following error:

This appears within one second of me pausing the debugger.

I have also experienced this problem with a second PCA10056 { 1.0.0, 2018.19) board that I have. I have been manually starting newly flashed application code by pressing the RESET button on the PCA10056 DK. Could I have messed up a debugging jumper or something?

My setup: Segger Embedded Studio V4.16 (64-bit), PCA10056 { 1.0.0, 2018.19), and I updated my J-Link to V6.46G (though I haven't confirmed if that is what my Segger installation is using). I am using Soft Device S140 nRF52 v6.1.0 and nRF5 SDK 15.2

  • Are you running BLE when you are pausing the debugger? If so, you will most likely receive a softdevice assert when you run the debugger again because of timing issues. I can ask a Segger expert about this if you want me to, but I just want to confirm why you are starting/stopping debugging of a BLE example.

  • I understand pausing a BLE example when the soft device's BLE is running will crash the example once the sample is resumed from pause. My issue is that I never get a chance to really review where I paused a function (and breakpoints are also not triggered as well). Whenever I pause the example, after a second the image in the original post pops up. Pause does not stay paused. Instead, the debugger crashes before I ever resume the example.

  • I found that an SPI peripheral component initialization code involving a while loop had been causing the application to halt on the same line every time. The initialization was being done outside of the FreeRTOS tasks I was using (i.e., I was initializing this SPI peripheral in the main() before vTaskStartScheduler() ). Once I put the SPI peripheral initialization code inside of that peripheral's corresponding FreeRTOS task, everything worked perfectly.

Related