Simulating A Watchdog; Continuous Conversion; Analog Watchdog Threshold Area; Analog Watchdog Channel Selection - WCH CH32V003 Series Reference Manual

Table of Contents

Advertisement

CH32V003 Reference Manual
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.
Alert High
Threshold
Alert Low
Threshold
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.
Simulation of watchdog
alert channel
No vigilance
All injection channels
All rule channels
All injection and rule
channels
Single injection channel
Single rule channel
Single injection and rule
channel
V1.3
Figure 9-4 Analog watchdog threshold area
Analog voltage
conversion values
Alert Area
Table 9-4 Analog Watchdog Channel Selection
ADC_CTLR1 register control bit
AWDSGL
Ignore
0
0
0
1
1
1
76
RAWDEN
IAWDEN
0
0
0
1
1
0
1
1
0
1
1
0
1
1
http://wch.cn
ADC_WDHTR
ADC_WDLTR
AWDCH[4:0]
Ignore
Ignore
Ignore
Ignore
Determine the
channel
number
Determine the
channel
number
Determine the
channel
number

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents