Exception Processing
4-6
ColdFire2/2M User’s Manual
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
The ColdFire2/2M inhibits sampling for interrupts during exception processing, including the
first instruction of the exception handler. This allows the first instruction of any exception
handler to effectively disable interrupts, if desired, by raising the interrupt mask level
contained in the status register.
Normally, the end of an exception handler contains an RTE instruction. When the ColdFire2/
2M executes the RTE instruction, it examines the exception stack frame on top of the stack
to determine if it is a valid frame. If the ColdFire2/2M determines that it is a valid frame, the
SR and PC fields are loaded from the exception stack frame and control is passed to the
specified instruction address. If the frame is invalid, a format exception is taken.
All exception vectors are located in the supervisor data space. Since the vector base register
(VBR) provides the base address of the exception vector table, the exception vector table
can be located anywhere in memory; it can even be dynamically relocated for each task that
an operating system executes. The VBR is reset to zero. Refer to
Section 1.4.3.4 Vector
Base Register (VBR)
.
4.1.3 Multiple Exceptions
Within a ColdFire2/2M system, more than one exception can occur at the same time. When
this occurs, only the exception with the highest priority will be processed. Exceptions can be
divided into the four basic groups identified in
Table 4-3
.
These groups are defined by specific characteristics and the priority with which they are
handled. As far as the ColdFire2/2M is concerned, the interrupt exception will never appear
to occur at the same time as another exception. Interrupt exceptions will remain pending
until the other exception is processed. Refer to
example of simultaneous exceptions.
Section 4.2.6 Trace Exception
for an
Table 4-3. Exception Priority Groups
GROUP
PRIORIT
Y
0.0
EXCEPTION AND
RELATIVE PRIORITY
CHARACTERISTICS
Reset
The ColdFire2/2M aborts all processing (instruction or exception) and does not save old
context.
1.0
1.1
1.2
Address Error
Instruction Access
Error
Data Access Error
A-Line
Unimplemented
F-Line
Unimplemented
Illegal Instruction
Privilege Violation
TRAP Instruction
Format Error
Trace
Debug Interrupt
Interrupt
0.0 is the highest priority.
4.2 is the lowest priority.
The ColdFire2/2M suspends processing and saves the context.
2.0
2.1
2.2
2.3
Exception processing begins before the instruction is executed.
3.0
Exception processing is part of the instruction execution and begins after instruction
execution.
4.0
4.1
4.2
Exception processing begins when the current instruction is completed.
NOTES: 1.
2.
F
Freescale Semiconductor, Inc.
n
.