
S3C7559/P7559
INTERRUPTS
7-7
INTERRUPT PRIORITY REGISTER (IPR)
The 4-bit interrupt priority register (IPR) is used to control multi-level interrupt handling. Its reset value is logic
zero. Before the IPR can be modified by 4-bit write instructions, all interrupts must first be disabled by a DI
instruction.
FB2H
IME
IPR.2
IPR.1
IPR.0
By manipulating the IPR settings, you can choose to process all interrupt requests with the same priority level, or
you can select one type of interrupt for high-priority processing. A low-priority interrupt can itself be interrupted by
a high-priority interrupt, but not by another low-priority interrupt. A high-priority interrupt cannot be interrupted by
any other interrupt source.
Table 7-3. Standard Interrupt Priorities
The MSB of the IPR, the interrupt master enable flag (IME), enables and disables all interrupt processing. Even if
an interrupt request flag and its corresponding enable flag are set, a service routine cannot be executed until the
IME flag is set to logic one. The IME flag can be directly manipulated by EI and DI instructions, regardless of the
current enable memory bank (EMB) value.
Table 7-4. Interrupt Priority Register Settings
NOTE: During normal interrupt processing, interrupts are processed in the order in which they occur. If two or more
interrupts occur simultaneously, the processing order is determined by the default interrupt priority settings shown
in Table 7–3. Using the IPR settings, you can select specific interrupts for high-priority processing in the event of
contention. When the high-priority (IPR) interrupt has been processed, waiting interrupts are handled according to
their default priorities.
Interrupt
Default Priority
INTB, INT4
1
INT0
2
INT1
3
INTS
4
INTT0
5
INTT1
6
IPR.2
IPR.1
IPR.0
Result of IPR Bit Setting
0
Normal interrupt handling according to default priority settings
0
1
Process INTB and INT4 interrupts at highest priority
0
1
0
Process INT0 interrupts at highest priority
0
1
Process INT1 interrupts at highest priority
1
0
Process INTS interrupts at highest priority
1
0
1
Process INTT0 interrupts at highest priority
1
0
Process INTT1 interrupts at highest priority