Datasheet
Development Support
MC68HC812A4 Data Sheet, Rev. 7
216 Freescale Semiconductor
READ_WORD E8
16-bit address
16-bit data out
Read from memory with BDM out of map (may steal cycles
if external access); must be aligned access
WRITE_BD_BYTE C4
16-bit address
16-bit data in
Write to memory with BDM in map (may steal cycles if
external access); data for odd address on low byte, data for
even address on high byte
ENABLE_ FIRMWARE
(2)
C4
FF01,
1xxx xxxx (in)
Write byte $FF01, set the ENBDM bit. This allows
execution of commands which are implemented in
firmware. Typically, read STATUS, OR in the MSB, write the
result back to STATUS.
WRITE_BD_WORD CC
16-bit address
16-bit data in
Write to memory with BDM in map (may steal cycles if
external access); must be aligned access
WRITE_BYTE C0
16-bit address
16-bit data in
Write to memory with BDM out of map (may steal cycles if
external access); data for odd address on low byte, data for
even address on high byte
WRITE_WORD C8
16-bit address
16-bit data in
Write to memory with BDM out of map (may steal cycles if
external access); must be aligned access
1. STATUS command is a specific case of the READ_BD_BYTE command.
2. ENABLE_FIRMWARE is a specific case of the WRITE_BD_BYTE command.
Table 17-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
Table 17-2. BDM Commands Implemented in Hardware (Continued)
Command Opcode (Hex) Data Description
