3-20 Chapter 3 CPU
MB89190/190A series
3.4 Interrupts
3.4.4 Interrupt Processing Time
The time required to transfer control to the interrupt-processing routine after oc-
currence of an interrupt request is the time required to terminate the currently
executing instruction plus the interrupt handling time (time required for prepara-
tion for interrupt processing). This time is 30 instruction cycles max.
T Interrupt processing time
The duration from the time an interrupt request occurs and the interrupt is accepted to the time the
interrupt-processing routine is executed is the interrupt request sample wait time plus the interrupt
handling time.
Interrupt request sample wait time
Whether an interrupt request is currently occurring is determined by sampling the interrupt request at
the last cycle of each instruction.
Consequently, the CPU cannot recognize the interrupt request
during execution of each instruction.
The wait time is longest when an interrupt request occurs
immediately after starting execution of the
DIVU instruction with the longest execution cycle (21
instruction cycles).
Interrupt handling time
The CPU requires nine instruction cycles to prepare for the next interrupt processing after acceptance
of the interrupt:
– Saving program counter (PC) and program status (PS)
– Setting interrupt-processing routine starting address (interrupt vector) at PC
– Updating interrupt level bits (PS: CCR: IL1, 0) in program status (PS)
Figure 3.4.4 shows the interrupt processing time.
Fig. 3.4.4 Interrupt Processing Time
When an interrupt request occurs immediately after starting execution of the
DIVU instruction with the
longest execution cycle (21 instruction cycles), the required interrupt processing time is 30 (21 + 9)
instruction cycles.
However, when the program uses neither the
DIVU instruction nor the MULU
instruction, the required interrupt processing time is 15 (6 + 9) instruction cycles max.
Reference:
The instruction cycle is changed using speed switching (gear function) of clock mode and
main clock. For details, see
Section 3.6.
Normal instruction
execution
Interrupt handling
Interrupt-processing
routine
Interrupt request
sample wait time
Interrupt handling time
(9 instruction cycles)
Occurrence of
interrupt request
CPU operation
Interrupt wait time
:
Last instruction cycle in which interrupt request sampled