RM0444 Rev 5 445/1390
RM0444 Comparator (COMP)
458
18 Comparator (COMP)
18.1 Introduction
The devices embed COMP1, COMP2, and COMP3 (the last on STM32G0B1xx and
STM32G0C1xx only) ultra-low-power comparators.
The comparators can be used for a variety of functions including:
• Wakeup from low-power mode triggered by an analog signal,
• Analog signal conditioning,
• Cycle-by-cycle current control loop when combined with a PWM output from a timer.
18.2 COMP main features
• Each comparator has configurable plus and minus inputs used for flexible voltage
selection:
– Multiplexed I/O pins
– DAC Channel1 and Channel2
– Internal reference voltage and three submultiple values (1/4, 1/2, 3/4) provided by
scaler (buffered voltage divider)
• Programmable hysteresis
• Programmable speed / consumption
• The outputs can be redirected to an I/O or to timer inputs for triggering:
– Break events for fast PWM shutdowns
• Comparator outputs with blanking source
• The two comparators can be combined in a window comparator
• Each comparator has interrupt generation capability with wakeup from Sleep and Stop
modes (through the EXTI controller)