AT32F421
Series Reference Manual
2022.11.11
Page 325
Rev 2.02
19.5.2 Glitch filter
The interference filter can be used to filter glitches and noise.
The sensitivity of the filter is controlled by the H_PULSE_CNT and L_PULSE_CNT bits. The sensitivity
of the filter affects the number of the same consecutive sampling. The level change of a certain signal
would not be regarded as valid before the consecutive sampling is detected on the filter input.
and
shows the timing diagram when the H_PULSE_CNT and L_PULSE_CNT
are with different values.
Figure 19-2 Glitch filter timing when H_PULSE_CNT=1 and L_PULSE_CNT =0
2 consecutive
samples
PCLK
input
Filter output
filter
Figure 19-3 Glitch filter timing when H_PULSE_CNT=2 and L_PULSE_CNT =1
3 consecutive
samples
PCLK
input
Filter output
filter
2 consecutive
samples
19.6 CMP registers
These registers must be accessed by words (32 bits).
Table 19-1 CMP register map and reset values
Register name
Offset
Reset value
CMP_CTRLSTS1
0x00
0x0000 0080
CMP_CTRLSTS2
0x04
0x0001 0001