This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Team,
Is there any example to calculate CRC value before sending the data packet on the CC1310 radio?
My intention is to calculate the CRC value of the data packet and send it across the radio and receive the entire data and check the CRC at the receiver end.
As per the TI doc, it says that following the payload in the receive buffer we receive the CRC value if the rxConf.bIncludeCrc = 1.
But how is this value obtained?
And is the CRC value calculated at the transmitter end and sent along with the data or the CRC value is calculated only at the receiver end for the data received in the rxbuffer?
Thank you
Vikram
Hi TA,
Thank you for the information and the link for calculating the CRC.
However, for now I will go as per the information given by TER that radio calculates the CRC value before send the packet and we can add it to the packet by writing pkConf.bUseCrc = 1 in the PROP_TX and PROP_TX_ADV command.
Also at the receive end the RF driver verify that CRC is correct of not based on the pOutput structure value.
But I would like to ask a question.
Is it wise enough to calculate the CRC and add it to the payload just before the actual data goes out in the txPacket and than on the receive end to separate the CRC from the payload and calculate the CRC value of remaining data to cross check the CRC validation?
Thank you
Vikram
Hi
If you have configured the TX and RX differently when it comes to length info/header byte, if the CRC is calculated over different fields on the TX and RX etc, you will potentially get a CRC error on the receiver side:
In our rfPacketRX example we use the following config:
RF_cmdPropRx.rxConf.bAutoFlushIgnored = 1; /* Discard ignored packets from Rx queue */
RF_cmdPropRx.rxConf.bAutoFlushCrcErr = 1; /* Discard packets with CRC error from Rx queue */
RF_cmdPropRx.pktConf.bRepeatOk = 1;
RF_cmdPropRx.pktConf.bRepeatNok = 1;
In this case, only packets with CRC OK is put in the data entry and all packets with CRC errors are removed from the RX queue and RX is restarted.
That means that you will only get a callback when packets with CRC OK is received.
Please take a look at the rfPacketTX and rfPacketRX example. This uses CRC both on the RX and TX side.
Siri