24 I/O PORTS (GPIO)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
24-7
Interrupt mode and polarity selection
The GPIO module provides two interrupt modes to set the interrupt flags: edge trigger mode and level trigger
mode. The interrupt mode for each FPT line can be selected using SEPT
n
/GPIO_FPT
nn
_MOD register.
When SEPT
n
bit is set to 1 (default), the corresponding port is set to edge trigger mode. In edge trigger mode,
the interrupt flag is set at the active edge of the input signal and it retains 1 until reset via software.
When SEPT
n
is set to 0, the corresponding port is set to level trigger mode. In level trigger mode, the interrupt
flag is set when the input signal goes the active level and it retains 1 until reset via software.
SLEEP mode can be canceled by causing a port input interrupt regardless of how the GPIO interrupt mode (edge
trigger/level trigger) is set.
The active level/edge of the input signal can be selected using SPPT
n
/GPIO_FPT
nn
_POL register.
When SPPT
n
is set to 1 (default), high level (in level trigger mode) or rising edge (in edge trigger mode) is se-
lected.
When SPPT
n
is set to 0, low level (in level trigger mode) or falling edge (in edge trigger mode) is selected.
5.5 Port input Interrupt Conditions
Table 24.
SEPT
n
SPPT
n
Port input interrupt condition
1
1
Rising edge input
1
0
Falling edge input
0
1
High level input
0
0
Low level input
Interrupt flags
The port interrupt circuit provides 16 interrupt flags (SFGP
n
/GPIO_FPT
nn
_FLG register) corresponding to the
FPT interrupt ports.
In level trigger mode, the interrupt flag is set according to the input signal level.
In edge trigger mode, the interrupt flag is set at the active edge of the input signal.
The interrupt flag must be reset by writing 1 after an interrupt occurs.
Interrupt enable bits
Each FPT interrupt port can be enabled or disabled to generate interrupts using the corresponding interrupt en-
able bit (SIET
n
/GPIO_FPT
nn
_MSK register).
To use port input interrupts, the interrupt port pins must be configured as an I/O port using the corresponding
port function select bits. Before setting SIET
n
to 1, the corresponding SFGP
n
must be cleared to 0.
To enable interrupts, set SIET
n
to 1. To disable interrupts, set SIET
n
to 0.
When SFGP
n
is set to 1 while the corresponding SIET
n
is set to 1, an interrupt request signal is output to the
ITC. An interrupt is generated if the ITC and C33 PE Core interrupt conditions are satisfied.
For specific information on interrupt processing, see the “Interrupt Controller (ITC)” chapter.
DMA trigger
An FPT interrupt port can be selected as a DMA trigger source using the SPTRG[3:0]/GPIO_DMA register.
5.6 DMA Trigger Source Selection
Table 24.
SPTRG[3:0]
Trigger source
SPTRG[3:0]
Trigger source
0xf
FPTF
0x7
FPT7
0xe
FPTE
0x6
FPT6
0xd
FPTD
0x5
FPT5
0xc
FPTC
0x4
FPT4
0xb
FPTB
0x3
FPT3
0xa
FPTA
0x2
FPT2
0x9
FPT9
0x1
FPT1
0x8
FPT8
0x0
FPT0
(Default: 0x0)
The interrupt signal of the selected FPT line, which is generated according to the interrupt mode and polarity
settings regardless of the SIET
n
setting (even if the interrupt is disabled), is sent to the DMAC to trigger a DMA
transfer. For more information on DMA transfer, see the “DMA Controller (DMAC)” chapter.