Datasheet

Chapter 5. Debug Support 5-25
Background Debug Mode (BDM)
DSCLK and DSI are synchronized inputs. DSCLK acts as a pseudo clock enable and is
sampled on the rising edge of the processor CLK as well as the DSI. DSO is delayed from
the DSCLK-enabled CLK rising edge (registered after a BDM state machine state change).
All events in the debug module’s serial state machine are based on the processor clock
rising edge. DSCLK must also be sampled low (on a positive edge of CLK) between each
bit exchange. The MSB is transferred rst. Because DSO changes state based on an
internally-recognized rising edge of DSCLK, DSDO cannot be used to indicate the start of
a serial transfer. The development system must count clock cycles in a given transfer.
C1–C4 are described as follows:
C1—First synchronization cycle for DSI (DSCLK is high).
C2—Second synchronization cycle for DSI (DSCLK is high).
C3—BDM state machine changes state depending upon DSI and whether the entire
input data transfer has been transmitted.
C4—DSO changes to next value.
NOTE:
A not-ready response can be ignored except during a
memory-referencing cycle. Otherwise, the debug module can
accept a new serial transfer after 32 processor clock periods.
5.5.2.1 Receive Packet Format
The basic receive packet, Figure 5-16, consists of 16 data bits and 1 status bit.
Table 5-19 describes receive BDM packet elds.
16 15 0
S Data Field [15:0]
Figure 5-16. Receive BDM Packet
Table 5-19. Receive BDM Packet Field Description
Bits Name Description
16 S Status. Indicates the status of CPU-generated messages listed below. The not-ready response can
be ignored unless a memory-referencing cycle is in progress. Otherwise, the debug module can
accept a new serial transfer after 32 processor clock periods.
S
Data Message
0 xxxx Valid data transfer
0 0xFFFF Status OK
1 0x0000 Not ready with response; come again
1 0x0001 Error—Terminated bus cycle; data invalid
1 0xFFFF Illegal command
15–0 Data Data. Contains the message to be sent from the debug module to the development system. The
response message is always a single word, with the data field encoded as shown above.