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

Assertion failed in softdevice, pc=0x15520

Hi,

I'm trying to debug my application using monitor mode debugging and after setting a breakpoint while the code is running I usually have an assertion that fails in the softdevice and is handled by the app_error_fault_handler.

the handler is called with the following arguments:

* id = 1

* program counter =  0x15520

* info = 0

Could you give me some pointers on which assertion is failing in the softdevice?

Thanks.

Parents
  • Hi,

    I cannot pinpoint the exact assert reason without knowing what SoftDevice (including version number) you got this on, but often it is the same kind of assert reason as when not using MMD.

    Monitor Mode Debugging works by entering a loop at a given interrupt priority, so that higher priority interrupts (lower priority number) will continue running while lower priority interrupts (higher or equal priority number) are halted. If the priority for the debug monitor (the loop) is too high, it may still interfere with SoftDevice processing, to a degree where the SoftDevice asserts.

    The priority can be set with a call at the top of main() to NVIC_SetPriority(DebugMonitor_IRQn, 6UL); for priority level 6, which is the highest priority not used by the SoftDevice on the nRF52 series. It allows for debugging code in main (thread) context, as well as application priority levels 7 and 6 (APP_IRQ_PRIORITY_LOW, where event handling happens), but not application priorities 3 and 2 which are higher than SVC / SD non-time-critical processing.

    Regards,
    Terje

Reply
  • Hi,

    I cannot pinpoint the exact assert reason without knowing what SoftDevice (including version number) you got this on, but often it is the same kind of assert reason as when not using MMD.

    Monitor Mode Debugging works by entering a loop at a given interrupt priority, so that higher priority interrupts (lower priority number) will continue running while lower priority interrupts (higher or equal priority number) are halted. If the priority for the debug monitor (the loop) is too high, it may still interfere with SoftDevice processing, to a degree where the SoftDevice asserts.

    The priority can be set with a call at the top of main() to NVIC_SetPriority(DebugMonitor_IRQn, 6UL); for priority level 6, which is the highest priority not used by the SoftDevice on the nRF52 series. It allows for debugging code in main (thread) context, as well as application priority levels 7 and 6 (APP_IRQ_PRIORITY_LOW, where event handling happens), but not application priorities 3 and 2 which are higher than SVC / SD non-time-critical processing.

    Regards,
    Terje

Children
Related