Showing results for 
Search instead for 
Did you mean: 

STM32 ADC multiple channel use

Posted on August 27, 2014 at 18:41

To get data from multiple channels for any ADC, what function should i use?

For eg

If i configure my ADC with the following : 

ADC_RegularChannelConfig(ADC1,ADC_Channel_0, 1,ADC_SampleTime_1Cycles5);

ADC_RegularChannelConfig(ADC1,ADC_Channel_1, 1,ADC_SampleTime_1Cycles5);

(configuring channel 0 and 1 for ADC1)

If I use : Analog_value1=ADC_GetConversionValue(ADC1);

it will return value of ADc converted from the latest channel (channel1).

How do i retrieve value of ADC1 channel 0 without having to reconfigure my ADC??

#adc #stm32
Posted on August 27, 2014 at 19:10

What STM32, they make like literally dozens of them?

The index needs to increment between channels, everything is not ONE.

The ADC would need to be in scan mode, and you'd need to use DMA to read multiple channels.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on September 11, 2014 at 19:13

Hello Clive

I am using STM32F103RE with the 64 pin package.

I have to design a device around it that requires 6 ADC conversions to be done almost simultaneously.

I know this chip has 3 ADC's  that can be used but i was wondering if i can use multiple channels  for ADC's to get 6 values quickly.

Let me know what is the best way.