TC1796
Peripheral Units (Vol. 2 of 2)
General Purpose Timer Array (GPTA)
User’s Manual
24-15
V2.0, 2007-07
GPTA, V2.0
Immediate Debounce Filter Mode
In Immediate Debounce Filter Mode, the input signal is filtered from signal transitions
and glitches arriving a programmable time after an input signal edge detection (see
The input signal SIN is sampled with
f
GPTA
and the glitch edge detection is also
performed with
f
GPTA
. The further analysis (e.g. filter timer increment) is done at the
selected filter clock rate of CIN. As long as the timer is reset, the FPC control unit copies
the sampled input value directly to the level output signal line SOLk. When a rising or
falling edge occurs on the signal input line SIN and the 16-bit compare value
FPCCTRk.CMP is not zero, the timer is enabled to be incremented by the selected clock
and the copy mechanism is disabled. When the timer value FPCTIMk.TIM matches the
compare value FPCCTRk.CMP, the timer is reset and the copy mechanism is enabled
again. A rising or falling edge, occurring on SIN while the timer is greater than zero but
less than the compare value, sets the corresponding glitch flag FPCSTAT.REG (on
rising edge glitch) or FPCSTAT.FEG (on falling edge glitch). The rising/falling edge glitch
flags must be cleared by software.
The filter is bypassed if the compare value FPCCTRk.CMP is programmed to zero
(0000
H
). In this case, the input signal is directly copied to the output signal without any
disable periods.
Figure 24-8 FPC Immediate Debounce Filter Algorithm on Both Edges
must be cleared
by software
MCT05917
Edge Inhibition
Timer Threshold
Signal Input
SIN
Timer Value
FPCCTRk.TIM
Level Output
SOLk
FPCSTAT.FEGk
FPCSTAT.REGk
Trigger Output
SOTk