Skip to main content
PVes
Visitor II
June 16, 2019
Question

Send SPI frame through DMA triggered by timer?

  • June 16, 2019
  • 3 replies
  • 945 views

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.

This topic has been closed for replies.

3 replies

S.Ma
Principal
June 16, 2019

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
June 16, 2019

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

waclawek.jan
Super User
June 16, 2019

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