After I add ack to ESB the probability of TX failure becomes higher

TX :52840

Software version:nRF5_SDK_16.0.0_98a08e2
hardware version:

RX:52820

Software version:nRF5_SDK_17.1.0_ddde560

My test method: send 60 bytes of data through esb every 5ms, ack replies with 60 bytes of data. Skip to the next channel when TX transmission is successful or 10 consecutive transmission failures. RX skips to the next channel after receiving data. TX records the number of successful and unsuccessful transmissions.

When my project does not add ack, it sends 2200 times and triggers 1 TX FAILED EVENT.
When I added ack, sending 100 times triggered 32 TX FAILED EVENTs.
There is a phenomenon: 20~30ms after a TX FAILED EVENT is triggered, the transmission fails.

TX esb_init:

uint32_t esb_init( void )
{
    uint32_t err_code;
		
    uint8_t base_addr_0[4] = {0xE7, 0xE7, 0xE7, 0xE7};
    uint8_t base_addr_1[4] = {0xC2, 0xC2, 0xC2, 0xC2};
    uint8_t addr_prefix[8] = {0xE7, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8 };

    nrf_esb_config_t nrf_esb_config         = NRF_ESB_DEFAULT_CONFIG;
    nrf_esb_config.protocol                 = NRF_ESB_PROTOCOL_ESB_DPL;
    nrf_esb_config.retransmit_delay         = 600;
    nrf_esb_config.retransmit_count         = 3;
    nrf_esb_config.bitrate                  = NRF_ESB_BITRATE_1MBPS;
    nrf_esb_config.event_handler            = nrf_esb_event_handler;
    nrf_esb_config.mode                     = NRF_ESB_MODE_PTX;
    nrf_esb_config.selective_auto_ack       = true;
	nrf_esb_config.tx_output_power          = RADIO_TXPOWER_TXPOWER_Pos8dBm; 
		
	nrf_esb_config.payload_length = 90; 
		
    err_code = nrf_esb_init(&nrf_esb_config);

    VERIFY_SUCCESS(err_code);

    err_code = nrf_esb_set_base_address_0(base_addr_0);
    VERIFY_SUCCESS(err_code);

    err_code = nrf_esb_set_base_address_1(base_addr_1);
    VERIFY_SUCCESS(err_code);

    err_code = nrf_esb_set_prefixes(addr_prefix, NRF_ESB_PIPE_COUNT);
    VERIFY_SUCCESS(err_code);
    return err_code;
}

RX  esb_init:

uint32_t esb_init( void )
{
    uint32_t err_code;
    uint8_t base_addr_0[4] = {0xE7, 0xE7, 0xE7, 0xE7};
    uint8_t base_addr_1[4] = {0xC2, 0xC2, 0xC2, 0xC2};
	uint8_t addr_prefix[8] = {0xE7, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8 };	
    nrf_esb_config_t nrf_esb_config         = NRF_ESB_DEFAULT_CONFIG;
    nrf_esb_config.payload_length           = 90;
    nrf_esb_config.protocol                 = NRF_ESB_PROTOCOL_ESB_DPL;
    nrf_esb_config.bitrate                  = NRF_ESB_BITRATE_1MBPS;
    nrf_esb_config.mode                     = NRF_ESB_MODE_PRX;
    nrf_esb_config.event_handler            = esb_cb;
    nrf_esb_config.selective_auto_ack       = false;

    err_code = nrf_esb_init(&nrf_esb_config);
    VERIFY_SUCCESS(err_code);

    err_code = nrf_esb_set_base_address_0(base_addr_0);
    VERIFY_SUCCESS(err_code);

    err_code = nrf_esb_set_base_address_1(base_addr_1);
    VERIFY_SUCCESS(err_code);

    err_code = nrf_esb_set_prefixes(addr_prefix, 8);
    VERIFY_SUCCESS(err_code);
    return err_code;
}

Parents Reply
  • Hi,

    xiami said:
    Thank you, the probability of failure to send is reduced after I increase retransmit_count.

    Good to hear, that makes sense.

    xiami said:
    I have another question: sometimes I receive data that I send.

    It is not physically possible for the radio to receive it's own signal (it is either in Tx of Rx, never both modes at once), so if you receive the same data it is sent back by the other party for some reason.

Children
No Data
Related