Hi,
I'm usind SoftDevice S110 version 7.1.0
Since I implemented a Radio Activation Hook, my software crashes when a connection is being established. I get the following information in the error handler:
- Error code: 0xDEADBEEF
- File: src\ll_lm.s0.c
- Line: 1340
The radio activation SWI is called 800µs before radio activates. It is running on NRF_APP_PRIORITY_LOW and it evaluates a GPIO ports and updates the advertising data with sd_ble_gap_adv_data_set(). [I am using manufacturer specific data in the advertising data and have to calculate the current values right before each advertising event.]
The error occurs when a Central is trying to connect immediately to the Peripheral after receiving the first advertising signal. When the Central tries connecting some seconds later (after the Peripheral has been started and advertising has been wunning for a while), the error does not seem to occur.
My initialization sequence is:
- List item
- Initialize SoftDevice
- Initialize Bluetooth (GAP, Service etc.)
- Start advertising
- Initialize Radio Activation Hook
When I change the initialization sequence and initialize the Radio Activation Hook before calling sd_ble_gap_adv_start(), everything seems to work fine. This is not an option for out final software, though, because we need to enable the Radio Activation Hook only under certain conditions (to save energy).
All of this seems to me like a bug in the SoftDevice. Can anyone confirm this? How can I activate/deactivate the Radio Activation Hook in a save way while advertising (or a connection) is active?