Datasheet

5-44 MCF5407 User’s Manual
Background Debug Mode (BDM)
5.5.3.3.12 Read Debug Module Register (RDMREG)
Read the selected debug module register and return the 32-bit result. The only valid register
selection for the
RDMREG command is CSR (DRc = 0x00). Note that this read of the CSR
clears the trigger status bits (CSR[BSTAT]) if either a level-2 breakpoint has been triggered
or a level-1 breakpoint has been triggered and no level-2 breakpoint has been enabled.
Command/Result Formats:
Table 5-24 shows the denition of DRc encoding.
Command Sequence:
Figure 5-43. RDMREG Command Sequence
Operand Data: None
Result Data: The contents of the selected debug register are returned as a
longword value. The data is returned most-signicant word rst.
15 12 11 8 7 5 4 0
Command 0x2 0xD 0x4
1
1
Note 0x4 is a 3-bit eld
DRc
Result D[31:16]
D[15:0]
Figure 5-42. RDMREG BDM Command/Result Formats
Table 5-24. Definition of DRc Encoding—Read
DRc[4:0] Debug Register Denition Mnemonic Initial State Page
0x00 Conguration/Status CSR 0x0 p. 5-13
0x010x1F Reserved ——
XXX
MS RESULT
XXX
"ILLEGAL"
NEXT CMD
LS RESULT
NEXT CMD
"NOT READY"
RDMREG
???