cancel
Showing results for 
Search instead for 
Did you mean: 

SPI txCRC wrong value

Dav1d
Associate

Hello,

I am using SPI with crc enabled on stm32f429ig.

The problem is: if master's SCK's gpio speed is configured as medium, everything works fine. BUT if it is set to veryhigh, transmitted crc (read from TXCRCR register) always calculates a wrong value.
For example, when sending 0x01 using CRC-8 with a Polynomial = 0x07, the result in the TXCRCR register is always 0x09. However, RXCRCR in the slave side(also on a stm32f429ig with same configuration) calculates the right result of 0x07. This also occurs with CRC-16.

I am wondering how SCK gpio speed or potential circuit problems leads to the wrong crc calculation?

2 REPLIES 2
TDK
Guru

Can you view the signal on the line? Are pins set to very high frequency?

What frequency are you using and how are the chips connected? Note that high speed signals aren't going to play well with jumper wires. Expect to max out in the ballpark of tens of MHz at best if this is the case.

If you feel a post has answered your question, please click "Accept as Solution".

Thank you for your reply!
These are the signals when i send b00000001, SPI frequency at 11.25MHZ:
SCK VERY_HIGH with MOSI VERY_HIGH:

1.jpg

SCK MEDIUM with MOSI VERY_HIGH:
2.jpg

it looks like hardware crc read b00000001 as b00000011 and get the result 0x09.