AT32F421
Series Reference Manual
2022.11.11
Page 327
Rev 2.02
100: PA4
101: PA5
110: PA0
111: PA2
Bit 3: 2
CMPSSEL
0x0
rw
Comparator speed selection
This bit is used to control the operating mode of the
comparator in order to adjust speed and power
consumption.
00: High speed/maximum power consumption
01: Medium speed/medium power consumption
10: Low speed/low power consumption
11: Ultra-low speed/ ultra-low power consumption
Bit 1
CMPIS
0x0
rw
Comparator input shift
0: The switch is off.
1: The switch is on.
Note: This bit is used to enable the connection between
PA1 and PA4 on the comparator inverting input side It is
only used to re-direct signal to high-impedance input,
such as the non-inverting input of Comparator (high-
impedance switch).
Bit 0
CMPEN
0x0
rw
Comparator enable
This bit enables or disables a comparator.
0: Comparator disabled
1: Comparator enabled
19.6.2 Glitch filter enable register (G_FILTER_EN)
Bit
Register
Reset value
Type
Description
Bit 15: 1
Reserved
0x0000
resd
Kept at its default value.
Bit 0
GFE
0x0
rw
Glitch filter enable
0: No effect
1: Glitch filter enabled
19.6.3 Glitch filter high pulse count (HIGH-PULSE)
Bit
Register
Reset value
Type
Description
Bit 15: 6
Reserved
0x000
resd
Kept at its default value.
Bit 5: 0
H_PULSE_CNT
0x0
rw
High pulse Count
The level of the filter input signal must wait
H_PU1 cycles before becoming active input,
so that the output can turn high level.
0: 1 x pclk
1: 2 x pclk cycles
2: 3 x pclk cycles
……
62: 63 x pclk cycles
63: 64 x pclk cycles