cancel
Showing results for 
Search instead for 
Did you mean: 

SPI Communication with DMA transfer

BRémy.1
Associate

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 ?

3 REPLIES 3
berendi
Principal

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

BRémy.1
Associate

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

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?