24 I/O PORTS (GPIO)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
24-21
8.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
bypassed (Not filtered) in SLEEP mode until the CPU exits SLEEP mode even if the chatter-
ing filter is set to on.
• Setting the GPIO_FPT
nn
_CHAT register while the interrupt is enabled may generate an
undesired 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 inter-
rupt 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.
FPT2–3 Interrupt Chattering Filter Control Register (GPIO_FPT23_CHAT)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
FPT2–3
Interrupt
Chattering
Filter Control
Register
(GPIO_FPT23_
CHAT)
0x300345
(8 bits)
D7
–
reserved
–
–
–
0 when being read.
D6–4 SCTP3[2:0] FPT3 chattering filter time select
SCTP3[2:0]
Filter sampling
time
0x0 R/W
0x7
0x6
0x5
0x4
0x3
0x2
0x1
0x0
64/f
PCLK2
32/f
PCLK2
16/f
PCLK2
8/f
PCLK2
4/f
PCLK2
2/f
PCLK2
1/f
PCLK2
None
D3
–
reserved
–
–
–
0 when being read.
D2–0 SCTP2[2:0] FPT2 chattering filter time select
SCTP2[2:0]
Filter sampling
time
0x0 R/W
0x7
0x6
0x5
0x4
0x3
0x2
0x1
0x0
64/f
PCLK2
32/f
PCLK2
16/f
PCLK2
8/f
PCLK2
4/f
PCLK2
2/f
PCLK2
1/f
PCLK2
None
D7
Reserved
D[6:4]
SCTP3[2:0]: FPT3 Chattering Filter Time Select Bits
Configures the chattering filter circuit for the FPT3 port.