2011-07-12 08:03 PM
I am repetitively sending/receiving 6 byte messages plus 16-bit CRC full duplex using SPI2 using DMA to/from another identical STM32 eval board with the same 72Mhz processor. I am transferring at 9Mbps rate. However, about 3 to 4 Percent of the transaction fail due to CRC error. Going slower seems to make it worse. No other DMA activity is occurring. Setting DMA priority to ''very high'' made no difference. Any idea what to look for or try to eliminate the CRC errors?
Also, I can enable the same test using SPI1 and I never see CRC errors unless I force them by changing the polynomial on one end. The wiring between the boards appears identical. (I am also using the same baud rate on SPI1 by using a larger clock divisor since it is driven by 72Mhz pclk while SPI2 has 36Mhz pclk.) Also, the SPI signals have the correct timing when I look with a scope. -g2011-07-13 07:24 PM
This actually is a documented errata that you can't use SPI2 on version ''Z'' parts in full-duplex, slave mode with DMA and CRC. However it is fixed on newer version ''Y'' parts (which I verified).
P/S: This forum is often broken. E.g., can't log in sometime and tells you try later, sometimes very slow and fails to respond at all. And earlier, while typing this message, a ''Sorry, Unhandled Exception'' window appeared and no further entry was allowed.