![Freescale Semiconductor MC9S12ZVM series Reference Manual Download Page 166](http://html1.mh-extra.com/html/freescale-semiconductor/mc9s12zvm-series/mc9s12zvm-series_reference-manual_2330602166.webp)
Chapter 5 Background Debug Controller (S12ZBDCV2)
MC9S12ZVM Family Reference Manual Rev. 1.3
166
Freescale Semiconductor
Read from location defined by the previous READ_MEM. The previous READ_MEM command defines
the address, subsequent READ_SAME commands return contents of same address. The example shows
the sequence for reading a 16-bit word size. Byte alignment details are described in
enabled, an ACK pulse is driven before the data bytes are transmitted.
NOTE
READ_SAME{_WS} is a valid command only when preceded by SYNC,
NOP, READ_MEM{_WS}, or another READ_SAME{_WS} command.
Otherwise, an illegal command response is returned, setting the ILLCMD
bit. NOP can be used for inter-command padding without corrupting the
address pointer.
5.4.4.14
READ_BDCCSR
Read the BDCCSR status register. This command can be executed in any mode.
5.4.4.15
SYNC_PC
This command returns the 24-bit CPU PC value to the host. Unsuccessful SYNC_PC accesses return 0xEE
for each byte. If enabled, an ACK pulse is driven before the data bytes are transmitted. The value of 0xEE
is returned if a timeout occurs, whereby NORESP is set. This can occur if the CPU is executing the WAI
instruction, or the STOP instruction with BDCCIS clear, or if a CPU access is delayed by EWAIT. If the
CPU is executing the STOP instruction and BDCCIS is set, then SYNC_PC returns the PC address of the
instruction following STOP in the code listing.
This command can be used to dynamically access the PC for performance monitoring as the execution of
this command is considerably less intrusive to the real-time operation of an application than a
BACKGROUND/read-PC/GO command sequence. Whilst the BDC is not in active BDM, SYNC_PC
returns the PC address of the instruction currently being executed by the CPU. In active BDM, SYNC_PC
returns the address of the next instruction to be executed on returning from active BDM. Thus following a
write to the PC in active BDM, a SYNC_PC returns that written value.
Read BDCCSR Status Register
Always Available
0x2D
BDCCSR
[15:8]
BDCCSR
[7-0]
host
→
target
D
L
Y
target
→
host
target
→
host
Sample current PC
Non-intrusive
0x01
PC
data[23–16]
PC
data[15–8]
PC
data[7–0]
host
→
target
D
A
C
K
target
→
host
target
→
host
target
→
host