cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F303C8 with using ADC1, ADC2

HLee.6
Associate

hey guys,

i'm programming a two motor control system, and must take each of motor current information. (my MCU's ADC setting : DMA, TRGO.)

when i get ADC's value using hal libraries, how can i get each of ADC1, ADC2 value???

In simple terms :

I want to use ADC with 2 blocks, not 2 channels.

(2 channel mean each 1, 2 channel of ADC1. block mean ADC1, ADC2)

​p.s. sorry about my terrible english..

3 REPLIES 3
Ozone
Lead II

Don't know about the HAL part, never used it.

You need to initialize each ADC individually, with it's own inputs and channels.

Some inputs (GPIOs can work with several ADC, check your resources.

Perhaps you want the dual-mode of the ADC, with both ADCs synchronized to achieve higher sampling rate.

I suggest to read the reference manual first.

I suggest to read the reference manual first.

+1, especially the Dual ADC modes subchapter.

It's not (only) about achieving higher sampling rate - in the simultaneous mode, they won't achieve higher sampling rate actually; they will work simultaneously, as master-slave, triggered both at the same time from master's trigger, and outputting data into the common data register.

JW

HLee.6
Associate

i think i should read reference manual perfectly before i do programming.

thanks