Debug Support
7-28
ColdFire2/2M User’s Manual
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
7.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 configuration/status register (
CSR
) may be programmed to force the
ColdFire2/2M into emulation mode. This bit is examined only when
MRSTB
is negated
and the processor begins reset exception processing. It may be set while the ColdFire2/
2M is halted before the reset exception processing begins. Refer to
Section 7.3.1 CPU
Halt
.
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 ColdFire2/2M into emulation
mode when trace exception processing begins.
During emulation mode, the ColdFire2/2M’s exhibits the following properties:
All interrupts are ignored, including level seven.
If the MAP bit in the
CSR
is set, all memory accesses are forced, including the
exception stack frame writes and the vector fetch, into a specially mapped address
space signalled by TT = $2, TM = $5 or $6.
If the MAP bit in the
CSR
is set, all caching of memory accesses is disabled.
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).
7.4.1.2 REUSE OF DEBUG MODULE HARDWARE.
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 7-9
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.
7.4.2 Programming Model
In addition to the existing BDM commands that provide access to the processor’s registers
and the memory subsystem, the debug module contains nine registers to support the
Table 7-9. Shared BDM/Breakpoint Hardware
REGISTER
BDM FUNCTION
Bus attributes for all memory
commands
Address for all memory commands
BREAKPOINT FUNCTION
Attributes for address
breakpoint
Address for address
breakpoint
Data for data breakpoint
AATR
ABHR
DBR
Data for All BDM write commands
F
Freescale Semiconductor, Inc.
n
.