![](http://datasheet.mmic.net.cn/30000/MC68HC12BC32VFU8_datasheet_2369773/MC68HC12BC32VFU8_320.png)
Development Support
Data Sheet
M68HC12B Family — Rev. 9.0
320
Development Support
MOTOROLA
Hardware commands allow target system memory to be read or written. Target
system memory includes all memory that is accessible by the CPU12 including
on-chip RAM, EEPROM, on-chip I/O and control registers, and external memory
connected to the target HC12 MCU. Hardware commands are implemented in
hardware logic and do not require the HC12 MCU to be in BDM mode for execution.
The control logic watches the CPU12 buses to find a free bus cycle to execute the
command so that the background access does not disturb the running application
programs. If a free cycle is not found within 128 E-clock cycles, the CPU12 is
momentarily frozen so the control logic can steal a cycle. Refer to Table 18-2 for
commands implemented in BDM control logic.
Table 18-2. 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.
STATUS(1)
E4
FF01,
0000 0000 (out)
READ_BD_BYTE $FF01. Running user code. (BGND
instruction is not allowed.)
FF01,
1000 0000 (out)
READ_BD_BYTE $FF01. BGND instruction is allowed.
FF01,
1100 0000 (out)
READ_BD_BYTE $FF01. Background mode active (waiting for
single wire serial command).
READ_BD_WORD
EC
16-bit address
16-bit data out
Read from memory with BDM in map (may steal cycles 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 cycles if
external access) data for odd address on low byte, data for even
address on high byte.
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.