415
CHAPTER 18 INTERRUPT FUNCTIONS AND TEST FUNCTIONS
18.4.2 Maskable interrupt request acceptance operation
A maskable interrupt request can be accepted when the interrupt request flag is set to 1 and the corresponding
mask flag (MK) is cleared to 0. A vectored interrupt request is accepted in the interrupt enabled status (when the
IE flag is set to 1). However, an interrupt with a lower priority cannot be accepted while an interrupt with a higher
priority is being processed (when the ISP flag is reset to 0).
The time required to start the interrupt processing after a maskable interrupt request has been generated is as
follows:
For the timing of interrupt request acceptance, refer to
Figures 18-3
and
18-4.
Table 18-3. Time from Generation of Maskable Interrupt Request to Processing
Minimum Time
Maximum Time
Note
When xxPR = 0
13 clocks
63 clocks
When xxPR = 1
15 clocks
65 clocks
Note
The wait time is maximum when an interrupt request is generated
immediately before a division instruction.
Remark
1 clock :
(f
CPU
: CPU clock)
When two or more maskable interrupt requests are generated at the same time, they are accepted starting from
the one assigned the highest priority by the priority specification flag. When interrupts are assigned the same priority,
the default priority takes precedence.
A pended interrupt is accepted when the status where it can be accepted is set.
Figure 18-12 shows the algorithm of accepting interrupts.
When a maskable interrupt request is accepted, the program status word (PSW) and program counter (PC) are
saved to the stack in that order, IE flag is reset to 0, and the content of the interrupt priority specification flag of the
accepted interrupt is transferred to the ISP flag. In addition, the data in the vector table determined for each interrupt
request is loaded to the PC, and execution branches.
To return from interrupt processing, use the RETI instruction.
1
f
CPU