![](http://datasheet.mmic.net.cn/380000/-PD789830_datasheet_16744982/-PD789830_171.png)
CHAPTER 13 INTERRUPT FUNCTIONS
171
13.4.2 Maskable interrupt acceptance operation
A maskable interrupt can be accepted when the interrupt request flag is set to 1 and the corresponding interrupt
mask flag is cleared to 0. A vectored interrupt request is accepted in the interrupt enabled status (when the IE flag is
set to 1).
The time required to start the interrupt processing after a maskable interrupt request has been generated is
shown in Table 13-4.
See Figures 13-15 and 13-16 for the interrupt request acceptance timing.
Table 13-4. Time from Generation of Maskable Interrupt Request to Processing
Minimum Time
Maximum Time
Note
9 clocks
19 clocks
Note
The wait time is maximum when an interrupt request is generated immediately before BT and BF
instruction.
Remark
1 clock: 1
CPU
: CPU clock)
f
CPU
When two or more maskable interrupt requests are generated at the same time, they are accepted starting from
the interrupt request assigned the highest priority.
A pending interrupt is accepted when the status where it can be accepted is set.
Figure 13-14 shows the algorithm of accepting interrupt requests.
When a maskable interrupt request is accepted, the contents of PSW and PC are saved to the stack in that
order, the IE flag is reset to 0, and 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.
Figure 13-14. Interrupt Request Acceptance Program Algorithm
××
IF
××
MK : Interrupt mask flag
IE
: Flag to control maskable interrupt request acceptance (1 = enable, 0 = disable)
: Interrupt request flag
Start
××
IF = 1
××
MK = 0
IE = 1
Vectored Interrupt
Processing
Yes (Interrupt request generated)
Yes
Yes
No
No
No
Interrupt Request Pending
Interrupt Request Pending