MC68HC912B32
MC68HC912B32TS/D
MOTOROLA
119
The CPU must be in background mode to execute commands that are implemented in the BDM ROM.
The BDM ROM is located at $FF20 to $FFFF while BDM is active. There are also seven bytes of BDM
registers which are located at $FF00 to $FF06 while BDM is active. The CPU executes code from this
ROM to perform the requested operation. These commands are shown in
Table 44
.
NOTES:
1. STATUS command is a specific case of the READ_BD_BYTE command.
2. ENABLE_FIRMWARE and ENTER_TAG_MODE are specific cases of the WRITE_BD_BYTE command.
Table 43 BDM Commands Implemented in Hardware
Command
BACKGROUND
Opcode (Hex)
90
Data
None
Description
Enter background mode (if firmware enabled).
Read from 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.
READ_BD_BYTE $FF01. Running user code (BGND in-
struction is not allowed).
READ_BD_BYTE
E4
16-bit address
16-bit data out
STATUS
1
E4
FF01,
0000 0000 (out)
FF01,
1000 0000 (out)
FF01,
1100 0000 (out)
16-bit address
16-bit data out
READ_BD_BYTE $FF01. BGND instruction is allowed.
READ_BD_BYTE $FF01. Background mode active (wait-
ing for single wire serial command).
Read from memory with BDM in map (may steal cycles if
external access) must be aligned access.
Read from 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.
Read from memory with BDM out of map (may steal cycles
if external access) must be aligned access.
Write to memory with BDM in map (may steal cycles if ex-
ternal access) data for odd address on low byte, data for
even address on high byte.
Write byte $FF01, set the ENBDM bit. This allows execu-
tion of commands which are implemented in firmware.
Typically, read STATUS, OR in the MSB, write the result
back to STATUS.
Write to memory with BDM in map (may steal cycles if ex-
ternal access) must be aligned access.
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 to memory with BDM out of map (may steal cycles if
external access) must be aligned access.
READ_BD_WORD
EC
READ_BYTE
E0
16-bit address
16-bit data out
READ_WORD
E8
16-bit address
16-bit data out
WRITE_BD_BYTE
C4
16-bit address
16-bit data in
ENABLE_ FIRMWARE
2
C4
FF01,
1xxx xxxx(in)
WRITE_BD_WORD
CC
16-bit address
16-bit data in
WRITE_BYTE
C0
16-bit address
16-bit data in
WRITE_WORD
C8
16-bit address
16-bit data in