Exception Processing
4-10
ColdFire2/2M User’s Manual
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
A trace exception does not occur immediately after the execution (MOVE to SR, RTE) of the
instruction that puts the ColdFire2/2M in trace mode. The first trace exception occurs after
the subsequent instruction.
4.2.7 Unimplemented Opcode Exception
The attempted execution of line A opcodes not used for MAC instructions and line F
opcodes not used for the debug instructions, including $FFFF, generates their unique
exception types, vector numbers $A and $B respectively. Refer to
Instructions
for a list of the MAC opcodes and the
Manual Rev. 1.0
for a list of the debug instruction opcodes.
Appendix B New MAC
ColdFire Programmer’s Reference
4.2.8 Debug Interrupt
The debug module is the only internal interrupt source for the ColdFire2/2M. This type of
program interrupt, vector number $C, is discussed in detail in
Debug Support
. This exception is generated in response to a hardware breakpoint register
trigger. The ColdFire2/2M does not generate an IACK cycle, but rather calculates the vector
number internally.
Section 7.4 Real-Time
4.2.9 RTE & Format Error Exceptions
When an RTE instruction is executed, the ColdFire2/2M first examines the 4-bit format field
in the exception stack frame on the stack to validate the frame type. Any attempted
execution of an RTE when the format is not equal to $4, $5, $6, or $7 generates a format
error, vector number $E. The exception stack frame for the format error is created without
disturbing the original exception stack frame. The PC field in the new exception stack frame
will point to the RTE instruction.
The selection of the format value provides some limited debug support for porting code from
68000 applications. On 680x0 family processors, the status register (SR) was located at the
top of the stack. On those processors, bit[30] of the longword addressed by the system stack
pointer (SP) is typically zero. Thus, if an RTE is attempted with a 680x0-type exception stack
frame, the ColdFire2/2M will generate a format exception.
If the format field defines a valid type, the ColdFire2/2M: (1) reloads the SR operand, (2)
fetches the second long word operand (PC), (3) adjusts the stack pointer by adding the
format value to the auto-incremented address after the fetch of the first long word, and then
(4) transfers control to the instruction address defined by the PC (fetched in step 2.)
4.2.10 TRAP Instruction Exceptions
The TRAP
instruction always forces an exception as part of its execution and is useful for
implementing system calls. The instruction adds the immediate operand (vector) of the
instruction to 32 to obtain the vector number. The range of vector values is 0 - 15, which
provides 16 vectors numbered $20 - $2F. Refer to the
Manual Rev. 1.0
(MCF5200PRM/AD) for more information on the TRAP instruction.
ColdFire Programmers Reference
F
Freescale Semiconductor, Inc.
n
.