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

Multiprotocol and radio RXIDLE state

Hi nrf51 developers,

I'm developing multiprotocol application by combining BLE and a proprietary protocol. I'm using concurrent multiprotocol timeslots API. Started with the ble_app_hrs_with_timeslot example. In that example timer0 generates interrupt, but I modified a little to generate radio interrupt.

My callback function is bellow

nrf_radio_signal_callback_return_param_t * m_radio_callback(uint8_t signal_type)
{   

    switch(signal_type)
    {
        case NRF_RADIO_CALLBACK_SIGNAL_TYPE_START:
            signal_callback_return_param.params.request.p_next = NULL;
            signal_callback_return_param.callback_action = NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE;
            radio_configure();
	    /* Enable interrupt on events */
	        NRF_RADIO->INTENSET = RADIO_INTENSET_ADDRESS_Msk | RADIO_INTENSET_DISABLED_Msk | RADIO_INTENSET_READY_Msk;
	   /* Enable RADIO interrupts */
	  		NVIC_ClearPendingIRQ(RADIO_IRQn);
			NVIC_EnableIRQ(RADIO_IRQn);
			NRF_RADIO->PACKETPTR = (uint32_t)&packet;
			NRF_RADIO->EVENTS_READY = 0U;		
			/* Enable RX */
            NRF_RADIO->TASKS_RXEN = 1U; 
            while (NRF_RADIO->EVENTS_READY == 0U)
            {
                // **I DON'T UNDERSTAND WHY, IT ALWAYS STAYS HERE**
            }
	       start_timer();
           break;
	    case NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO:
		  //**NEVER COMES HERE**
 		   break;
    }
    return (&signal_callback_return_param);
}

I tried to debug and figured out that it never goes to RXIDLE state and stays in a while loop (NRF_RADIO->EVENTS_READY == 0U), I cannot understand why.

I'd really appreciate, if someone could help me. Thanks in advance for your time,

Best regards, Gor

Parents Reply Children
No Data
Related