Comparator (COMP)
RM0365
419/1080
DocID025202 Rev 7
Bits 13:10
COMP4OUTSEL[3:0]
: Comparator 4 output selection
These bits select which Timer input must be connected with the comparator4 output.
0000: No timer input selected
0001: (BRK) Timer 1 break input
0010: (BRK2) Timer 1 break input 2
0011: Reserved
0100: Reserved
0101: Timer 1 break input 2
0110: Timer 3 input capture 3
0111: Reserved
1000: Timer 15 input capture 2
1001: Timer 4 input capture 2
1010: Timer 15 OCREF_CLR input
1011: Timer 3 OCrefclear input
Remaining combinations: reserved.
Note: Depending on the product, when a timer is not available, the corresponding combination is
reserved.
Bits 9:8 Reserved, must be kept at reset value.
Bit 7
COMP4INPSEL
: Comparator 4 non inverting input selection
0: PB0
1: PE7
Note: On STM32F302x6/8 and STM32F302xD/E, this bit is reserved. COMP4_VINP is available on
PB0 whatever value is written in bit 7.
Bits 6:4
COMP4INMSEL[2:0]
: Comparator 4 inverting input selection
These bits allows to select the source connected to the inverting input of the comparator 4.
0000: 1/4 of Vrefint
0001: 1/2 of Vrefint
0010: 3/4 of Vrefint
0011: Vrefint
0100: PA4 or DAC1_CH1 output if enabled
0101: PA5 (only on STM32F302xB/C/D/E)
0110: PE8
0111: PB2
Remaining combinations: reserved.
Bits 3:2
COMP4MODE[1:0]
: Comparator 1 mode (only in STM32F302xB/C devices)
These bits control the operating mode of the comparator 4 and allows to adjust the
speed/consumption.
00: Ultra-low-power
01: Low-power
10: Medium speed
11: High speed
Bit 1 Reserved, must be kept at reset value.
Bit 0
COMP4EN
: Comparator 4 enable
This bit switches COMP4 ON/OFF.
0: Comparator 4 disabled
1: Comparator 4 enabled