cancel
Showing results for 
Search instead for 
Did you mean: 

Is it a must to use DMA for ADC when we have more than one channel?

DMark.1
Associate II

Hi!

I am using ADC1 to convert two channels continuously. The two channels are VrefINT and Temperature sensor. However, for some sampling rate I find that ADC1->DR contains only temperature data and for other sampling rate, ADC1->DR contains only VrefINT data.

Is it possible to read the conversion result for those two channels properly without using DMA? Or in this case, DMA is a must?

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Principal III

It is possible without DMA by using Discontinous Conversion Mode. You need to poll for each result because there is only 1 data register for all channels.

hth

KnarfB

View solution in original post

2 REPLIES 2
KnarfB
Principal III

It is possible without DMA by using Discontinous Conversion Mode. You need to poll for each result because there is only 1 data register for all channels.

hth

KnarfB

S.Ma
Principal

Yes, as long as sampling rate is non critical (it depends on the response time or each input). So you can operate the ADC in one channel one shot mode, all manual.

Read the spec, there are minimum sampling time for each, and adc calibration should be done once after init the adc.

Remember that to calculate vdd or temperature, you need to carefully read the ref man and the datasheet. There maybe exemples in a nucleo project.