
Chapter 11. Debug Support
For More Information On This Product,
Go to: www.freescale.com
11-29
Background Debug Mode (BDM)
CSR[27–24] indicates the halt source, showing the highest priority source for multiple halt
conditions. Debug module Revisions A and B clear CSR[27–24] upon a read of the CSR,
but Revision C and D (in V4) do not. The debug
GO
command clears CSR[26–24].
HALT can be recognized by counting 0xFF occurrences on PSTDDATA. The count is
necessary to determine between a possible data output value of 0xFF and the HALT
condition. Because data always follows a marker (0x8, 0x9, 0xA, or 0xB), PSTDDATA
can display no more than four data 0xFFs. Two such scenarios exist:
A B marker occurs on the left nibble of PSTDDATA with the data of 0xFF
following:
PSTDDATA[7:0]
0xBF
0xFF
0xFF
0xFF
0xFX (X indicates that the next PST value is guaranteed to not be 0xF)
A B marker occurs on the right nibble of PSTDDATA with the data of 0xFF
following:
PSTDDATA[7:0]
0xYB
0xFF
0xFF
0xFF
0xFF
0xXY (X indicates that the PST value is guaranteed to not be 0xF; and Y indicates
a PSTDDATA value that doesn’t affect the 0xFF count).
Thus, a count of either nine or more sequential single 0xF values or five or more sequential
0xFF values signifies the HALT condition.
11.5.2 BDM Serial Interface
When the CPU is halted and PSTDDATA reflects the halt status, the development system
can send unrestricted commands to the debug module. The debug module implements a
synchronous protocol using two inputs (DSCLK and DSI) and one output (DSO), where
DSO is specified as a delay relative to the rising edge of the processor clock. See
Table 11-1. The development system serves as the serial communication channel master
and must generate DSCLK.
The serial channel operates at a frequency from DC to 1/5 of the PSTCLK frequency. The
channel uses full-duplex mode, where data is sent and received simultaneously by both
master and slave devices. The transmission consists of 17-bit packets composed of a
status/control bit and a 16-bit data word. As shown in Figure 11-17, all state transitions are
F
Freescale Semiconductor, Inc.
n
.