
<
2
.75
7UGT U/CPWCN
+PVGTTWRVU
=L/2*
7/<:
Internal Interrupt Sources
Internal interrupt sources and trigger conditions are device dependent. On-chip peripherals may set interrupt
under various conditions. Some peripherals always set their corresponding
IREQ
bit while others must be
specifically configured to do so.
See the device product specification to determine available sources, triggering edge options, and exact
programming details. For more details on the interrupt sources, refer to the chapters describing the timers,
comparators, I/O ports, and other peripherals.
INTERRUPT REQUEST (IREQ) REGISTER LOGIC AND TIMING
The Z8
P
LUS
core responds to interrupts as it retires each instruction. If an unmasked interrupt is detected as
an instruction is being retired, the Z8
P
LUS
core does not execute an instruction during the next instruction
cycle. The Z8
P
LUS
MCU instead selects the highest priority outstanding interrupt to be serviced. The program
counter and flags register are pushed to the stack during the next instruction cycle. The appropriate
IREQ
bit
is cleared, the master enable is cleared and the MCU fetches the interrupt vector from program memory. It
then jumps to the user’s interrupt routine during the following cycle (See Figure 4-3).
Figure 4-3. Interrupt Service Sequence
NOTES:
1.
There are no outstanding, unmasked interrupts.
2.
Interrupt source sets an IREQ bit during this interval. This bit is highest priority, has an unmasked
IREQ, and is bit-sampled.
3.
PC and flags are pushed, IREQ bit cleared, IMASK (7) cleared, and vector fetched.
4.
JUMP to interrupt vector.
5.
This portion is the first instruction of user’s interrupt service routine.
Inst 2
Inst 3
Inst 4
Inst 1
Inst 0
XTAL
2
1
2
3
4
5