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

ble_radio_notification_init error 8

Hi,

I recently migrated our code to the SDK 13 (we use the nrf52832) and now the function:

uint32_t err_code = ble_radio_notification_init(6, NRF_RADIO_NOTIFICATION_DISTANCE_5500US, on_ble_radio_active_evt);
APP_ERROR_CHECK(err_code);

Returns error code 8... I can't find any example or similar so I don't know what else I'm missing. This was working on SDK 12.2 and the original code was:

uint32_t err_code = ble_radio_notification_init(6, NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE, on_ble_radio_active_evt);
APP_ERROR_CHECK(err_code);
uint32_t err_code=sd_radio_notification_cfg_set(NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE, NRF_RADIO_NOTIFICATION_DISTANCE_5500US);
APP_ERROR_CHECK(err_code);

Any hints will be appreciated! Thank you!

  • Hello vea45

    I apologize for the late response.

    I believe the error is generated by the sd_radio_notification_cfg_set called within ble_radio_notification_init. This error is described as

     * @retval ::NRF_ERROR_INVALID_STATE A protocol stack or other SoftDevice is running. Stop all
     *                                   running activities and retry.
    

    Some further information from the description of the sd_radio_notification_cfg_set function states

     *      - To ensure that the radio notification signal behaves in a consistent way, the radio
     *        notifications must be configured when there is no protocol stack or other SoftDevice
     *        activity in progress. It is recommended that the radio notification signal is
     *        configured directly after the SoftDevice has been enabled.
    

    Are you calling the function directly after you enable the SoftDevice?

    Best regards

    Jørn Frøysa

  • Thank you! Initializing the radio notification just after the softdevice is the solution!

Related