Datasheet

Table 23-1. BDC command summary (continued)
Command mnemonic Active BDM/ non-intrusive Coding structure Description
TAGGO Active BDM 18/d Same as GO but enable
external tagging (HCS08
devices have no external
tagging pin)
READ_A Active BDM 68/d/RD Read accumulator (A)
READ_CCR Active BDM 69/d/RD Read condition code register
(CCR)
READ_PC Active BDM 6B/d/RD16 Read program counter (PC)
READ_HX Active BDM 6C/d/RD16 Read H and X register pair
(H:X)
READ_SP Active BDM 6F/d/RD16 Read stack pointer (SP)
READ_NEXT Active BDM 70/d/RD Increment H:X by one then
read memory byte located at
H:X
READ_NEXT_WS Active BDM 71/d/SS/RD Increment H:X by one then
read memory byte located at
H:X. Report status and data.
WRITE_A Active BDM 48/WD/d Write accumulator (A)
WRITE_CCR Active BDM 49/WD/d Write condition code register
(CCR)
WRITE_PC Active BDM 4B/WD16/d Write program counter (PC)
WRITE_HX Active BDM 4C/WD16/d Write H and X register pair
(H:X)
WRITE_SP Active BDM 4F/WD16/d Write stack pointer (SP)
WRITE_NEXT Active BDM 50/WD/d Increment H:X by one, then
write memory byte located at
H:X
WRITE_NEXT_WS Active BDM 51/WD/d/SS Increment H:X by one, then
write memory byte located at
H:X. Also report status.
1. The SYNC command is a special operation that does not have a command code.
The SYNC command is unlike other BDC commands because the host does not
necessarily know the correct communications speed to use for BDC communications
until after it has analyzed the response to the SYNC command.
To issue a SYNC command, the host:
Drives the BKGD pin low for at least 128 cycles of the slowest possible BDC clock
(The slowest clock is normally the reference oscillator/64 or the self-clocked rate/
64.)
Drives BKGD high for a brief speedup pulse to get a fast rise time (This speedup
pulse is typically one cycle of the fastest clock in the system.)
Removes all drive to the BKGD pin so it reverts to high impedance
Monitors the BKGD pin for the sync response pulse
Background debug controller (BDC)
MC9S08PA60 Reference Manual, Rev. 1, 9/2012
598 Freescale Semiconductor, Inc.