cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 SPI CRC8 ERROR

gioacchino032
Associate
Posted on October 20, 2011 at 11:04

Hi,

I have tested the CRC generator of the SPI peripheral. But I get some strange result... The message to send is the byte 0x40. I send this message after enabling the CRC8 computation. Then I read the tx CRC. I repeat these steps with all the possibile generator polynomials. The result seems to be quite strange, when the lsb of the generator is set the crc is Ok but when the lsb is cleared the crc computation goes wrong...

gen = 0x00 crc = 0x40 (correct value is 0x00)

gen = 0x01 crc = 0x40 (ok)

gen = 0x02 crc = 0xC0 (correct value is 0x80)

gen = 0x03 crc = 0xC0 (ok)

gen = 0x04 crc = 0x44 (correct value is 0x04)

gen = 0x05 crc = 0x45 (ok)

#spi-crc8
0 REPLIES 0