nRF24L01 Radio: R_RX_PL_WID returns 0

Hello,

I am a developer/maintainer for the RF24 Arduino library at https://github.com/nRF24/RF24

I've found in some cases, the R_RX_PL_WID register returns 0 while the FIFO_STATUS register indicates there is a payload in the FIFO. (returns 0x10)

At this time the STATUS register returns 0xE, indicating RX FIFO is empty

The only way I've found to recover from this issue is to flush the RX buffer with the FLUSH_RX command.

I am wondering

a: If this is a known issue, it seems very similar to the issue where R_RX_PL_WID returns >32

b: If it is known, what is the probable cause &/or prevention? Could it be a software interaction/SPI related issue or is this a NRF24L01P issue?

Testing on Raspberry Pi shows numerous errors in short periods of time (hours) when doing continuous, large data transfers.

I am having trouble recreating the issue on Arduino based devices, but monitoring to see if/when it happens.

I have tested with various radio modules, connectors, hardware etc, and the issue still pops up. Low power modules, high power modules, etc. from various retailers.

Any input on this would probably be helpful.

The old code:

    uint8_t result = read_register(R_RX_PL_WID);

    if (result > 32) {
        flush_rx();
        return 0;
    }
    return result;

The new code:

    uint8_t result = read_register(R_RX_PL_WID);

    if (result > 32 || !result) {
        flush_rx();
        return 0;
    }
    return result;

Related