English
Language : 

MC68HC912BD32 Datasheet, PDF (241/292 Pages) Freescale Semiconductor, Inc – Advance Information
Freescale Semiconductor, Inc.
Development Support
Background Debug Mode
BDM Commands
The BDM command set consists of two types: hardware and firmware.
Hardware commands allow target system memory to be read or
written.Target system memory includes all memory that is accessible by
the CPU12 including EEPROM, on-chip I/O and control registers, and
external memory that is 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 the
background access does not disturb the running application programs. If
a free cycle is not found within 128 B-clock cycles, the CPU12 is
momentarily frozen so the control logic can steal a cycle.Commands
implemented in BDM control logic are listed in Table 56.
Table 56 Hardware Commands(1)
Command
Opcode (Hex)
Data
Description
BACKGROUND
90
None
Enter background mode if firmware enabled.
READ_BD_BYTE(1)
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.
READ_BD_WORD(1)
EC
16-bit address Read from memory with BDM in map (may steal
16-bit data out 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 Read from memory with BDM out of map (may steal
16-bit data out cycles if external access). Must be aligned access.
WRITE_BD_BYTE(1)
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.
WRITE_BD_WORD(1)
CC
16-bit address Write to memory with BDM in map (may steal cycles
16-bit data in 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 Write to memory with BDM out of map (may steal
16-bit data in cycles if external access). Must be aligned access.
1. Use these commands only for reading/writing to BDM locations.The BDM firmware ROM and BDM registers are not normally
in the HC12 MCU memory map.Since these locations have the same addresses as some of the normal application memory
map, there needs to be a way to decide which physical locations are being accessed by the hardware BDM commands.This
gives rise to needing separate memory access commands for the BDM locations as opposed to the normal application loca-
tions.In logic, this is accomplished by momentarily enabling the BDM memory resources, just for the access cycles of the
READ_BD and WRITE_BD commands.This logic allows the debugging system to unobtrusively access the BDM locations
even if the application program is running out of the same memory area in the normal application memory map.
7-dev
Development Support
For More Information On This Product,
Go to: www.freescale.com
MC68HC912BD32 Rev 1.0