Samsung C8278X ユーザーズマニュアル

ページ / 324
INTERRUPT STRUCTURE   
 
 
S3C8275X/F8275X/C8278X/F8278X/C8274X/F8274X 
5-14  
 
INTERRUPT PENDING FUNCTION TYPES 
Overview 
There are two types of interrupt pending bits: one type that is automatically cleared by hardware after the interrupt 
service routine is acknowledged and executed; the other that must be cleared in the interrupt service routine. 
Pending Bits Cleared Automatically by Hardware 
For interrupt pending bits that are cleared automatically by hardware, interrupt logic sets the corresponding 
pending bit to "1" when a request occurs. It then issues an IRQ pulse to inform the CPU that an interrupt is waiting 
to be serviced. The CPU acknowledges the interrupt source by sending an IACK, executes the service routine, 
and clears the pending bit to "0". This type of pending bit is not mapped and cannot, therefore, be read or written 
by application software. 
Pending Bits Cleared by the Service Routine 
The second type of pending bit is the one that should be cleared by program software. The service routine must 
clear the appropriate pending bit before a return-from-interrupt subroutine (IRET) occurs. To do this, a "0" must be 
written to the corresponding pending bit location in the source’s mode or control register.   
 
Programming Tip 
 How to clear an interrupt pending bit 
As the following examples are shown, a load instruction should be used to clear an interrupt pending bit. 
Examples:   
 
1. SB0 
LD   
EXTIPND, #11111011B 
  ; Clear P0.2's interrupt pending bit 
• 
• 
• 
IRET