Comparator (COMP)
For this purpose, the comparator control and status registers can be write-protected (read-
only).
Once the programming is completed, the COMPx LOCK bit can be set to 1. This causes the
whole register to become read-only, including the COMPx LOCK bit.
The write protection can only be reset by a MCU reset.
26.3.5
Window comparator
The purpose of window comparator is to monitor the analog voltage if it is within specified
voltage range defined by lower and upper threshold.
Two embedded comparators can be utilized to create window comparator. The monitored
analog voltage is connected to the non-inverting (plus) inputs of comparators connected
together and the upper and lower threshold voltages are connected to the inverting (minus)
inputs of the comparators. Two non-inverting inputs can be connected internally together by
enabling WINMODE bit to save one IO for other purposes.
26.3.6
Hysteresis
The comparator includes a programmable hysteresis to avoid spurious output transitions in
case of noisy signals. The hysteresis can be disabled if it is not needed (for instance when
exiting from low-power mode) to be able to force the hysteresis value using external
components.
808/2301
COMPx_INPSEL
COMPx_INP I/Os
COMPx_INMSEL
COMPx_INM I/Os
.
.
Internal sources
.
COMPx_INPSEL
COMPy_INP I/Os
COMPy_INMSEL
COMPy_INM I/Os
.
.
Internal sources
.
Figure 184. Window mode
WINMODE
RM0432 Rev 6
COMPx_INP
+
COMPx
COMPx_INM
-
COMPy_INP
+
COMPy
COMPy_INM
-
RM0432
MS35329V1
Need help?
Do you have a question about the STM32L4+ Series and is the answer not in the manual?