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

Radio receive returns a packet very slowly

Hi, and thanks ahead for the help. I am working on receiving ble packets without using the soft device. I am able to transmit an advertisement with raw radio and pick it up on another device. I can also receive an advertisement packet and read the data. The problem lies in that the radio returns a packet only every 5-10 seconds despite an advertising interval of ~100ms and continuous listening. When the packet is finally received, it is the correct data, but I almost never receive it. I have both my transmitter and receiver in a faraday cage so that they are really the only devices in the "environment". Placing the NRF sniffer in the cage as well gives me all of the expected packets. Am I missing something as to why I can't receive packets more rapidly? I have also tried SHORTS and that gives the same behavior.

EDIT: I have enabled the HFCLK

Thanks again,

CODE:

int RadioReceive() {


NRF_LOG_INFO("Start")
NRF_LOG_FLUSH();

NRF_RADIO->EVENTS_READY = 0U;
// Enable radio and wait for ready
NRF_RADIO->TASKS_RXEN = 1U;

while (NRF_RADIO->EVENTS_READY == 0U)
{
	// wait
}

NRF_RADIO->EVENTS_END = 0U;

NRF_LOG_INFO("Ready")
NRF_LOG_FLUSH();
NRF_RADIO->TASKS_START = 1U;

// Wait for end of packet
while(NRF_RADIO->EVENTS_END == 0U)
{
	// wait
}

	
NRF_LOG_INFO("CRC")
NRF_LOG_FLUSH();

if (NRF_RADIO->CRCSTATUS == 1)
{
	// do stuff
}
	

		
return 0;

}

Parents Reply Children
No Data
Related