2024-08-25 09:05 PM
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?
2024-08-26 06:09 AM - edited 2024-08-26 06:11 AM
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.
2024-08-29 04:00 AM
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:
SCK MEDIUM with MOSI VERY_HIGH:
it looks like hardware crc read b00000001 as b00000011 and get the result 0x09.