AnsweredAssumed Answered

Trigger SPI DMA by EXTI

Question asked by Adrian Brauchli on Dec 14, 2017

Hi there,


I' m programming an STM32L496 and want to read samples from an external ADC (ADS1292R) using SPI with DMA.

Each time the ADC has a new sample ready, it drives the DRDY line low. Currently, I use the EXTI ISR to start the SPI transfer with HAL_SPI_TransmitReceive_DMA(), which works fine as can be seen in the timing diagramm below:

However, the EXTI ISR is called at 2kHz and I think there must be a better solution for this, as I want to use the CPU for other tasks.

Best would be to trigger SPI DMA transfer directly by the EXTI line without any Software interaction. I don't find anythink like this in the reference manual so I guess that's not possible, is it?

But it would also help if I could just set a flag in some register to tigger a new transfer instead of setting up the whole thing with HAL_SPI_TransmitReceive_DMA() in the ISR.

Any ideas? I attached my code and the screenshots of the CubeMX configurations.