Analog watchdog during Stop mode
AN3248
8/19
Doc ID 17758 Rev 1
2
Analog watchdog during Stop mode
The ADC in the STM32L family can be used as an analog watchdog with programmable
high and low thresholds. Nevertheless, the MCU must be kept in Run mode to be able to
watch analog voltage on input since the ADC is powered off in Stop mode. For ultra low
power STM32L15xxx devices, two analog comparators, COMP1 and COMP2, can be
combined in window mode and used as an analog watchdog that remains powered on while
the MCU is stopped. Consequently, lower consumption is achieved and power is saved.
Figure 5
displays the configuration of two such analog comparators in window mode.
Threshold1 is set to the internal reference voltage, V
REFINT
, and threshold2 is configurable
among V
REFINT
, 3/4 V
REFINT
, 1/2 V
REFINT
, 3/4 V
REFINT
, DAC_OUT1, DAC_OUT2, or the
external pin PB3. The analog input voltage can be applied on group 6 of the analog switches
(PB4 or PB5).
Figure 5.
Analog comparators combined in window mode
Note:
DAC_OUT1 and DAC_OUT2 cannot be used in Stop mode since the DAC peripheral is
powered off.
7.$%
0"
4HRESHOLD
MULTIPLESOURCES
#/-0
#/-0
0"
'2
'2
#-0/54
%84)LINE
#-0/54
7AKEUP
%84)LINE
0"
$!#?/54
$!#?/54
62%&).4
62%&).4
62%&).4
62%&).4
)NPUTVOLTAGE
7AKEUP
4HRESHOLD
62%&).46
AI