I am using SENT protocol in my project.
In my SENT implementation, the data nibbles are 3. So 12 bit data, including a status nibble and CRC nibble.
I need to calculate the CRC for 3 data nibbles.
The seed value for CRC calculation is 5 and the polynomial is
\$ x^{4} + x^{3} + x^2 + 1 \$
I have done the following for CRC calculation:
char CheckSum, i;
char CrcLookup[16] = {0, 13, 7, 10, 14, 3, 9, 4, 1, 12, 6, 11, 15, 2, 8, 5};
CheckSum= 5; // initialize checksum with seed "0101"
for (i=0; i<3; i++) {
CheckSum = CheckSum ^ Data[i];
CheckSum = CrcLookup[CheckSum];
}
In SENT analyser, I could see CRC error. The log is as follows
Can anyone tell me how to calculate the CRC for SENT protocol.
Note: I have 0XABC as data nibble and 3 is status nibble.