AN3116
2
Dual modes
Dual modes are available in STM32 microcontrollers that feature two ADCs: ADC1 master
and ADC2 slave. ADC1 and ADC2 triggers are synchronized internally for regular and
injected channel conversion. ADC1 and ADC2 work together.
In some devices, there are up to 3 ADCs: ADC1, ADC2 and ADC3. In this case ADC3
always works independently, and is not synchronized with the other ADCs.
Note:
Do not sample the same channel on the two ADCs at the same time, this would introduce
conversion errors.
2.1
Dual regular simultaneous mode
2.1.1
Description
The dual regular simultaneous ADC mode is used to perform two conversions
simultaneously owing to the synchronization of ADC1 and ADC2. Each ADC converts a
channel sequence (with scan enabled and the sequencer of each ADC configured) or
converts a single channel (scan disabled). The conversion can be started with an external
trigger or by software. In this mode, the conversion results of ADC1 and ADC2 are stored in
ADC1's data register (32-bit format).
sequences simultaneously. ADC1 converts a sequence of 16 channels successively:
channel 15 to channel 0 and ADC2 converts a sequence of 16 channels successively:
channel 0 to channel 15.
Note:
This application note does not provide a firmware example. However the STM32 firmware
library provides an example of this mode at the following path:
\Project\STM32F10x_StdPeriph_Examples\ADC\RegSimul_DualMode.
Figure 7.
2.1.2
Example of application
The dual regular simultaneous mode can be used in applications where two signals should
be sampled and converted at the same time. For example, to measure and plot the single-
phase or three-phase instantaneous electrical power: p
Dual regular simultaneous mode
Doc ID 16840 Rev 1
Figure 7
shows how ADC1 and ADC2 convert two
(t) = u
n
Dual modes
(t) × i
(t).
n
n
9/18
Need help?
Do you have a question about the STM32 and is the answer not in the manual?
Questions and answers