TC1796
Peripheral Units (Vol. 2 of 2)
General Purpose Timer Array (GPTA)
User’s Manual
24-13
V2.0, 2007-07
GPTA, V2.0
Delayed Debounce Filter Mode
In Delayed Debounce Filter Mode, the signal input SIN is filtered from all signal
transitions and glitches with a width smaller than the selected clock period length
multiplied by the compare register value.
The input signal SIN (sampled with
f
GPTA
) is analyzed at the selected filter clock rate of
CIN. If the state of the input sample differs from the current output signal value, the 16-bit
timer is incremented by one. When the timer register FPCTIMk is not in its idle state
(0000
H
)
and
the state of the input sample matches the current output signal value, the
16-bit timer is decremented by one (see
); if bit FPCCTRk.RTG is set, the
timer will be set to idle state again (see
). A rising or falling edge, occurring
on the signal input line SIN when 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). When the timer matches the 16-bit compare
value stored in FPCCTRk.CMP (timer threshold), the level output signal line SOLk is
inverted, a GPTA module clock pulse is generated at the trigger output signal SOTk, and
the timer is reset to 0000
H
. The rising/falling edge glitch flags must be cleared by
software.
The filter is by-passed 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.
Figure 24-6 FPC Delayed Debounce Filter Algorithm with Timer Decrement
must be cleared
by software
MCT05915
Total Signal Delay
Timer Threshold
Signal Input
SIN
Timer Value
FPCCTRk.TIM
Level Output
SOLk
FPCSTAT.FEGk
FPCSTAT.REGk
Trigger Output
SOTk