
CH32V003
Reference Manual
V1.3
76
can only be used for a group of conversions.
4)
Continuous conversion
The continuous conversion mode of the ADC is entered by setting the CONT bit of the ADC_CTLR2 register
to 1. This mode starts another conversion as soon as the previous ADC conversion is finished, and the
conversion does not stop at the last channel of the selection group, but continues again from the first channel
of the selection group.
Start events include external trigger events and ADON positions.1 Combined with several conversions in the
previous single mode, they also include continuous single-channel conversions, and continuous scan mode
(triggered injection or automatic injection) conversions.
9.2.5 Simulating a watchdog
The AWD analog watchdog status bit is set if the analog voltage being converted by the ADC is below the low
threshold or above the high threshold. The threshold settings are located in the lowest 10 valid bits of the
ADC_WDHTR and ADC_WDLTR registers. The AWDIE bit of the ADC_CTLR1 register is set to allow the
corresponding interrupt to be generated.
Figure 9-4 Analog watchdog threshold area
Configure the AWDSGL, RAWDEN, IAWDEN and AWDCH[4:0] bits of the ADC_CTLR1 register to select
the channel for analog watchdog alerting, as related in the following table.
Table 9-4 Analog Watchdog Channel Selection
Simulation of watchdog
alert channel
ADC_CTLR1 register control bit
AWDSGL
RAWDEN
IAWDEN
AWDCH[4:0]
No vigilance
Ignore
0
0
Ignore
All injection channels
0
0
1
Ignore
All rule channels
0
1
0
Ignore
All injection and rule
channels
0
1
1
Ignore
Single injection channel
1
0
1
Determine the
channel
number
Single rule channel
1
1
0
Determine the
channel
number
Single injection and rule
channel
1
1
1
Determine the
channel
number
ADC_WDHTR
ADC_WDLTR
Alert Low
Threshold
Alert High
Threshold
Alert Area
Analog voltage
conversion values