Ultralow-power comparator (COMP)
The device embeds an ultralow-power comparator (COMP). It can be used for a variety of functions including:
- Wake-up 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
The COMP main features are:
- Selectable inverting analog inputs:
- I/O pins
- DAC channel output
- Internal reference voltage and three submultiple values (1/4, 1/2, 3/4) provided by the scaler (buffered voltage divider)
- I/O pins selectable as noninverting analog inputs
- Programmable hysteresis
- Programmable speed/consumption
- Mapping of outputs to I/Os
- Redirection of outputs to timer inputs for triggering:
- Capture events
- OCREF_CLR events (for cycle-by-cycle current control)
- Break events for fast PWM shutdowns
- Blanking of comparator outputs
- Interrupt generation capability with wake-up from Sleep and Stop modes (through the EXTI controller)
- Direct interrupt output to the CPU