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

Debugging while BT is working

Hi

I know perfectly it is not possible to debug while the softdevice is enable and the Bluetooth is working. When I try to set up a breakpoint under these conditions, the CPU restarts after resuming execution: I get a vetor catch exception.

My question is: Why happens this? Is this a protection to avoid inverse engineering of softdevice code? Or it is due to any other mechanism?

I think it is interesting to know why this happens because in my system, I'm using FreeRTOS with the SD, and sometimes, I get a vector catch exception: I suspect the BLE task is introducing delays in the SD execution and it should need a higher priority. Maybe this could trigger a vector catch exception in a similar way that pausing execution with the debugger.

Thanks in advance

Elena

Parents
  • Thanks for your reply. I understand a bit better now. A last question: Could happen that if the task that calls the function intern_softdevice_events_execute() remains suspended for more time that the expected time by the SD, could trigger this execption? As I understand, this task should be the highest priority task, instead the lowest one as is provided by the FreeRTOS example. By the way, I'm using a nrf51, but I'll switch to a nrf52 during the next month. Thanks again!!!

Reply
  • Thanks for your reply. I understand a bit better now. A last question: Could happen that if the task that calls the function intern_softdevice_events_execute() remains suspended for more time that the expected time by the SD, could trigger this execption? As I understand, this task should be the highest priority task, instead the lowest one as is provided by the FreeRTOS example. By the way, I'm using a nrf51, but I'll switch to a nrf52 during the next month. Thanks again!!!

Children
No Data
Related