CHAPTER 17 INTERRUPT FUNCTIONS AND TEST FUNCTION
314
17.4.4 Multiple interrupt servicing
Acknowledging another interrupt request while an interrupt is processed is called multiple interrupts.
A multiple interrupt is not generated unless the interrupt request is enabled (IE = 1) (except the non-maskable
interrupt). When an interrupt request is acknowledged, the other interrupts are disabled (IE = 0). To enable
a multiple interrupt, therefore, the IE flag must be set to 1 by executing the EI instruction during interrupt
processing and the interrupt must be enabled.
Even if the interrupt request is enabled, some multiple instructions are not acknowledged. However, the
multiple instructions are controlled by the programmable priority. An interrupt has two types of priorities: default
priority and programmable priority. The multiple interrupt is controlled by the programmable priority.
In the EI status, if an interrupt request having the same or higher priority than that of the interrupt currently
processed is generated, the interrupt is acknowledged as multiple interrupt. If an interrupt request with a priority
lower than that of the interrupt currently processed is generated, the interrupt is not acknowledged as multiple
interrupt.
If an interrupt is disabled, or if a multiple interrupt is not acknowledged because it has a low priority, the
interrupt is kept pending. After the processing of the current interrupt has been completed, and after one
instruction of the main processing has been executed, the pending interrupt is acknowledged.
Multiple interrupts are not acknowledged while the non-maskable interrupt is processed.
Table 17-4 shows interrupt requests enabled for multiple interrupts. Figure 17-15 shows multiple interrupt
examples.
Table 17-4. Interrupt Request Enabled for Multiple Interrupt during Interrupt Servicing
Multiple Interrupt Request
Non-Maskable
Interrupt Request
Maskable Interrupt Request
xxPR = 0
xxPR = 1
Servicing Interrupt
IE = 1
IE = 0
IE = 1
IE = 0
Non-maskable interrupt
D
D
D
D
D
Maskable interrupt
ISP = 0
E
E
D
D
D
ISP = 1
E
E
D
E
D
Software interrupt
E
E
D
E
D
Remarks 1.
E
: Multiple interrupt enable
D : Multiple interrupt disable
2.
ISP and IE are flags included in PSW.
ISP = 0 : High-priority interrupt servicing
ISP = 1 : Interrupt request is not acknowledged or low-priority interrupt servicing
IE = 0 : Interrupt request acknowledge disabled
IE = 1 : Interrupt request acknowledge enabled
3.
xxPR is a flag included in PR0L, PR0H.
xxPR = 0: High-priority flag
xxPR = 1: Low-priority flag