RM0453
21.3
COMP functional description
21.3.1
COMP block diagram
The block diagram of the comparators is shown in the figure below.
COMPx_INP I/Os
COMPx_INMESEL
COMPx_INM I/Os
COMPx_INM I/Os
21.3.2
COMP pins and internal signals
The I/Os used as comparator inputs must be configured in analog mode in the GPIO
registers.
The comparator outputs can be connected to the I/Os through their alternate functions (refer
to the product datasheet).
The outputs can also be internally redirected to a variety of timer inputs for the following
purposes:
•
emergency shut-down of PWM signals, using BKIN and BKIN2 inputs
•
cycle-by-cycle current control, using OCREF_CLR inputs
•
input capture for timing measurements
The comparator output can be simultaneously redirected internally and externally.
Figure 94. Comparator block diagram
COMPx_INPSEL
COMPx_INP
COMPx_INM
COMPx_
INMSEL
DAC_CH1
V
REFINT
3/4 V
REFINT
1/2 V
REFINT
1/4 V
REFINT
Table 122. COMP1 input plus assignment
COMP1_INP
PB4
PB2
RM0453 Rev 1
COMPx_POL
+
COMPx
-
Polarity
selection
Comparator (COMP)
GPIO alternate
function
COMPx_OUT
COMPx_VALUE
Wakeup EXTI
line interrupt
Timers
MSv60765V1
COMP1_INPSEL
00
01
623/1461
633
Need help?
Do you have a question about the STM32WL5 Series and is the answer not in the manual?
Questions and answers