cancel
Showing results for 
Search instead for 
Did you mean: 

ADCx in multichannel with DMA and LL library

Amez-Droz.Philippe
Associate II
Posted on February 05, 2018 at 23:56

Hello,

I use a STM32F407 on a custom board. The application is in Motor Control. I have to read the next channels:

ADC1: Channel 0 and 2

ADC2: Channel 6 and 14

ADC3: Channel 10 and Channel 11 and Channel 12 and Channel 13

Channel 0 and channel 6 and channel 10 should be synchronised read.

Channel 2 and channel 14 and channel 11 should be synchronised read

I need to read 8 value on channel 0/2/6/4 and 4 values on channels 10/11/12/13

I use STM32CubeMx to configure all and I have try to use HAL Library but without success and I try now to use LL Library. 

I will start the conversion of 16 values (8 for channel 0 et 8 for channel 2) on ADC1 and the same on ADC2 and ADC3.

My question is: 'How can I start the conversion on these three ADCs and how can I start the DMA transfert?

Is there a documentation somewhere (multichannel, multi-adc synchronised ,DMA and Synchronised)?

Thank you in advance.

#stm32f4-adc-dma-ll
3 REPLIES 3
Posted on February 06, 2018 at 00:59

I'd use triple mode, but make all 3 ADC do 4 samples, using the command data register to pull all values with a single DMA into a single array.

Symmetrical configuration and timing, triggered via TIM assure synchronization.

ie ADC1 0, 2, 0, 2

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Amez-Droz.Philippe
Associate II
Posted on February 06, 2018 at 09:03

Thank you very much for your answer,

I will try to do it with one single DMA and conversion Triggered via TIM.

AvaTar
Lead
Posted on February 06, 2018 at 10:00

The F4 Discovery Firmware Package (SPL) contains a sample project showing triple interleaved mode using DMA.

(Named 'ADC_Interleaved_DMAmode2').