Skip to main content
Visitor II
June 1, 2021
Question

How to use HAL_ADCEx_MultiModeStart_DMA in Triple Mode with multiple Channels?

  • June 1, 2021
  • 1 reply
  • 1796 views

Hello,

I want to use ADC1 with 5 Channels, ADC2 with 2 Channels and ADC3 with 1 Channel.

I configured everything for triple Mode. After I started ADC2 and ADC3 do I start ADC1 like this.

Is NUMBER_OF_CHANNELS supposed to be 8 in my case?

retVal = HAL_ADCEx_MultiModeStart_DMA(&hadc1, gValueArrayADCTripleMode, NUMBER_OF_CHANNELS);

I test the output by looking at ADC1 Channel7, but the index of this value changes every conversion. How can I get every value to stay at the same position in the array? The values itself seem to be valid. I just can figure the positioning out.

    This topic has been closed for replies.

    1 reply

    Visitor II
    June 1, 2021

    I think I found the answer. If ADC1 has 5 Channels ADC2 and ADC3 also need to have 5 Channels. Can anyone confirm?