MC68HC16R1/916R1
USER’S MANUAL
MOTOROLA
4-43
4.14.4.3 Entering BDM
When the CPU16 detects a breakpoint or decodes a BGND instruction when BDM is
enabled, it suspends instruction execution and asserts the FREEZE signal. Once
FREEZE has been asserted, the CPU16 enables the BDM serial communication hard-
ware and awaits a command. Assertion of FREEZE causes opcode tracking signals
IPIPE0 and IPIPE1 to change definition and become serial communication signals
DSO and DSI. FREEZE is asserted at the next instruction boundary after the assertion
of BKPT or execution of the BGND instruction. IPIPE0 and IPIPE1 change function be-
fore an exception signal can be generated. The development system must use
FREEZE assertion as an indication that BDM has been entered. When BDM is exited,
FREEZE is negated before initiation of normal bus cycles. IPIPE0 and IPIPE1 are valid
when normal instruction prefetch begins.
4.14.4.4 BDM Commands
Commands consist of one 16-bit operation word and can include one or more 16-bit
extension words. Each incoming word is read as it is assembled by the serial interface.
The microcode routine corresponding to a command is executed as soon as the
command is complete. Result operands are loaded into the output shift register to be
shifted out as the next command is read. This process is repeated for each command
until the CPU returns to normal operating mode. The BDM command set is summa-
rized in
Table 4-7
. Refer to the CPU16 Reference Manual(CPU16RM/AD) for a BDM
command glossary.
Table 4-7 Command Summary
Command
Read Registers
from Mask
Write Registers
from Mask
Mnemonic
Description
RREGM
Read contents of registers specified by command
word register mask
Write to registers specified by command word
register mask
Read contents of entire multiply and accumulate
register set
Write to entire multiply and accumulate register set
Read contents of program counter and stack pointer
Write to program counter and stack pointer
Read byte from specified 20-bit address in data
space
Write byte to specified 20-bit address in data space
Read word from specified 20-bit address in program
space
Write word to specified 20-bit address in program
space
Instruction pipeline flushed and refilled; instructions
executed from current PC – $0006
Null command performs no operation
WREGM
Read MAC Registers
RDMAC
Write MAC Registers
Read PC and SP
Write PC and SP
WRMAC
RPCSP
WPCSP
Read Data Memory
RDMEM
Write Data Memory
WDMEM
Read Program Memory
RPMEM
Write Program Memory
WPMEM
Execute from Current
PK : PC
Null Operation
GO
NOP