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

When I enter break points inside ble_evt_handler(), it always ends up at NRF_BREAKPOINT_COND

I'm using SDK version 15.0.0_a53641a on nRF52840 with softdevice s140_nrf52_6.1.0_softdevice.hex.

When I enter break points inside ble_evt_handler, it always ends up at NRF_BREAKPOINT_COND; // On assert, the system can only recover with a reset.

In the past when running softdevice s132_nrf52_5.0.0_softdevice.hex on the nRF52832 I never had an issue placing break points inside ble_evt_handler.

Any suggestions as to what is causing this?

Parents
  • Hi,

    When you set breakpoints in the ble_evt_handler, you will halt the CPU when you hit the breakpoint. The SoftDevice will not be able to transmit any BLE packets in this case, and when you continue execution again/resume the CPU, the SoftDevice detects it was not able to transmit the necessary BLE packets in time, and the SoftDevice will then assert, and you will enter the app_error_fault_handler() function.

    Note for Segger Embedded Studio: When hitting the NRF_BREAKPOINT_COND in the error-handler, you can step into app_error_save_and_stop() (assuming you are you using the SES Debug project configuration)  by clicking on the “Step into” button in the disassembly window.

Reply
  • Hi,

    When you set breakpoints in the ble_evt_handler, you will halt the CPU when you hit the breakpoint. The SoftDevice will not be able to transmit any BLE packets in this case, and when you continue execution again/resume the CPU, the SoftDevice detects it was not able to transmit the necessary BLE packets in time, and the SoftDevice will then assert, and you will enter the app_error_fault_handler() function.

    Note for Segger Embedded Studio: When hitting the NRF_BREAKPOINT_COND in the error-handler, you can step into app_error_save_and_stop() (assuming you are you using the SES Debug project configuration)  by clicking on the “Step into” button in the disassembly window.

Children
Related