
Interrupt and Exception Handling
5-10
MC68322 USER’S MANUAL
MOTOROLA
5.4.1 Processing Specific Exceptions
The exceptions are classified according to their sources and each type is processed
differently. There are three types of exceptions—reset, interrupt, and instruction traps.
5.4.2.1 RESET EXCEPTION. The reset exception corresponds to the highest exception
level. The processing of the reset exception is performed for system initiation and recovery
from catastrophic failure. Any processing in progress at the time of the reset is aborted and
cannot be recovered. The core is forced into the supervisor state and the trace state is
forced off. The interrupt priority mask is set at level 7. The vector number is internally
generated to reference the reset exception vector at location 0 in the supervisor program
space. Because no assumptions can be made about the validity of register contents, in
particular the SSP, neither the internal program counter nor the internal status register are
saved. The address in the first two words of the reset exception vector is fetched as the initial
SSP, and the address in the last two words is fetched as the initial internal program counter.
Finally, instruction execution is started at the address in the internal program counter. The
initial internal program counter should point to the power-up/restart code.
The MC68322 does support the reset instruction, but the instruction will not affect any
changes in the system and should be avoided due to the long execution time of the
instruction. A reset exception is initiated by RESET, not the reset instruction. The reset
instruction does not assert the RESET signal and does not modify any internal registers. The
execution of the reset instruction does not affect the state or function of other on-chip
modules.
5.4.2.2 INTERRUPT EXCEPTIONS. An interrupt event is posted to the core by the interrupt
controller using the internal IPL2–IPL0. Interrupt events arriving at the core do not force
immediate exception processing, but the requests are given a pending status. Pending
interrupts are detected between instruction executions. If the priority of the pending interrupt
is lower than or equal to the current core priority mask level, execution continues with the
next instruction, and the interrupt exception processing is postponed until the current core
priority mask level becomes less than the pending interrupt event.
If the priority of the pending interrupt is greater than the current core priority mask level, the
exception processing sequence is started. A copy of the internal status register is saved, the
privilege mode is set to supervisor mode, tracing is suppressed, and the core priority mask
level is set to the level of the interrupt being acknowledged. The core internally generates a
vector number corresponding to the interrupt level number. It then proceeds with the usual
exception processing. The saved value of the internal program counter is the address of the
instruction that would have been executed had the interrupt not been taken. The appropriate
interrupt vector is fetched and loaded into the internal program counter and normal
instruction execution commences in the interrupt handling routine.
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
..
.