English
Language : 

MC68HC912BL16 Datasheet, PDF (117/128 Pages) Freescale Semiconductor, Inc – 16-Bit Microcontroller
Freescale Semiconductor, Inc.
Table 38 BDM Hardware Commands
Command
Opcode (Hex)
Data
Description
BACKGROUND
90
None
Enter background mode (if firmware enabled).
READ_BD_BYTE
E4
16-bit address
16-bit data out
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.
FF01,
READ_BD_BYTE $FF01. Running user code (BGND
0000 0000 (out) instruction is not allowed).
STATUS1
E4
FF01,
1000 0000 (out)
READ_BD_BYTE $FF01. BGND instruction is allowed.
FF01,
READ_BD_BYTE $FF01. Background mode active
1100 0000 (out) (waiting for single wire serial command).
READ_BD_WORD
EC
16-bit address Read from memory with BDM in map (may steal cycles
16-bit data out if external access) must be aligned access.
READ_BYTE
E0
16-bit address
16-bit data out
Read from memory with BDM out of map (may steal cy-
cles if external access) data for odd address on low
byte, data for even address on high byte.
READ_WORD
E8
16-bit address Read from memory with BDM out of map (may steal cy-
16-bit data out cles 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_ FIRMWARE2
C4
FF01,
1xxx xxxx(in)
Write byte $FF01, set the ENBDM bit. This allows exe-
cution of commands which are implemented in firm-
ware. Typically, read STATUS, OR in the MSB, write
the result back to STATUS.
WRITE_BD_WORD
CC
16-bit address Write to memory with BDM in map (may steal cycles if
16-bit data in 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 Write to memory with BDM out of map (may steal cycles
16-bit data in if external access) must be aligned access.
NOTES:
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.
The second type of BDM commands are called firmware commands because they are implemented in
a small ROM within the HC12 MCU. The CPU must be in background mode to execute firmware com-
mands. The usual way to get to background mode is by the hardware command BACKGROUND. The
BDM ROM is located at $FF20 to $FFFF while BDM is active. There are also seven bytes of BDM reg-
isters which are located at $FF00 to $FF06 while BDM is active. The CPU executes code from this ROM
to perform the requested operation. The BDM firmware watches for serial commands and executes
them as they are received. The firmware commands are shown in Table 39.
MC68HC912BL16TS/D
For More Information On This Product,
117
Go to: www.freescale.com