173
CHAPTER 12 INTERRUPT FUNCTIONS
User’s Manual U15104EJ2V0UD
12.4.4 Multiple interrupt servicing
The acknowledgement of another interrupt request while an interrupt is being serviced is called multiple interrupt
servicing.
Multiple interrupt servicing does not take place unless the interrupts (except the non-maskable interrupt) are abled
to be acknowledged (IE = 1). Acknowledging another interrupt request is disabled (IE = 0) when one interrupt has
been acknowledged. Therefore, to enable multiple interrupt servicing, the EI flag must be set to 1 during interrupt
servicing, to enable other interrupts.
Multiple interrupt servicing may not occur even when interrupts are enabled. This is controlled by the priorities
of the interrupts. Although two types of priorities, default priority and programmable priority, may be assigned to an
interrupt, multiple interrupt servicing is controlled by using the programmable priority.
If an interrupt with the same priority as or a higher priority than the interrupt currently being serviced occurs, that
interrupt can be acknowledged and serviced. If an interrupt with a priority lower than that of the interrupt currently
being serviced occurs, that interrupt cannot be acknowledged and serviced.
An interrupt that is not acknowledged and serviced because it is disabled or it has a low priority is held pending.
This interrupt is acknowledged after servicing of the current interrupt has been completed and one instruction of the
main routine has been executed.
Multiple interrupt servicing is not enabled while a non-maskable interrupt is being serviced.
Table 12-4 shows the interrupts that can enter multiple interrupt servicing, and Figure 12-13 shows an example
of multiple interrupt servicing.
Table 12-4. Interrupt Request Enabled for Multiple Interrupt Servicing During Interrupt Servicing
Maskable Interrupt Request
PR = 0
PR = 1
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 servicing
E
E
D
E
D
Remarks 1. E: Multiple interrupt servicing enabled
2. D: Multiple interrupt servicing disabled
3. ISP and IE are the flags contained in PSW
ISP = 0: An interrupt with higher priority is being serviced
ISP = 1: An interrupt request is not accepted or an interrupt with lower priority is
being serviced
IE = 0:
Interrupt request acknowledgement is disabled
IE = 1:
Interrupt request acknowledgement is enabled
4. PR is a flag contained in PR0L and PR0R.
PR = 0: Higher priority level
PR = 1: Lower priority level
Interrupt Being
Serviced
Multiple Interrupt
Request
Non-Maskable
Interrupt
Request
Содержание mPD178053
Страница 2: ...2 User s Manual U15104EJ2V0UD MEMO ...