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

Random Hard Fault during radio interrupt

I have just started developing my first bluetooth application and came across an hardfault during softdevice handles the Radio Interrupt. Since I'm fairly new to bluetooth and nordic chips also, I'm pretty sure I'm doing something wrong. The hardfault occurs during processing the radio interrupt somewhere in the softdevice code when it executes an SVC/SWI(0xFF). Since SVC has lower/equal priority to radio interrupt and can't be executed, an HardFault happens. The problem occurs not immediately, but after a random number of seconds.

I have now idea what to do about it, since I have not found any information about the softdevice internals. I'm using Softdevicee S132 V5.1.0 on an nRF52810 (Laird BL651)

Here is a screenshot from my debugger:

/resized-image/__size/800x600/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-5364b933cbe7470b80d9ef33d23f5a9d/hard_2D00_fault.png

The source code of my application is here

https://gitlab.com/amesser-group/electronic-devices/ble-ai4do8-controller/tree/master/firmware

The source of the bluetooth-"driver":

https://gitlab.com/amesser-group/electronic-devices/ble-ai4do8-controller/blob/master/firmware/ble-plc/src/bluetooth.cpp

Any help is kindly appreciate, I'm somehow lost.

Parents Reply
  • Hi,

    amesser said:
    When a breakpoint hits in the debugger and i continue

    It is not possible to step-debug the application when the softdevice is running. The debugger will halt the CPU, preventing the softdevice from handling timing critical BLE events. This will cause the softdevice to assert, and put you in the error handler. 

    (PS: You should set this to 500ppm (NRF_CLOCK_LF_ACCURACY_500_PPM) when using the LF RC)

Children
  • Thank you very much! I should have read the manuals better. Thanks for the hint, i'll change that then.

    I think this can closed then. I'm still struggling with the UART, the device is found by my notebook, but i can't discover services and connect. Also I don't get any SD_IRQ on nrf side. But this is another issue i have to sort out a bit more before asking questions.

Related