19-26
MCF5249UM
MOTOROLA
Real-Time Debug Support
either the external development system using the serial interface or from the processor’s supervisor
programming model using the WDEBUG instruction.
19.4.1
THEORY OF OPERATION
The breakpoint hardware can be configured to respond to triggers in several ways. The desired response
is programmed into the Trigger Definition Register (TDR). In all situations where a breakpoint triggers, an
indication is provided on the DDATA output port, when not displaying captured operands or branch
The breakpoint status is also posted in the
CSR.
The BDM instructions load and configure the desired breakpoints using the appropriate registers. As the
system operates, a breakpoint trigger generates a response as defined in the
tolerate the processor being halted, a BDM-entry can be used. With the TRC bits of the TDR equal to $1,
the breakpoint trigger causes the core to halt as reflected in the PST = $F status.
PC breakpoint to occur immediately (before the execution of
the targeted instruction). This is possible because the PC breakpoint comparison is enabled at the same
time the interrupt sampling occurs. For the address and data breakpoints, the reporting is considered
imprecise because several additional instructions may be executed after the triggering address or data is
seen.
Once the debug interrupt is recognized, the processor aborts execution and initiates exception processing.
At the initiation of the exception processing, the core enters emulator mode. After the standard 8-byte
exception stack is created, the processor fetches a unique exception vector, 12, from the vector table
(Refer to the ColdFire Programmer’s Reference Manual).
Execution continues at the instruction address contained in this exception vector. All interrupts are ignored
while in emulator mode. Users can program the debug-interrupt handler to perform the necessary context
saves using the supervisor instruction set. As an example, this handler may save the state of all the
program-visible registers as well as the current context into a reserved memory area.
Table 19-20 DDATA[3:0], CSR[31:28] Breakpoint Response
DDATA[3:0], CSR[31:28]
BREAKPOINT STATUS
$000x
No Breakpoints Enabled
$001x
Waiting for Level 1 Breakpoint
$010x
Level 1 Breakpoint Triggered
$101x
Waiting for Level 2 Breakpoint
$110x
Level 2 Breakpoint Triggered
All other encodings are reserved for future use.
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
..
.