INTERRUPTS KS57C2308/P2308/C2316/P2316
7-6
Multi-Level Interrupt Handling
With multi-level interrupt handling, a lower-priority interrupt request can be executed by manipulating the
interrupt status flags, IS0 and IS1 while a high-priority interrupt is being serviced (see Table 7-2).
When an interrupt is requested during normal program execution, interrupt status flags IS0 and IS1 are set to "1"
and "0", respectively. This setting allows only highest-priority interrupts to be serviced. When a high-priority
request is accepted, both interrupt status flags are then cleared to "0" by software so that a request of any priority
level can be serviced. In this way, the high- and low-priority requests can be serviced in parallel (see Figure 7-4).
Table 7-2. IS1 and IS0 Bit Manipulation for Multi-Level Interrupt Handling
Process Status Before INT Effect of Isx Bit Setting After INT ACK
IS1 IS0 IS1 IS0
0 0 0 All interrupt requests are serviced. 0 1
1 0 1 Only high-priority interrupts as determined by the
current settings in the IPR register are serviced. 1 0
2 1 0 No additional interrupt requests will be serviced. – –
1 1 Value undefined – –
INT Disable
SET IPR
INT Enable
Low or High
Level
Interrupt
Generated
Normal Program
Processing
(Status 0)
Low or High
Level Interrupt
Generated
Single
Interrupt
2-Level
Interrupt
Status 1
INT Enable
Modify Status
High-Level
Interrupt
Generated
3-Level
Interrupt
Status 0
Status 2
INT Disable
Status 0
Status 1
Figure 7-4. Multi-Level Interrupt Handling