
Interrupt Controller Operation
MOTOROLA
Interrupt Controller
15-5
NOTE:
The MC68SZ328 supports the reset instruction. However, it only resets the
CPU, and the RESET pin will not go low when this instruction is issued
because it is an input-only signal.
The MC68SZ328’s RESET signal should be held low for at least 1.2 s after VDD is applied. After reset, all
peripheral function signals and parallel I/O signals appear as inputs with pull-up resistors turned on, unless
otherwise specified.
15.4 Interrupt Controller Operation
When interrupts are received by the controller, they are prioritized, and the highest enabled, pending
interrupt is posted to the CPU. Before the CPU responds to this interrupt, the status register is copied
internally, and then the supervisor bit of the CPU status register is set, placing the processor into supervisor
mode. The CPU then responds with an interrupt acknowledge cycle in which the lower 3 bits of the address
bus reflect the priority level of the current interrupt. The interrupt controller generates a vector number
during the interrupt acknowledge cycle, and the CPU uses this vector number to generate a vector address.
Except for the reset exception, the CPU saves the current processor status, including the program counter
value (which points to the next instruction to be executed after the interrupt) and the saved copy of the
interrupt status register. The new program counter is updated to the content of the interrupt vector, which
points to the interrupt service routine. The CPU then resumes instruction execution to execute the interrupt
service routine.
15.4.1 Interrupt Priority Processing
Interrupt priority is based on the priority level of the interrupt. If the CPU is currently processing an
interrupt service routine and a higher priority interrupt is posted, the process described in Section 15.4
“Interrupt Controller Operation,” repeats, and the higher priority interrupt is serviced. If the priority of the
newer interrupt is lower than or equal to the priority of the current interrupt, execution of the current
interrupt handler continues. The newer interrupt is postponed until its priority becomes the highest.
Interrupts within the same level should be prioritized in software by the interrupt handler. The interrupt
service routine should end with the rte instruction, which restores the processing state prior to the
interrupt.
15.4.2 Interrupt Vectors
The MC68SZ328 provides one interrupt vector for each of the seven user interrupt levels. These interrupt
vectors form the user interrupt vector section of Table 15-1, “Exception Vector Assignment,” on page 254
The user interrupt vectors can be located anywhere within the 0x100 to 0x400 address range. The 5 most
significant bits of the interrupt vector number are programmable, but the lower 3 bits reflect the interrupt
level being serviced. All interrupts are maskable by the interrupt controller. If an interrupt is masked, its
status can still be accessed in the interrupt pending register (IPR).
15.5 Vector Generation
The interrupt controller provides a vector number to the core. You can program the upper 5 bits of the
interrupt vector register (IVR) to allow the interrupt vector number to point to any address in the exception
vector table. However, many of the vector addresses are assigned to the core’s internal exceptions and
cannot be reused. This leaves only a small range of address space (0x100 to 0x400) to which you can
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.