
MM912_634 Advance Information, Rev. 10.0
Freescale Semiconductor
181
5.30.5
Initialization/Application Information
5.30.5.1
Initialization
After system reset, software should:
1.
Initialize the interrupt vector base register if the interrupt vector table is not located at the default location
(0xFF80–0xFFF9).
2.
Enable I bit maskable interrupts by clearing the I bit in the CCR.
3.
Enable the X bit maskable interrupt by clearing the X bit in the CCR.
5.30.5.2
Interrupt Nesting
The interrupt request scheme makes it possible to nest I bit maskable interrupt requests handled by the CPU. I bit maskable
interrupt requests can be interrupted by an interrupt request with a higher priority.
I bit maskable interrupt requests cannot be interrupted by other I bit maskable interrupt requests per default. In order to make an
interrupt service routine (ISR) interruptible, the ISR must explicitly clear the I bit in the CCR (CLI). After clearing the I bit, other
I bit maskable interrupt requests can interrupt the current ISR.
An ISR of an interruptible I bit maskable interrupt request could basically look like this:
1.
Service interrupt, e.g., clear interrupt flags, copy data, etc.
2.
Clear I bit in the CCR by executing the instruction CLI (thus allowing other I bit maskable interrupt requests)
3.
Process data
4.
Return from interrupt by executing the instruction RTI
5.30.5.3
Wake-up from Stop Mode
5.30.5.3.1
CPU Wake-up from Stop Mode
Every I bit maskable interrupt request is capable of waking the MCU from stop mode. To determine whether an I bit maskable
interrupts is qualified to wake-up the CPU or not, the same conditions as in normal run mode are applied during stop mode: If the
I bit in the CCR is set, all I bit maskable interrupts are masked from waking-up the MCU.
Since there are no clocks running in stop mode, only interrupts which can be asserted asynchronously can wake-up the MCU
from stop mode.
The X bit maskable interrupt request can wake up the MCU from stop mode at anytime, even if the X bit in CCR is set.
If the X bit maskable interrupt request is used to wake-up the MCU with the X bit in the CCR set, the associated ISR is not called.
The CPU then resumes program execution with the instruction following the WAI or STOP instruction. This features works the
same rules like any interrupt request, i.e. care must be taken that the X interrupt request used for wake-up remains active at least
until the system begins execution of the instruction following the WAI or STOP instruction; otherwise, wake-up may not occur.
(Vector base + 0x00F4)
X bit maskable interrupt request (XIRQ or D2D error interrupt)
(173)(Vector base + 0x00F2)
IRQ or D2D interrupt request
(174)(Vector base + 0x00F0–0x0082)
Device specific I bit maskable interrupt sources (priority determined by the low byte of the vector address,
in descending order)
(Vector base + 0x0080)
Spurious interrupt
Note:
172. 16 bits vector address based
173. D2D error interrupt on MCUs featuring a D2D initiator module, otherwise XIRQ pin interrupt
174. D2D interrupt on MCUs featuring a D2D initiator module, otherwise IRQ pin interrupt
Table 259. Exception Vector Map and Priority
Vector Address(172)
Source