cancel
Showing results for 
Search instead for 
Did you mean: 

ADC value on multiple channel ?

antonius
Senior

Dear Member,

I have a question related with multiple channel on ADC ,

how can I retrieve the value of channel 1 and channel 3,4 and 5 from

adcResult= HAL_ADC_GetValue(&hadc); ?

Regards

Bianchi

2 REPLIES 2
AvaTar
Lead

Just look closer at the function (especially the return value) for the answer.

Ignoring the "fringe" use case of a single channel, the STM32 ADC was designed to be used with DMA.

With proper setup, the DMA TC interrupt will give you an arbitrary list of conversion results.

antonius
Senior

I saw from my code library without CubeMX

For Channel8:

 ADC_RegularChannelConfig(ADC1, ADC_Channel_8, 1, ADC_SampleTime_55Cycles5);

How can we implement that with STM32CubeMX framework ?

Thanks