How to use SPI Rx-only with DMA and timed trigger or synchronization
I'm using an STM32H725 and am trying to read a block of SPI data (say, 100 samples) from an external SPI ADC on a fixed sampling schedule. That is, I do NOT want to read all 100 samples as fast as possible; I want to read 1 sample every microsecond.
I am trying to do this with DMA but it is not working. If I just use basic SPI+DMA it works...but it reads all 100 samples as fast as possible. As soon as I try to use DMAMUX triggers (request generator) or DMAMUX synchronization using TIM12_TRGO, things fall apart: I get overrun errors, or I get 10-11 readings and then it fails, and in all cases, the request generator or synchronizer is ignored: it still reads the SPI peripheral as fast as possible (instead of once per microsecond, as configured in TIM12).
Does anyone have any tips, suggestions, sample code that uses SPI Rx-only with DMA and timer-based trigger and/or synchronizer?