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

nRF51822 cann't receive data when init ESB again

Hi,

nRF51822 use ESB to communicate with LE1,they both use ACK and retransmit.

In the beginning, 51822 works at RX and it can receive data from LE1;Secondly, 51822 turns to TX while the LE1 becomes RX, LE1 can receive the data from 51822 sends;

After that , 51822 will turns to RX again and LE1 works at TX mode,but 51822 cann't receive data any more.

I also found that I just use the same function(as below) to do initialization to make 51822 go to RX mode ,51822 also cann't receive data any more.

void radio_rx_mode(void) { (void)nrf_esb_disable(); (void)nrf_esb_init(NRF_ESB_MODE_PRX);

(void)nrf_esb_set_output_power(NRF_ESB_OUTPUT_POWER_0_DBM);
	(void)nrf_esb_set_datarate(NRF_ESB_DATARATE_1_MBPS);
	(void)nrf_esb_set_crc_length(NRF_ESB_CRC_LENGTH_2_BYTE);
	(void)nrf_esb_set_channel(28);
	
	(void)nrf_esb_set_base_address_length(NRF_ESB_BASE_ADDRESS_LENGTH_2B);
	(void)nrf_esb_set_address_prefix_byte(PIPE_NUMBER,pipe0_prefix_addr);
	(void)nrf_esb_set_base_address_0(base0_address);
	

	(void)nrf_esb_set_retransmit_delay(1000);
  (void)nrf_esb_set_max_number_of_tx_attempts(10);
(void)nrf_esb_enable(); 

}

Could you give me some advice?Thanks.

  • Do you see that the PTX is trying to send re-transmits and that it gets the maximum re-transmits? I don't know what configurations you use on the other side of the link, but check the frequency channels used, I see you are using channel 28 on the PRX. What's the address that you are actually using, is it matching on both the PRX and PTX? How be aware that the definition of retransmit delay is different on the LE1 and the nRF51. On the LE1 it is how long it after the package, but on the nRF51 it's from the start of the package.

    If you are initializing the PRX functionality on the nRF51 twice I would check the register settings or if some settings are kept from the previous TX mode or first RX mode. Also, check on the PTX that it is actually sending packages when you expect it to. The VDD_PA pin will go up to 1.8 V when it is actually transmitting. This should be easily visible by using a oscilloscope.

Related