2024-11-25 12:47 PM
Hello everyone,
I have enabled an spi1 port on a STM32G473CET6 as a slave and am using a raspberry pi as a master.
I have verified with known packets to ensure I have implemented the correct crc algorithm on the raspberry pi both in transmission and reception. It's quite confusing because they are correct, in both directions the calculated and expected crc is the same. However, no matter what the stm32 is calling HAL_SPI_ErrorCallback(SPI_HandleTypeDef *hspi) for a crc error. I verified thoroughly the CRCs and even echoed the same packet to check. This is printed by the stm32.
I also checked this website for the crc implementation.
The only the potential lead I can find (here) is that I have to flush the buffer which is reading the registers RXCRC and DR as I understand.
I have tried this and still without fail I get a crc error. Between transactions I also reset the SPI port so that it doesn't get stuck in error. Does anyone have an idea? I will also leave the registers below to check.
Thank you in advance
2024-11-25 02:22 PM
Does the STM32 side have the CRC register go to zero when the 0x31,0x00 received bytes are fed thru?
The check is that the CRC zero's not that there's a "match"