External ADC Sampling with DMA (Timing & Configuration)
Hi everyone,
I’m working on a project using an STM32 microcontroller (STM32H745IITx), and I’m trying to set up a DMA transfer for an external 12-bit, 20 MSPS ADC with a 12-bit parallel interface. On my custom board, the data pins of the ADC are routed to the GPIOF port. The ADC clock is generated using Timer 3's PWM output (running at approximately 18 MHz). Additionally, I have an external interrupt (Trigger) that I use to start a measurement.
I want to achieve the following:
- The external interrupt should start the DMA transfer.
- The DMA should then transfer the GPIOF port data on every Timer 3 interrupt event.
I’ve done some research and found that the DMA must be set to Memory-to-Memory mode to achieve this. However, it’s not clear to me:
- When I call HAL_DMA_Start_IT, does the DMA transfer the entire buffer at the specified DMA speed?
- Or, is there a way to link the DMA transfer to Timer 3, so that the DMA reads the GPIO port on every Timer 3 interrupt?
Any help or clarification would be greatly appreciated
