mc68hc912bl16 Freescale Semiconductor, Inc, mc68hc912bl16 Datasheet - Page 117

no-image

mc68hc912bl16

Manufacturer Part Number
mc68hc912bl16
Description
16-bit Microcontroller
Manufacturer
Freescale Semiconductor, Inc
Datasheet
MC68HC912BL16TS/D
ENABLE_ FIRMWARE
NOTES:
WRITE_BD_WORD
READ_BD_WORD
WRITE_BD_BYTE
READ_BD_BYTE
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.
BACKGROUND
WRITE_WORD
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.
READ_WORD
WRITE_BYTE
READ_BYTE
Command
STATUS
1
2
Opcode (Hex)
Freescale Semiconductor, Inc.
CC
EC
E4
E4
E0
E8
C4
C4
C0
C8
90
For More Information On This Product,
Table 38 BDM Hardware Commands
Go to: www.freescale.com
1000 0000 (out)
0000 0000 (out)
1100 0000 (out)
16-bit address
16-bit data out
16-bit address
16-bit address
16-bit data out
16-bit address
16-bit data out
16-bit address
16-bit address
16-bit address
16-bit address
16-bit data out
1xxx xxxx(in)
16-bit data in
16-bit data in
16-bit data in
16-bit data in
FF01,
FF01,
FF01,
FF01,
None
Data
READ_BD_BYTE $FF01. BGND instruction is allowed.
READ_BD_BYTE $FF01. Background mode active
(waiting 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 cy-
cles 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 cy-
cles if external access) must be aligned access.
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 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.
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
instruction is not allowed).
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 to memory with BDM in map (may steal cycles if
external access) must be aligned access.
Description
117

Related parts for mc68hc912bl16