
ML671000 User’s Manual
Chapter 4 Interrupt Controller
4-14
4.4.2.2. Interrupt Sequence
1. Interrupt request:
An external interrupt request or an internal one from the on-chip peripherals arrives.
2. Interrupt request flag:
The interrupt controller notes the request by setting the corresponding bit in the interrupt
request registers (IRR0 and IRR1) to “1.”
3. Exception request to CPU:
If the interrupt level is not 0, the mask state, the interrupt controller processes the interrupt
request with the following three steps.
If there any interrupt requests with interrupt levels higher than that in the current
interrupt level register (CILR), the interrupt controller asserts the nIRQ signal to produce
an IRQ exception request to the CPU.
The interrupt controller copies the highest such interrupt level found among the pending
interrupt requests to the interrupt request level register (IRLR).
The interrupt controller copies the interrupt number, determined using the procedure in
step (2) in Section 4.4.2.1 “Interrupt Priority Levels” above, to the interrupt number
register (INR).
4. Exception acceptance:
If the CPU is ready to accept the exception—that is, the I bit in the current program status
register (CPSR) enables IRQ exceptions—it switches to the IRQ exception handler and sets the
I bit in CPSR to “1” to disable further IRQ exceptions.
5. Source determination:
The IRQ handler reads the interrupt number from the interrupt controller's interrupt number
register (INR) and sets the CILR bit corresponding to that interrupt level to “1,” negating the
nIRQ signal.
6. Handler:
In addition to the normal interrupt processing, the IRQ handler executes the following steps.
It prepares to accept interrupt requests with interrupt levels even higher than the one
currently being processed by saving the link register (R14_irq) and the saved program
status register (SPSR_irq) to the stack.
It resets the I bit in CPSR to “0” to enable further IRQ exceptions.
It writes “1” to the corresponding interrupt request flag in the interrupt request registers
(IRR0 and IRR1) to clear the interrupt request.
7. Return from interrupt:
The CPU resets the CILR bit for the current interrupt level to “0” and executes the return from
interrupt instruction.