English
Language : 

RM0365 Datasheet, PDF (414/1076 Pages) STMicroelectronics – This reference manual targets application developers
RM0365
Comparator (COMP)
31
30 29 28 27 26
25
COMP COMP
2LOCK 2OUT
Res.
Res.
Res.
Res.
Res.
rwo
r
15
14
13
12
11
10
9
COMP
2POL
Res.
COMP2OUTSEL[3:0]
COMP2
WIN
MODE
(2)
rw
rw
rw
rw
rw
rw
1. Only in STM32F302xB/C devices.
2. Only in STM32F302xB/C/D/E devices.
3. Only in STM32F302x6/8 devices.
24
Res.
8
Res.
23
Res.
22
Res.
7
6
21
Res.
5
20
19
18
COMP2_BLANKING[2:0]
rw
rw
rw
4
3
2
17
16
COMP2HYST
[1:0](1)
rw
rw
1
0
COMP2
INPSEL
(1)
COMP2INMSEL[2:0]
COMP2MODE
[1:0](1)
COMP2
_INP_D COMP2
AC(3)
EN
rw
rw
rw
rw
rw
rw
rw
rw
Bit 31 COMP2LOCK: Comparator 2 lock
This bit is write-once. It is set by software. It can only be cleared by a system reset.
It allows to have COMP2_CSR register as read-only.
0: COMP2_CSR is read-write.
1: COMP2_CSR is read-only.
Bit 30 COMP2OUT: Comparator 2 output
This read-only bit is a copy of comparator 1output state.
0: Output is low (non-inverting input below inverting input).
1: Output is high (non-inverting input above inverting input).
Bits 29:21 Reserved, must be kept at reset value.
Bits 20:18 COMP2_BLANKING[2:0]: Comparator 2 output blanking source
These bits select which Timer output controls the comparator 1 output blanking.
000: No blanking
001: TIM1 OC5 selected as blanking source
010: TIM2 OC3 selected as blanking source
011: TIM3 OC3 selected as blanking source
Other configurations: reserved
Bits 17:16 COMP2HYST[1:0]: Comparator 2 Hysteresis
On the STM32F302xB/C, these bits control the hysteresis level.
00: No hysteresis
01: Low hysteresis
10: Medium hysteresis
11: High hysteresis
Please refer to the electrical characteristics for the hysteresis values.
On the STM32F302x6/8, these bits are reserved and must be kept at reset value.
Bit 15 COMP2POL: Comparator 2 output polarity
This bit is used to invert the comparator 2 output.
0: Output is not inverted
1: Output is inverted
Bit 14 Reserved, must be kept at reset value.
DocID025202 Rev 4
414/1077
421