cancel
Showing results for 
Search instead for 
Did you mean: 

SPI DMA CRC transmit

Jseyn.1
Associate III

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.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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".

View solution in original post

2 REPLIES 2
TDK
Guru

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
Associate III

thank you for reply. i gotta it.