AnsweredAssumed Answered

Help with M24SR i2c CRC calculation

Question asked by yi.jonathan on Aug 29, 2014
Latest reply on Sep 29, 2014 by yi.jonathan
Hello,

I'm having trouble calculating the CRC when sending and receiving bytes via i2c from the M24SR.

I've tried following the example on page 29 from the application note on storing data in the NDEF memory
(http://www.st.com/web/en/resource/technical/document/application_note/DM00105043.pdf)

When I follow the CRC algorithm from wikipedia (http://en.wikipedia.org/wiki/Cyclic_redundancy_check#Computation)
The calculated CRC does not match the expected CRC from the example.

Can someone please show step by step how to calculate the CRC?
For instance, how would I calculate the CRC if I try to send the command to read the CC file length?
Start bit 0xAC 0x02 0x00 0xB0 0x00 0x00 0x02 0x6B 0x7D Stop bit

What is the polynomial divisor? Is it 0x8005? From section 5.5 in the datasheet (http://www.st.com/web/en/resource/technical/document/datasheet/DM00097458.pdf), what does it mean that "The initial register content shall be 0x6363 and the register content shall not be inverted after calculation"?

Thanks for any help,
Jon

Outcomes