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

What is maximum number of event handlers supported for radio notification event handler?

My application would like to receieve notifications at several different times before a radio notification event. Specifically the application needs to receive notification 250mS before and the flash manager requires notification 50mS before.

Does ble_radio_notification_init support multiple event handlers and if so how many?
What errors will be generated when exceeding the maximum supported event handlers?

In other words will this work:

err_code = ble_radio_notification_init(NRF_APP_PRIORITY_HIGH,
                                       NRF_RADIO_NOTIFICATION_DISTANCE_4560US,
                                       ble_flash_on_radio_active_evt);
APP_ERROR_CHECK(err_code);

err_code = ble_radio_notification_init(NRF_APP_PRIORITY_HIGH,
                                       NRF_RADIO_NOTIFICATION_DISTANCE_250MS,
                                       application_radio_active_evt);
APP_ERROR_CHECK(err_code);
Parents
  • No, you can have only one notification distance, so the above will give a notification only at the latter distance. However, there is no way to get a notification 250 milliseconds before, and the only legal values for this parameter are those distances given in nrf_soc.h:

    
    /**@brief Possible values of ::nrf_radio_notification_distance_t. */
    enum NRF_RADIO_NOTIFICATION_DISTANCES
    {
      NRF_RADIO_NOTIFICATION_DISTANCE_NONE = 0, /**< The event does not have a notification. */
      NRF_RADIO_NOTIFICATION_DISTANCE_800US,    /**< The distance from the active notification to start of radio activity. */
      NRF_RADIO_NOTIFICATION_DISTANCE_1740US,   /**< The distance from the active notification to start of radio activity. */
      NRF_RADIO_NOTIFICATION_DISTANCE_2680US,   /**< The distance from the active notification to start of radio activity. */
      NRF_RADIO_NOTIFICATION_DISTANCE_3620US,   /**< The distance from the active notification to start of radio activity. */
      NRF_RADIO_NOTIFICATION_DISTANCE_4560US,   /**< The distance from the active notification to start of radio activity. */
      NRF_RADIO_NOTIFICATION_DISTANCE_5500US    /**< The distance from the active notification to start of radio activity. */
    };
    
    

    I would also like to recommend you to upgrade to second revision chips for development, since that is the ones you'll most likely end up using in production. That will also enable you to use SDK 5.1.0/S110 version 6.0.0, which has the flash writing builtin in the softdevice.

Reply
  • No, you can have only one notification distance, so the above will give a notification only at the latter distance. However, there is no way to get a notification 250 milliseconds before, and the only legal values for this parameter are those distances given in nrf_soc.h:

    
    /**@brief Possible values of ::nrf_radio_notification_distance_t. */
    enum NRF_RADIO_NOTIFICATION_DISTANCES
    {
      NRF_RADIO_NOTIFICATION_DISTANCE_NONE = 0, /**< The event does not have a notification. */
      NRF_RADIO_NOTIFICATION_DISTANCE_800US,    /**< The distance from the active notification to start of radio activity. */
      NRF_RADIO_NOTIFICATION_DISTANCE_1740US,   /**< The distance from the active notification to start of radio activity. */
      NRF_RADIO_NOTIFICATION_DISTANCE_2680US,   /**< The distance from the active notification to start of radio activity. */
      NRF_RADIO_NOTIFICATION_DISTANCE_3620US,   /**< The distance from the active notification to start of radio activity. */
      NRF_RADIO_NOTIFICATION_DISTANCE_4560US,   /**< The distance from the active notification to start of radio activity. */
      NRF_RADIO_NOTIFICATION_DISTANCE_5500US    /**< The distance from the active notification to start of radio activity. */
    };
    
    

    I would also like to recommend you to upgrade to second revision chips for development, since that is the ones you'll most likely end up using in production. That will also enable you to use SDK 5.1.0/S110 version 6.0.0, which has the flash writing builtin in the softdevice.

Children
No Data
Related