Skip to main content
Associate
August 26, 2024
Question

SPI txCRC wrong value

  • August 26, 2024
  • 2 replies
  • 726 views

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?

This topic has been closed for replies.

2 replies

TDK
August 26, 2024

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""."
Dav1dAuthor
Associate
August 29, 2024

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.