Chapter 5 Background Debug Controller (S12ZBDCV2)
S12ZVHY/S12ZVHL Family Reference Manual Rev. 1.05
Freescale Semiconductor
155
5.4.4.1
SYNC
The SYNC command is unlike other BDC commands because the host does not necessarily know the
correct speed to use for serial communications until after it has analyzed the response to the SYNC
command.
To issue a SYNC command, the host:
1. Ensures that the BKGD pin is high for at least 4 cycles of the slowest possible BDCSI clock
without reset asserted.
2. Drives the BKGD pin low for at least 128 cycles of the slowest possible BDCSI clock.
3. Drives BKGD high for a brief speed-up pulse to get a fast rise time. (This speedup pulse is typically
one cycle of the host clock which is as fast as the maximum target BDCSI clock).
4. Removes all drive to the BKGD pin so it reverts to high impedance.
5. Listens to the BKGD pin for the sync response pulse.
READ_SAME.sz
Non-Intrusive
Yes
(0x50+4 x sz)/dack/rd.sz
Read from location. An initial READ_MEM
defines the address, subsequent
READ_SAME reads return content of
same address
READ_SAME.sz_WS
Non-Intrusive
No
(0x51+4 x sz)/d/ss/rd.sz
Read from location. An initial READ_MEM
defines the address, subsequent
READ_SAME reads return content of
same address
READ_BDCCSR
Always
Available
No
0x2D/rd16
Read the BDCCSR register
SYNC_PC
Non-Intrusive
Yes
0x01/dack/rd24
Read current PC
WRITE_MEM.sz
Non-Intrusive
Yes
(0x10+4 x
sz)/ad24/wd.sz/dack
Write the appropriately-sized (sz) memory
value to the location specified by the 24-bit
address
WRITE_MEM.sz_WS
Non-Intrusive
No
(0x11+4 x sz)/ad24/wd.sz/d/ss Write the appropriately-sized (sz) memory
value to the location specified by the 24-bit
address and report status
WRITE_Rn
Active
Background
Yes
(0x40+CRN)/wd32/dack
Write the requested CPU register
WRITE_BDCCSR
Always
Available
No
0x0D/wd16
Write the BDCCSR register
ERASE_FLASH
Always
Available
No
0x95/d
Mass erase internal flash
STEP1 (TRACE1)
Active
Background
Yes
0x09/dack
Execute one CPU command.
1. The SYNC command is a special operation which does not have a command code.
2. The GO_UNTIL command is identical to the GO command if ACK is not enabled.
Table 5-8. BDC Command Summary (continued)
Command
Mnemonic
Command
Classification
ACK
Command
Structure
Description