212
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
9.3.7
Timing diagram
When ADC_CTRL2.ON is set to 1 for the first time, the ADC is powered on. After the ADC is powered on, the ADC
needs a certain time(t
STAB
) to ensure its stability. After the ADC is stable, write 1 to ADC_CTRL2.ON again, the
ADC starts to convert, and the conversion end flag will be set to 1 after the conversion is completed.
Figure 9-5 Timing diagram
9.3.8
Analog watchdog
The analog watchdog can be enabled on the regular channel by setting ADC_CTRL1.AWDGERCH to 1, or the
analog watchdog on the injection channel can be enabled by setting ADC_CTRL1.AWDGEJCH to 1. The high
threshold of the analog watchdog can be set by configuring ADC_WDGHIGH.HTH, and the low threshold of the
analog watchdog can be set by configuring ADC_WDGLOW.LTH. The threshold of the analog watchdog has nothing
to do with the way of data alignment, because the comparison of the ADC's conversion value with the threshold is
done before the alignment . When the value of ADC analog conversion is higher than the high threshold of the analog
watchdog or lower than the low threshold of the analog watchdog, the analog watchdog flag (ADC_STS.AWDG)
will be set to 1, if ADC_CTRL1.AWDGIEN has been configured to 1, an interrupt will be generated at this time. The
analog watchdog can be controlled for one or more channels by configuring ADC_CTRL1.AWDGSGLEN and
ADC_CTRL1.AWDGCH[4:0].
Table 9-2 Analog watchdog channel selection
Channel
ADC_CTRL1 register control bit
AWDGSGLEN
AWDGERCH
AWDGEJCH
Set ON to 1
ADC_CLK
ADC Conversion
Next ADC Conversion
Conversion Time
(
total conv time
)
ADC
ENDC
Start first
conversion
t
STAB
Start next conversion
ADC power on
ENDC is set to 0 by software