cancel
Showing results for 
Search instead for 
Did you mean: 

Send SPI frame through DMA triggered by timer?

PVes
Associate

Hello.

I want to implement low jitter SPI polling of an external sensor with STM32F4Disco board.

From ref. manual it is not completely clear if it is possible to do multiple SPI transmissions (send any arbitrary number of bytes) after a single (timer) DMA request. If i configure DMA in circular mode and select timer as the request channel - it only does one transmission per request.

3 REPLIES 3
S.Ma
Principal

Probably this can work on STM32L4R with DMAMUX, to trigger DMA from a source which is not the peripheral accessed by the DMA.

And I guess NSS won't have to be toggled because it would be by SW then.

S.Ma
Principal

Without part number, answers can't be precise, unless there is a telepath within the viewers.

KIC,

OP mentioned STM32F4Disco (and I noticed this only after reading it the third time... 🙂 ) , i.e. target is STM32F407.

pvbmstu,

STM32F407 does not have DMAMUX unit the newer pars have, and there's only one trasfer per timer update. But but the required effect could be achieved by chaining two timers, first determining the long period, and the second being gated from the first, running fast enough to trigger the DMA-to-SPI transfers.

JW