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

SOFTDEVICE: ASSERTION FAILED

Hello,

I am working to implement the BLE stack for a HID keyboard, borrowing/based off the supplied example "ble_peripheral/ble_app_hids_keyboard".

Stack initialization and other variable initialization appear to complete successfully, however shortly after branching away from the initializing code, I am seeing an assert come from the softdevice core (SOFTDEVICE: ASSERTION FAILED, pc=0x0000C578). I am using S112.

I am sure this is due to my misuse/mis-configuration of the system, however I'm not sure where to go with the only information being the program counter pointing somewhere into softdevice.

A few more potentially relevant details: I am using a proprietary RTOS in the application code, which does utilize SV calls, however I don't think any of the swi numbers are conflicting (all less than 0x0F), as I verified the 'forwarded' vector table being invoked properly. The assert also happens well before the OS has started the first task (it's during task allocation when the assert happens). I am using a custom hardware platform, with the NRF52832-QFAA. Softdevice is configured to use the internal RC oscillator (16+2 recommended steering settings).

Any pointers in the right direction is much appreciated, thank you!

[Edit]

I am working in IAR 8.40, debugging via J-Link. The behavior, succinctly, is as follows:

1. Boot up OK

2. Initialize BLE stack and dependencies OK

3. Start application RTOS OK

4. Various tasks and systems running OK

5. Enable advertising -- returns OK

6. Various tasks continue to run OK

7. Suddenly get softdevice assert, program counter is always 0x000127B8 now PROBLEM

Parents Reply
  • The device does a lot more than act as a keyboard. This is only one piece of it's functionality-- removing the RTOS is not an option unfortunately. I also cannot replace the RTOS with the features provided via softdevice. In short, I have a large back end that is heavily integrated with this RTOS that I am trying to port to the nordic chip, while leveraging softdevice's BLE support. 

    I think I may have a root cause though-- I only see the assert if I have a breakpoint. I wasn't aware of the major limitation softdevice has, namely that it doesn't play nicely with an attached debugger (problem discussed here https://devzone.nordicsemi.com/f/nordic-q-a/30981/softdevice/122445#122445

    I haven't hit any more asserts after removing breakpoints/other debug hooks. 

Children
Related