Comparator (COMP)
26.3
COMP functional description
26.3.1
COMP block diagram
The block diagram of the comparators is shown in
COMPx_INP I/Os
COMPx_INM I/Os
DAC_CH1
DAC_CH2
3/4 V
1/2 V
1/4 V
26.3.2
COMP pins and internal signals
The I/Os used as comparators inputs must be configured in analog mode in the GPIOs
registers.
The comparator output can be connected to the I/Os using the alternate function channel
given in "Alternate function mapping" table in the datasheet.
The output can also be internally redirected to a variety of timer input 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 measures
It is possible to have the comparator output simultaneously redirected internally and
externally.
PC5
PB2
¼ V
REFINT
½ V
REFINT
806/2301
Figure 183. Comparator block diagram
COMPx_INPSEL
COMPx_INP
COMPx_INM
COMPx_
INMSEL
V
REFINT
REFINT
REFINT
REFINT
Table 171. COMP1 input plus assignment
COMP1_INP
Table 172. COMP1 input minus assignment
COMP1_INM
Figure 183: Comparator block
COMPx_POL
+
COMPx
-
Polarity selection
RM0432 Rev 6
GPIO
alternate
function
COMPx_OUT
COMPx_VALUE
Wakeup EXTI line
interrupt
TIMERS
COMP1_INPSEL
0
1
COMP1_INMSEL[2:0]
000
001
RM0432
diagram.
MS34498V1
Need help?
Do you have a question about the STM32L4+ Series and is the answer not in the manual?