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

RF communication data error detection

Hi.

I have RF communication between nRF24L01 + and nRF24LU1 +.

Incorrect data is transmitted occasionally during communication. So, I want to use CRC, but when CRC is enabled, communication is not possible. (Register setting = EN_CRC : 1, CRCO : 0or1)

In addition to the CONFIG register, I would like to know if there is anything else to consider using CRC.

What do you think is the reason you do not have the communication you expect?

In addition, I would like to know how to detect or prevent the transmission of erroneous data in addition to the CRC.

Thank you.

  • Hi

    There is no reason adding CRC should make the communication fail, unless the PTX and PRX had incompatible settings to begin with.
    If they are configured differently in terms of mode, payload length, address length and so forth, then the CRC check will pick it up and discard the packet.

    Could you attach the state of the configuration registers for the PTX and PRX?

    Best regards

  • Tx(nRF24L01+)

      NRF_WriteRegister(0x07, 0x00);
      NRF_WriteRegister(0x01, 0x00); 
        
      NRF_FlushTX();
      NRF_FlushRX();
       
      nRF24_CSN_H();
      
      NRF_WriteRegister(0x05, 0x02); 
      NRF_WriteRegister(0x06, 0x06);
      NRF_WriteRegister(0x00, 0x0E);  // CRC 2byte
      NRF_WriteRegister(0x03, 0x03); 
      NRF_WriteRegister(0x07, 0x70);
    

    Rx(nRF24LU1+)

    CONFIG : 0x0F
    EN_AA : 0x00
    EN_RXADDR : 0x03
    SETUP_RETR : 0x00
    RF_CH : 0x02
    RF_SETUP : 0x06
    

    All remaining values ​​are default.

    Best regards

  • Hi

    How do you configure the RX_PW_Px register in the PRX, and does it correspond to the length of the packet sent from the TX?

    If there is a mismatch between the length of the TX packet, and the configuration in the RX, then the CRC check will fail.

    Best regards

  • The RX_PW_Px register setting was incorrect.

    Thank you.

    If you ever disable CRC, can you tell me why it was possible to communicate?

    Best regards

  • Hi

    Without CRC checking the content of the payload is irrelevant.
    As long as you have the correct address, RF bitrate and RF channel the packet will be received, even if the protocol is incorrect or there are bit errors in the packet.

    This means that you can't really trust the data you receive, since it could be sent by some other device, or it could be a false packet caused by random noise in the receiver. As a fun experiment, try to set the address length to 2 or 3 bytes and disable the CRC, then you will receive a lot of false packets ;)

    Best regards

Related