January 2011
Doc ID 17758 Rev 1
1/19
AN3248
Application note
STM32L15xxx analog comparators
Introduction
This document describes six application cases of the two analog comparators embedded in
the ultra low power product line STM32L15xxx. The application cases are:
●
Analog voltage monitoring
●
Analog watchdog during Stop mode
●
Pulse width measurement
●
Pulse width modulation (PWM) signal control
●
Capacitance measurement
●
Brightness control using a light dependent resistor (LDR)
The six application cases demonstrate the usefulness of analog comparators and show how
they are integrated with other peripherals, for example, the digital-to-analog-converter (DAC)
and timers.
To ensure a quick start, four application cases presented in this document are implemented
in C language and are available in Project\STM32L1xx_StdPeriph_Examples\COMP within
the STM32L1xx_StdPeriph_Lib package.
Please note that this document is not intended to replace the routing interface (RI) and
comparator sections in the product reference manual RM0038.
The peripheral power consumption should be consulted in the device datasheets.
www.st.com