cancel
Showing results for 
Search instead for 
Did you mean: 

HAL Problems with SPI(slave) + DMA + CRC(hardware) in stm32f373

AFerr.1
Associate II

I'm using a STM32F373 microcontroller as SPI slave and can't make it work properly using CubeMX and HAL functions.

Master side is OK, confirmed in scope that byte string and calculated CRC for Tx are as expected.

Slave side is programmed to transfer via DMA to a buffer. If the number of transfers includes the 2 extra CRC bytes (using 16bit CRC), as instructed in all documentation I could find, SPI_DMA_RxCompleteCallback keeps polling until timeout. (By the way, I consider absurd that this routine polls for the CRC recepction).

If the DMA number of transfers is programmed with n-2, the referred polling works fine, but CRC evaluation ALWAYS returns CRC_ERROR, no matter what. I've tried sending a sequence os binary zeroes, that would discard both CRC computation and buffer pointer mistakes, but it simply won't work...

Need some help ASAP, Thanks a lot in advance!

0 REPLIES 0