Datasheet
ST72321Rx ST72321ARx ST72321Jx
29/193
SYSTEM INTEGRITY MANAGEMENT (Cont’d)
6.4.2 Auxiliary Voltage Detector (AVD)
The Voltage Detector function (AVD) is based on
an analog comparison between a V
IT-(AVD)
and
V
IT+(AVD)
reference value and the V
DD
main sup-
ply or the external EVD pin voltage level (V
EVD
).
The V
IT-
reference value for falling voltage is lower
than the V
IT+
reference value for rising voltage in
order to avoid parasitic detection (hysteresis).
The output of the AVD comparator is directly read-
able by the application software through a real
time status bit (AVDF) in the SICSR register. This
bit is read only.
Caution: The AVD function is active only if the
LVD is enabled through the option byte.
6.4.2.1 Monitoring the V
DD
Main Supply
This mode is selected by clearing the AVDS bit in
the SICSR register.
The AVD voltage threshold value is relative to the
selected LVD threshold configured by option byte
(see section 14.1 on page 175).
If the AVD interrupt is enabled, an interrupt is gen-
erated when the voltage crosses the V
IT+(AVD)
or
V
IT-(AVD)
threshold (AVDF bit toggles).
In the case of a drop in voltage, the AVD interrupt
acts as an early warning, allowing software to shut
down safely before the LVD resets the microcon-
troller. See Figure 16.
The interrupt on the rising edge is used to inform
the application that the V
DD
warning state is over.
If the voltage rise time t
rv
is less than 256 or 4096
CPU cycles (depending on the reset delay select-
ed by option byte), no AVD interrupt will be gener-
ated when V
IT+(AVD)
is reached.
If t
rv
is greater than 256 or 4096 cycles then:
– If the AVD interrupt is enabled before the
V
IT+(AVD)
threshold is reached, then 2 AVD inter-
rupts will be received: the first when the AVDIE
bit is set, and the second when the threshold is
reached.
– If the AVD interrupt is enabled after the V
IT+(AVD)
threshold is reached then only one AVD interrupt
will occur.
Figure 16. Using the AVD to Monitor V
DD
(AVDS bit=0)
V
DD
V
IT+(AVD)
V
IT-(AVD)
AVDF bit 0 0RESET VALUE
IF AVDIE bit = 1
V
hyst
AVD INTERRUPT
REQUEST
INTERRUPT PROCESS
INTERRUPT PROCESS
V
IT+(LVD)
V
IT-(LVD)
LVD RESET
Early Warning Interrupt
(Power has dropped, MCU not
not yet in reset)
1
1
t
rv
VOLTAGE RISE TIME