24 I/O PORTS (GPIO)
24-8
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
Note: After setting SCTP
n
[2:0]/GPIO_FPT
nn
_CHAT register, the port may send an undesired DMA trig-
ger to the DMAC. Disable the port DMA request for at least the wait time shown below after the
GPIO_FPT
nn
_CHAT register is set.
Wait time [µs] = Filter sampling time [µs]
×
4
Example: When the filter sampling time is 64/f
PCLK2
and f
PCLK2
= 32 MHz
Wait time = 64
×
4 / 32 = 8 [µs]
The port DMA function can be used after waiting 8 µs or more when the GPIO_FPT
nn
_
CHAT register is set to 0x7.
Chattering Filters
Each FPT line includes a chattering filter circuit for key entry that can be disabled or enabled with a sampling
clock specified using SCTP
n
[2:0]/GPIO_FPT
nn
_CHAT register (
n
= 0 to F,
nn
= 01, 23, 45, 67, 89, AB, CD,
or EF).
When the chattering filter is enabled, glitches shorter than the filter sampling time
×
2 will be filtered as noise.
Pulses longer than the filter sampling time
×
4 will not be filtered and can generate input port interrupts. If filter
sampling time
×
2
≤
pulse width
≤
filter sampling time
×
4, the pulse may be filtered depending on the input
timing.
5.7 Chattering Filter Settings
Table 24.
SCTP
n
[2:0]
Filter sampling time
Invalid pulse (glitch) width
that will be filtered
Valid pulse width
that will be accepted
0x7
64/f
PCLK2
< 64/f
PCLK2
×
2
> 64/f
PCLK2
×
4
0x6
32/f
PCLK2
< 32/f
PCLK2
×
2
> 32/f
PCLK2
×
4
0x5
16/f
PCLK2
< 16/f
PCLK2
×
2
> 16/f
PCLK2
×
4
0x4
8/f
PCLK2
< 8/f
PCLK2
×
2
> 8/f
PCLK2
×
4
0x3
4/f
PCLK2
< 4/f
PCLK2
×
2
> 4/f
PCLK2
×
4
0x2
2/f
PCLK2
< 2/f
PCLK2
×
2
> 2/f
PCLK2
×
4
0x1
1/f
PCLK2
< 1/f
PCLK2
×
2
> 1/f
PCLK2
×
4
0x0
Not filtered
(Default: 0x0)
Notes: • The prescaler (PSC Ch.1) output is used as the filter clock. Make sure the prescaler (PSC
Ch.1) is turned on before using the chattering filter. Do not enable the chattering filter when
the prescaler (PSC Ch.1) is turned off, as undesired port input interrupts may be generated.
• The chattering filter stops operating in SLEEP mode, as no clock is supplied. In order to
cancel SLEEP mode using a port input interrupt, the chattering filter will be automatically by-
passed (Not filtered) in SLEEP mode until the CPU exits SLEEP mode even if the chattering
filter is set to on.
• Setting the GPIO_FPT
nn
_CHAT register while the interrupt is enabled may generate an unde-
sired port input interrupt. Therefore, the port input interrupt must be disabled before setting the
GPIO_FPT
nn
_CHAT register. Furthermore, be sure to clear the port input interrupt flag before
enabling the interrupt again after setting the GPIO_FPT
nn
_CHAT register. In this case, clear
the interrupt flag after the wait time shown below has elapsed from the GPIO_FPT
nn
_CHAT
register setting.
Wait time [µs] = Filter sampling time [µs]
×
4
Example: When the filter sampling time is 64/f
PCLK2
and f
PCLK2
= 32 MHz
Wait time = 64
×
4 / 32 = 8 [µs]
The port input interrupt flag should be cleared after waiting 8 µs or more when the GPIO_
FPT
nn
_CHAT register is set to 0x7.