cancel
Showing results for 
Search instead for 
Did you mean: 

ADC multichannel question

oeliks
Senior

Hi, I want to set 3 channels of adc and transfer data via dma to buffer.

But I want to read rando​mly, sometimes only ch1, sometimes only ch3 etc. One channel at time. And fill buffer with data from one channel.

Do I have to set:

-adc continous - disable

-​scan channels- disable

In code I will only change the "rank" values of channels? Deinit and init adc. Start adc with dma?

Will only rank1 channel be transfered via dma to buffer?

2 REPLIES 2
berendi
Principal

There are subtle differences in the ADC and DMA peripherals between STM32 series, so knowing the part number would be useful.

oeliks
Senior

Stm32f103 has only 1xDMA 2xADC