AnsweredAssumed Answered

STM32F1.. SPI CRC problem

Question asked by van_winkoop.henk.001 on Dec 15, 2013
Latest reply on Jan 7, 2014 by robinson.henry
Hi,

After a few days of experimenting and struggeling my SPI application CRC check somehow still does not seem to work.
I'm using the STM32F103ZD uC. Master SPI1 sends data and slave SPI2 receives this data. MOSI/MISO/NSS/CLK pins are connected to their equal named pins. Both SPI's are connected to DMA1 using a 16-bit width data path. On both SPI's the CRC is enabled. Master SPI1 sends data, automatically followed by sending the 16-bits CRC. Slave SPI2 receives data correctly and when debugging the RXCRCR register shows exactly the same CRC as is transmitted by master SPI1. However, the status register of slave SPI2 still shows a CRCERR bit set meaning that the received and calculated CRC does not match the received CRC value. But is does.
I slightly tend to think that there is some hardware error in the uC but I'm not sure.
Is there anybody that has some positive experience with SPI and CRC calculations?

Thanks in advance,

Henk

Outcomes