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

nRF52840 ESB Becomes Caught in ESB NRF_ESB_STATE_PTX_TX

Hello,

We have a large application using ESB to communicate between many nRF52840 devices. All devices are using firmware with SDK 17.0.2. These devices often switch from NRF_ESB_STATE_PTX_RX to NRF_ESB_STATE_PTX_TX (switching to TX mode up to every 2ms) as all devices have to transmit packets in specific time slots in reference to each other. This means our devices will reinitialize the ESB radio configuration (calling nrf_esb_init()) between switching from TX to RX modes. Switching from RX mode to TX mode regularly is required by our application to ensure exact timing of RF packet transmission.

The problem we are seeing is that sometimes the device gets caught in the NRF_ESB_STATE_PTX_TX state indefinitely. We confirmed by testing that the ESB layer calls start_tx_transcation() and then is stuck and cannot return to the NRF_ESB_STATE_IDLE state and the radio will continuously transmit out of sync with the other devices. The stuck device is also transmitting and jamming the RF channel. We confirmed this by scanning the RF frequency spectrum when a device is caught in transmit and found that the stuck in TX device is transmitting at 0dB:

For reference, here is our ESB Configuration. Note that we are not using acknowledgements:

_nrf_esb_config.mode                   = NRF_ESB_MODE_PTX,                 \

_nrf_esb_config.crc                    = NRF_ESB_CRC_16BIT,                \

_nrf_esb_config.tx_output_power        = NRF_ESB_TX_POWER_0DBM,            \

_nrf_esb_config.payload_length         = 32,                               \

_nrf_esb_config.protocol               = NRF_ESB_PROTOCOL_ESB_DPL;     // Enable dynamic payload length

_nrf_esb_config.event_handler          = nrf_esb_event_handler;

_nrf_esb_config.bitrate                = NRF_ESB_BITRATE_2MBPS;

_nrf_esb_config.retransmit_delay       = 250;

_nrf_esb_config.retransmit_count       = RF_RETRY_COUNT;        // FIX ME: NRF_ESB_TXMODE_MANUAL may be more consistent in terms of outgoing packet times

_nrf_esb_config.tx_mode                = NRF_ESB_TXMODE_AUTO;          // Automatically trigged start TX once packet written

_nrf_esb_config.selective_auto_ack     = true;                            // Set true alongside "noack=true" in packets, disables Auto Ack

_nrf_esb_config.radio_irq_priority     = 1;

_nrf_esb_config.event_irq_priority     = 2;

 

Has this bug been seen before? Are there any recommended steps to fix this issue? Thanks!

Related