This document describes six application cases of the two analog comparators embedded in the ultra low power STM32L1 product line. The application cases include: analog voltage monitoring, analog watchdog during Stop mode, pulse width measurement, pulse width modulation (PWM) signal control, capacitance measurement, and brightness control using a light dependent resistor (LDR). These application cases demonstrate the usefulness of analog comparators and show how they are integrated with other peripherals, such as the digital-to-analog converter (DAC) and timers.
This document details six application cases for the two analog comparators embedded in the STM32L1 product line. The cases cover analog voltage monitoring, analog watchdog usage during Stop mode, pulse width measurement, PWM signal control, capacitance measurement, and brightness control using a light dependent resistor (LDR).
The COMP2 output can be redirected to the input capture of timers TIM2, TIM3, TIM4, and TIM10.
Thresholds can be set to VREFINT, 3/4 VREFINT, 1/2 VREFINT, or 1/4 VREFINT.
The MCU exits Stop mode and switches to Run mode to reduce average power consumption.