STM32H747 DMA Linked List (or Double Buffering) and ADC Interleaved
Hi all,
I'm implementing a DAQ (data acquisition chain), using STM32H747Xi Discovery board.
What I need to do is sample as fast as possible 1 adc channel and do some light processing on the data. I need to understand how to configure the system to get the best results.
So far here's my guess:
- ADC1 & 2 in interleaved mode (ADC 1 as master)
- ADCs in continuous mode
- Transfer data to Memory using DMA in Linked List (or Double Buffering)
What I would like to do is set up 2 buffers and having the M7 process the 1st while the 2nd is beeing filled by the DMA. And viceversa.
I think that using linked list is the right way to go, because it also allows to target 2 different memory banks to avoid collision.
I started off with this example from stm32cubeh7 repo, which shows ADC interleaved functioning and uses circular buffering. I also found this one on MDMA linked lists.
Now I need to understand how to "merge" them.
Here are my questions:
- How's the flow between sw, adc and dma? Should the ADC ask the DMA to start a transaction or the 2 should be started independently by sw?
- from stm32h7xx_hal_adc.h "In continuous mode, DMA must be configured in circular mode. Otherwise an overrun will be triggered when DMA buffer maximum pointer is reached." But I guess it is possible to use it in linked mode as well right?
- What do you think of the LinkedList approach as opposed to the circular buffer with HalfCompletion and Completion callback?
Any help/example on this topic would be of much help.