2020-05-19 07:09 PM
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..
2020-05-19 11:18 PM
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.
2020-05-19 11:46 PM
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
2020-05-20 12:34 AM
i think i should read reference manual perfectly before i do programming.
thanks