![ARTERY AT32F435 Series Reference Manual Download Page 367](http://html1.mh-extra.com/html/artery/at32f435-series/at32f435-series_reference-manual_2977592367.webp)
AT32F435/437
Series Reference Manual
2022.11.11
Page 367
Rev 2.03
18.4.7.1 Status flag and interrupts
Each of the ADCs has its dedicated ADCx_STS registers, that is, RDY flag, OCCO flag, OCCS (ordinary
channel conversion start flag), PCCS (preempted channel conversion start flag), PCCE (preempted
channel conversion end flag), OCCE (ordinary channel conversion end flag) and VMOR (voltage monitor
out of range).
Three ADCx_STS registers are mapped onto the ADC_CSTS register, so it is possible to obtain the
status of these tree registers by simply reading the ADC_CSTS register.
OCCO, PCCE, CCE and VMOR have their respective interrupt enable bits. Once the interrupt bits are
enabled, the corresponding flag is set and an interrupt is sent to CPU. ADC1 shares an interrupt vector
with ADC2 and ADC3.
18.5 Master/Slave mode
If Master/Slave mode is enabled, the master is triggered to work with the slave to do the channel
conversion. The ADC_ODT register is used as a single interface obtaining the ordinary channel
converted data of master/salve ADC.
In a single master/slave mode, ADC1 acts as a master while ADC2 as a slave, and ADC3 behaves
independently. In dual master/slave mode, ADC1 acts as a master, while both ADC2 and ADC3 act as
slaves.
Note: ADC conversion abort (ADABRT) cannot be used in master/slave mode. In this mode, each of the
ADCEN bit of the ADCs must be cleared in order to stop ADC conversions.
Note: Both the master and slave must have the same resolution in order to avoid losing synchronization
between master and slave.
Note: To enable several ADC conversions with low resolution simultaneously, it is recommended to use
the master/slave mode together with DMA1 or DMA2.
Figure 18-13 Block diagram of m aster/salve m ode
Address/Data bus
ADCx_IN1
ADCx_IN0
ADCx_IN15
...
Temp.sensor
INTRV
BAT
V
V
Ordinary
conversion start
Preempted
conversion start
...
Common data register
(32 bits)
...
...
Preempted data register
(4*16 bits)
Ordinary data register
(16 bits)
Preempted data register
(4*16 bits)
Ordinary data register
(16 bits)
ADC1
ADC2
GPIO
ADC3
Preempted data register
(4*16 bits)
Ordinary data register
(16 bits)
Channel and
data
management
Channel and
data
management
Channel and
data
management
Slave
controller
DMA request