Skip to main content
antonius
Associate III
November 7, 2018
Question

ADC value on multiple channel ?

  • November 7, 2018
  • 2 replies
  • 588 views

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

    This topic has been closed for replies.

    2 replies

    AvaTar
    Senior III
    November 7, 2018

    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
    antoniusAuthor
    Associate III
    November 7, 2018

    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