INTERRUPTS

KS57C2308/P2308/C2316/P2316

 

 

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

1

0

 

 

 

current settings in the IPR register are serviced.

 

 

 

 

 

 

 

 

2

1

0

No additional interrupt requests will be serviced.

 

 

 

 

 

 

1

1

Value undefined

 

 

 

 

 

 

Normal Program

Processing

(Status 0)

Single

Interrupt

2-Level

INT Disable

SET IPR

INT Enable

Low or High Level Interrupt Generated

INT Disable

Modify Status INT Enable

Low or High Level Interrupt Generated

Interrupt

Status 1

Status 0

High-Level

Status 1

Interrupt

Generated

 

3-Level

Interrupt

Status 2

Status 0

Figure 7-4. Multi-Level Interrupt Handling

7-6

Page 190
Image 190
Samsung KS57C2308 manual Multi-Level Interrupt Handling