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

nRF24L01+ payload lenght > 32

The documentation clearly state that if the payload length is read as > 32 byte, the RX FIFO must be flushed. My question is, will that erase all other pending messages even if they have been acknowledged to the transmitter.

If other messages are lost, is there any way of detecting the situation?

thanks mike

Parents
  • Hi Mike,

    You can check if the FIFO is empty or full. Then you have covered scenarios with either 0 packets or 3 packets. However, if the FIFO STATUS register is not empty and not full, you have either 1 or 2 packets in the FIFO. There is no option to read out if it's 1 or 2 packets.

    In theory you can come across a scenario where you get two packets back-to-back and you're not servicing the interrupt fast enough (<250 us), and one is corrupted and one is valid. The only solution is to flush the FIFO. Normally this is not an issue (especially when using ACK), as the ISR-handling usually does not take that long.

    Best regards Håkon

Reply
  • Hi Mike,

    You can check if the FIFO is empty or full. Then you have covered scenarios with either 0 packets or 3 packets. However, if the FIFO STATUS register is not empty and not full, you have either 1 or 2 packets in the FIFO. There is no option to read out if it's 1 or 2 packets.

    In theory you can come across a scenario where you get two packets back-to-back and you're not servicing the interrupt fast enough (<250 us), and one is corrupted and one is valid. The only solution is to flush the FIFO. Normally this is not an issue (especially when using ACK), as the ISR-handling usually does not take that long.

    Best regards Håkon

Children
No Data
Related