Datasheet

Development Support
Background Debug Mode
MC68HC912D60A — Rev. 3.1 Technical Data
Freescale Semiconductor Development Support 385
Each of the hardware and firmware BDM commands start with an 8-bit
command code (opcode). Depending upon the commands, a 16-bit
address and/or a 16-bit data word is required as indicated in the tables
by the command. All the read commands output 16-bits of data despite
the byte/word implication in the command name.
The external host should wait 150 BDMCLK cycles for a non-intrusive
BDM command to execute before another command is sent. This delay
includes 128 BDMCLK cycles for the maximum delay for a free cycle.
For data read commands, the host must insert this delay between
sending the address and attempting to read the data. In the case of a
write command, the host must delay after the data portion before
sending a new command to be sure that the write has finished.
The external host should delay about 32 target BDMCLK cycles between
a firmware read command and the data portion of these commands. This
allows the BDM firmware to execute the instructions needed to get the
requested data into the BDM SHIFTER register.
Table 19-3. BDM Firmware Commands
Command
Opcode
(Hex)
Data Description
READ_NEXT 62 16-bit data out X = X + 2; Read next word pointed to by X
READ_PC 63 16-bit data out Read program counter
READ_D 64 16-bit data out Read D accumulator
READ_X 65 16-bit data out Read X index register
READ_Y 66 16-bit data out Read Y index register
READ_SP 67 16-bit data out Read stack pointer
WRITE_NEXT 42 16-bit data in X = X + 2; Write next word pointed to by X
WRITE_PC 43 16-bit data in Write program counter
WRITE_D 44 16-bit data in Write D accumulator
WRITE_X 45 16-bit data in Write X index register
WRITE_Y 46 16-bit data in Write Y index register
WRITE_SP 47 16-bit data in Write stack pointer
GO 08 None Go to user program
TRACE1 10 None
Execute one user instruction then return to
BDM
TAGGO 18 None Enable tagging and go to user program