S1C88348/317/316/308 TECHNICAL HARDWARE
EPSON
I-145
5 PERIPHERAL CIRCUITS AND THEIR OPERATION (Interrupt and Standby Status)
At initial reset, the interrupt priority registers are
all set to "0" and each interrupt is set to level 0.
Furthermore, the priority levels in each system
have been previously decided and they cannot be
changed.
The CPU can mask each interrupt by setting the
interrupt flags (I0 and I1). The relation between the
interrupt priority level of each system and interrupt
flags is shown in Table 5.16.4.3, and the CPU
accepts only interrupts above the level indicated by
the interrupt flags.
The NMI (watchdog timer) that has level 4 priority,
is always accepted regardless of the setting of the
interrupt flags.
Table 5.16.4.3 Interrupt mask setting of CPU
After an interrupt has been accepted, the interrupt
flags are written to the level of that interrupt.
However, interrupt flags after an NMI has been
accepted are written to level 3 (I0 = I1 = "1").
Table 5.16.4.4 Interrupt flags after acceptance of interrupt
5.16.5 Exception processing vectors
When the CPU accepts an interrupt request, it starts
exception processing following completion of the
instruction being executed. In exception processing,
the following operations branch the program.
(1) In the minimum mode, the program counter
(PC) and system condition flag (SC) are moved
to stack and in the maximum mode, the code
bank register (CB), PC and SC are moved.
(2) The branch destination address is read from the
exception processing vector corresponding to
each exception processing (interrupt) factor and
is placed in the PC.
An exception vector is 2 bytes of data in which the
top address of each exception (interrupt) processing
routine has been stored and the vector addresses
correspond to the exception processing factors as
shown in Table 5.16.5.1.
Table 5.16.5.1 Vector address and exception
processing correspondence
The set interrupt flags are reset to their original
value on return from the interrupt processing
routine. Consequently, multiple interrupts up to 3
levels can be controlled by the initial settings of the
interrupt priority registers alone. Additional
multiplexing can be realized by rewriting the
interrupt flags and interrupt enable register in the
interrupt processing routine.
Note: Beware. If the interrupt flags have been
rewritten (set to lower priority) prior to
resetting an interrupt factor flag after an
interrupt has been generated, the same
interrupt will be generated again.
Note: An exception processing vector is fixed at 2
bytes, so it cannot specify a branch destination
bank address. Consequently, to branch from
multiple banks to a common exception process-
ing routine, the top portion of an exception
processing routine must be described within the
common area (000000H–007FFFH).
I1
I0
Acceptable interrupt
1
0
1
0
1
0
Level 4 (NMI)
Level 4, Level 3 (IRQ3)
Level 4, Level 3, Level 2 (IRQ2)
Level 4, Level 3, Level 2, Level 1 (IRQ1)
I1
I0
Accepted interrupt priority level
1
0
1
0
1
Level 4
(NMI)
Level 3
(IRQ3)
Level 2
(IRQ2)
Level 1
(IRQ1)
Vector
address
000000H
000002H
000004H
000006H
000008H
00000AH
00000CH
00000EH
000010H
000012H
000014H
000016H
000018H
00001AH
00001CH
00001EH
000020H
000022H
000024H
000026H
:
0000FEH
Priority
High
↑
↓
Low
No
priority
rating
Exception processing factor
Reset
Zero division
Watchdog timer (NMI)
Programmable timer 1 interrupt
Programmable timer 0 interrupt
K10, K11 input interrupt
K04–K07 input interrupt
K00–K03 input interrupt
Serial I/F error interrupt
Serial I/F receiving complete interrupt
Serial I/F transmitting complete interrupt
Stopwatch timer 100 Hz interrupt
Stopwatch timer 10 Hz interrupt
Stopwatch timer 1 Hz interrupt
Clock timer 32 Hz interrupt
Clock timer 8 Hz interrupt
Clock timer 2 Hz interrupt
Clock timer 1 Hz interrupt
System reserved (cannot be used)
Software interrupt