Skip to main content
Jseyn.1
Associate III
September 11, 2020
Solved

SPI DMA CRC transmit

  • September 11, 2020
  • 1 reply
  • 1782 views

hi,

my type is stm32f031, i try to debug ' spi + dma + crc' mode. i have no idea about transmit crc .

i just enable crc_en, and set the bit crc_next every sending 8bit value.

my logic analyzer occured the only 8 bit datas, it not contains the the crc values.

This topic has been closed for replies.
Best answer by TDK

From the reference manual:

CRC transfer managed by DMA

When SPI communication is enabled with CRC communication and DMA mode, the

transmission and reception of the CRC at the end of communication is automatic (with the

exception of reading CRC data in receive only mode). The CRCNEXT bit does not have to

be handled by the software. The counter for the SPI transmission DMA channel has to be set to the number of data frames to transmit excluding the CRC frame.

If it's not working how you expect, consider showing your code.

1 reply

TDK
TDKBest answer
Super User
September 11, 2020

From the reference manual:

CRC transfer managed by DMA

When SPI communication is enabled with CRC communication and DMA mode, the

transmission and reception of the CRC at the end of communication is automatic (with the

exception of reading CRC data in receive only mode). The CRCNEXT bit does not have to

be handled by the software. The counter for the SPI transmission DMA channel has to be set to the number of data frames to transmit excluding the CRC frame.

If it's not working how you expect, consider showing your code.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Jseyn.1
Jseyn.1Author
Associate III
September 11, 2020

thank you for reply. i gotta it.