STMicroelectronics STM32F05 series Reference Manual page 220

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

Comparator (COMP)
Bit 23 WNDWEN: Window mode enable
Bits 22:20 COMP2INSEL[2:0]: Comparator 2 inverting input selection
Bits 19:18 COMP2MODE[1:0]: Comparator 2 mode
Bit 17 Reserved, must be kept at reset value.
Bit 16 COMP2EN: Comparator 2 enable
Bit 15 COMP1LOCK: Comparator 1 lock
Bit 14 COMP1OUT: Comparator 1 output
Bits 13:12 COMP1HYST[1:0] Comparator 1 hysteresis
Bit 11 COMP1POL: Comparator 1 output polarity
220/742
This bit connects the non-inverting input of COMP2 to COMP1's non-inverting input,
which is simultaneously disconnected from PA3.
0 : Window mode disabled
1 : Window mode enabled
These bits allows to select the source connected to the inverting input of the
comparator 2.
000: 1/4 of Vrefint
001: 1/2 of Vrefint
010: 3/4 of Vrefint
011: Vrefint
100: COMP2_INM4 (PA4 or DAC if enabled)
101: COMP2_INM5 (PA5)
110: COMP2_INM6 (PA2)
111: Reserved
These bits control the operating mode of the comparator2 and allows to adjust the
speed/consumption.
00: High speed
01: Medium speed
10: Low power
11: Ultra-low power
This bit switches ON/OFF the comparator2.
0 : Comparator 2 disabled
1 : Comparator 2 enabled
This bit is write-once. It is set by software. It can only be cleared by a system reset.
It allows to have all control bits of comparator 1 as read-only.
0 : COMP_CSR[15:0] bits are read-write.
1 : COMP_CSR[15:0] bits are read-only.
This read-only bit is a copy of comparator 1 output state.
0 : Output is low (non-inverting input below inverting input).
1 : Output is high (non-inverting input above inverting input).
These bits are controlling 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.
This bit is used to invert the comparator 1 output.
0 : output is not inverted
1 : output is inverted
Doc ID 018940 Rev 1
RM0091

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F05 series and is the answer not in the manual?

Table of Contents