This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with radio notifications

Hi, I am using nRF51822 with Softdevice S110 v6.0 to advertising packets and I would like to know when transmission is over to read some data from external sensors. I tried to use radio notifications but they seem to work incorrectly. To check it i put into handler two functions to send info about radio state to terminal and i discovered that interruptions are triggered constantly couple times per second independently to advertising interval (i set the longest available period 10,24s, so i think that interrupts with the same radio state should be triggered with approximately this interval). Below I attached my functions to handle radio notifications and i would like to know what is wrong with them.

/**@brief Function for handling radio notyfication.
 */
void ble_radio_ntf_handler(bool radio_state)
{
		if(radio_state==true)
		{
				// Radio active.
				simple_uart_put('a');
		}
		else
		{
				//Radio inactive.
				simple_uart_put('i');
		}
}



/**@brief Function for enabling radio notyfication.
 */
static void radio_notification_init(void)
{
		uint32_t err_code;
		
		// Enable Radio Notification
		err_code = ble_radio_notification_init(NRF_APP_PRIORITY_LOW,NRF_RADIO_NOTIFICATION_DISTANCE_800US,ble_radio_ntf_handler);
		APP_ERROR_CHECK(err_code);		
}

BR Martin

Related