Skip to main content
BRémy.1
Associate
July 8, 2020
Question

SPI Communication with DMA transfer

  • July 8, 2020
  • 3 replies
  • 849 views

Hello,

i'm working with the STM32F746G-DISCO development kit. I need to use 3 SPI in reiceive only master mode (each SPI have the same clock). The data comming from the SPI are clocked at 4[MHz]. I need to use DMA to transfer data from the SPI peripheral to the memory.

The fact is this data are measurements and i need these measurements are synchrounous. When starting and stoping the SPI that take some time and the data are no longer synchronized. I don't know how i can synchornize this measurement, have you an idea ?

This topic has been closed for replies.

3 replies

berendi
Principal
July 8, 2020

What has to be synchronized to what? The SPI masters to each other?

BRémy.1
BRémy.1Author
Associate
July 8, 2020

The 3 SPI master must save data in the same time. This is needed because i use the SPI data to do some calcul. More precisely I need the signal phase in my calcul. You will therefore understand that if the SPI data are not take in the same time, the phase will be wrong.

S.Ma
Principal
July 8, 2020

Hmm.. how about configure 1 SPI as Master (use dual lane even if MISO is not going to a pin), and the other 2 as Slave (receiving the master clock)

This way, you can set 3 DMAs filling each one its buffer with the clock generation from a single SPI to manage.

Would this decomplexify the handling?