Real-Time Debug Support
MOTOROLA
Section 19 Debug Support
19-27
Once the required operations are completed, the return-from-exception (RTE) instruction is executed and
the processor exits emulator mode. Once the debug interrupt handler has completed its execution, the
external development system can then access the reserved memory locations using the BDM commands
to read memory.
Prior to the Rev. A implementation, if a hardware breakpoint (For example, a PC trigger) is left unmodified
by the debug interrupt service routine, another debug interrupt is generated after the RTE instruction
completes execution. In the Rev. A design, the hardware has been modified to inhibit the generation of
another debug interrupt during the first instruction after the RTE exits emulator mode. This behavior is
consistent with the existing logic involving trace mode, where the execution of the first instruction occurs
before another trace exception is generated. This Rev. A enhancement disables all hardware breakpoints
until the first instruction after the RTE has completed execution, regardless of the programmed trigger
response.
19.4.1.1
Emulator Mode
Emulator mode is used to facilitate non-intrusive emulator functionality. This mode can be entered in three
different ways:
The EMU bit in the
CSR may be programmed to force the ColdFire processor to begin execution in
emulator mode. This bit is only examined when RSTI is negated and the processor begins reset
exception processing. It may be set while the processor is halted before the reset exception
A debug interrupt always enters emulation mode when the debug interrupt exception processing
begins.
The TCR bit in the
CSR may be programmed to force the processor into emulation mode when trace
exception processing begins.
During emulation mode, the ColdFire processor exhibits the following properties:
All interrupts are ignored, including level seven.
If the MAP bit of the
CSR is set, all memory accesses are forced into a specially mapped address
space signalled by TT = $2, TM = $5 or $6. This includes the stack frame writes and the vector fetch
for the exception which forced entry into this mode.
If the MAP bit in the
CSR is set, all caching of memory accesses is disabled. Additionally, the SRAM
module is disabled while in this mode.
The return-from-exception (RTE) instruction exits emulation mode. The processor status output port
provides a unique encoding for emulator mode entry ($D) and exit ($7).
19.4.1.2
Debug Module Hardware
19.4.1.2.1
Reuse of Debug Module Hardware (Rev. A)
The debug module implementation provides a common hardware structure for both BDM and breakpoint
functionality. Several structures are used for both BDM and breakpoint purposes.
Table 19-21 identifies
the shared hardware structures.
The shared use of these hardware structures means the loading of the register to perform any specified
function is destructive to the shared function. For example, if an operand address breakpoint is loaded into
the debug module, a BDM command to access memory overwrites the breakpoint. If a data breakpoint is
configured, a BDM write command overwrites the breakpoint contents.