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.

TMS3705 CRC



Hi,

I'm trying to check the CRC that i recieve from the RI-INL-R9QM. I am recieveing the CRC correct and now i want to calculate it from the data and compare it to the recieved CRC.

To start, I cannot even do it on a pice paper!....I'm using http://e2e.ti.com/cfs-file.ashx/__key/CommunityServer-Discussions-Components-Files/667/1524.CRC16.pdf and the Polynomial : x16 + x12 + x5 + 1 .

The HEX from that polynomail, to start calculating like in the app not, do i get it considering de  x16 or no?? I mean, 11021 or 1021 ????

My recieved data is: DATA: 00-00-00-00-0A-4B-CE-46; CRC:DC-26

If i use the 1021 polynomial and according to the app note, my work should be something like this:

0000000000000000000000000000000000001010010010111100111001000110    ----->>A4BCE46
1000000100001
-----------------------
1000000100001
1000000100001
-----------------------
0000000000000
1000000100001
-----------------------
1000000100001

And i get in a "loop",,,,,,,,what Am I doing wrong????

  • Ariel -

    Please try calculating it again, but this time putting the data in reverse...0x46, 0xCE, 0x4B, 0x0A, 0x00, 0x00, 0x00, 0x00...i would then say that you should get your MSB of the CRC to be 0xDC and LSB to be 0x26, which matches what you are receiving.

  • Which one is the correct polynomial: x16 + x12 + x5 + 1 or x16 + x12 + x5 + x??  

    Do I consider the x16? I mean,,,,,If the correct one is , x16 + x12 + x5 + 1 how do i do the XOR proccess??

    10001000000100001 ---> 17 bits

    0001000000100001 ---> 16 bits

  • The polynominal for the Read Only and Read/Write LF tags is: x16 + x12 + x5 + 1, with start value of 0x0000.

    Please see section 2.2.6 for all the details of the CRC generator inside these tags' silcon.

    http://www.ti.com/rfid/docs/manuals/refmanuals/rfm_seq_control.pdf 

     

  • OK, I've tried 0x46, 0xCE, 0x4B, 0x0A, 0x00, 0x00, 0x00, 0x00 and came out something like this:

    0100011011001110010010110000101000000000000000000000000000000000 --->46CE4B0A00000000
    10001000000100001 -->> x16 + x12 + x5 + 1

    0 1 0 0 0 1 1 0 1 1 0 0 1 1 1 0 0 1 0 0 1 0 1 1 0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 1 0 1 0
    1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1
    0 0 1 0 0 1 0 0 1 1 0 1 1 1 0 1 1 0 0
    1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1
    0 0 0 1 1 0 1 1 0 1 1 0 0 1 1 0 1 0 0 0
    1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1
    0 1 0 1 0 0 1 1 0 0 1 0 0 1 0 0 1 0
    1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1
    0 0 1 0 1 1 1 0 0 1 0 1 1 0 0 1 1 0 0
    1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1
    0 0 1 1 0 0 0 1 0 1 1 1 0 1 1 0 1 0 0
    1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1
    0 1 0 0 1 1 0 1 1 1 0 0 1 0 1 0 1 0
    1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1
    0 0 0 1 0 0 1 1 1 0 0 0 0 1 0 1 1 0 0 0
    1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1
    0 0 0 1 0 1 0 0 0 0 1 1 1 1 0 0 1 0 0 0
    1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1
    0 0 1 0 1 0 0 1 1 1 1 1 0 1 0 0 1 0 0
    1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1
    0 0 1 0 1 1 1 1 1 1 0 0 0 0 1 0 1 0 0
    1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1
    0 0 1 1 0 1 1 1 0 0 0 1 1 0 1 0 1 0 0
    1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1
    0 1 0 1 0 1 0 0 0 1 1 1 1 0 1 0 1 0
    1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1
    0 0 1 0 0 0 0 0 1 1 1 0 0 1 0 1 1

    Unfortunatly, 00100000111001011 = 41CB which is not the expected CRC....