5 INTERRUPT CONTROLLER (ITC)
S1C17F13 TeChniCal Manual
Seiko epson Corporation
5-5
(Rev. 1.0)
Interrupt Processing by the CPU
5.7
The CPU samples interrupt requests for each cycle. On accepting an interrupt request, the CPU switches to inter-
rupt processing immediately after execution of the current instruction has been completed.
Interrupt processing involves the following steps:
1. The PSR and current program counter (PC) values are saved to the stack.
2. The PSR IE bit is cleared to 0 (disabling subsequent maskable interrupts).
3. The PSR IL[2:0] bits are set to the received interrupt level. (The NMI does not affect the IL bits.)
4. The vector for the interrupt occurred is loaded to the PC to execute the interrupt handler routine.
When an interrupt is accepted, Step 2 prevents subsequent maskable interrupts. Setting the IE bit to 1 in the inter-
rupt handler routine allows handling of multiple interrupts. In this case, since the IL[2:0] bits are changed by Step 3,
only an interrupt with a higher level than that of the currently processed interrupt will be accepted.
Ending interrupt handler routines using the reti instruction returns the PSR to the state before the interrupt occurred.
The program resumes processing following the instruction being executed at the time the interrupt occurred.
Note: At wake-up from HALT or SLEEP mode, the CPU jumps to the interrupt handler routine after
executing one instruction. To execute the interrupt handler routine immediately after wake-up,
place the nop instruction at just behind the halt/slp instruction.
Control Registers
5.8
MiSC Vector Table address low Register
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
MSCTTBRL
15–8 TTBR[15:8]
0x80
H0
R/WP –
7–0 TTBR[7:0]
0x00
H0
R
Bits 15–0 TTBR[15:0]
These bits set the vector table base address (16 low-order bits).
MiSC Vector Table address high Register
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
MSCTTBRH
15–8 –
0x00
–
R
–
7–0 TTBR[23:16]
0x00
H0
R/WP
Bits 15–8 Reserved
Bits 7–0
TTBR[23:16]
These bits set the vector table base address (eight high-order bits).
iTC interrupt level Setup Register
x
Register name
Bit
Bit name
Initial
Reset
R/W
Remarks
ITCLV
x
15–11 –
0x00
–
R
–
10–8 ILV
y
1
[2:0]
0x0
H0
R/W
7–3 –
0x00
–
R
2–0 ILV
y
0
[2:0]
0x0
H0
R/W
Bits 15–11 Reserved
Bits 7–3
Reserved
Bits 10–8 ilV
y
1
[2:0]
(
y
1
= 2
x
+1)
Bits 2–0
ilV
y
0
[2:0]
(
y
0
= 2
x
)
These bits set the interrupt level of each interrupt.