Chapter 5 Background Debug Controller (S12ZBDCV2)
S12ZVHY/S12ZVHL Family Reference Manual Rev. 1.05
152
Freescale Semiconductor
Non-intrusive commands are used to read and write target system memory locations and to enter active
BDM. Target system memory includes all memory and registers within the global memory map, including
external memory.
Active background commands are used to read and write all memory locations and CPU resources.
Furthermore they allow single stepping through application code and to exit from active BDM.
Non-intrusive commands can only be executed when the BDC is enabled and the device unsecure. Active
background commands can only be executed when the system is not secure and is in active BDM.
Non-intrusive commands do not require the system to be in active BDM for execution, although, they can
still be executed in this mode. When executing a non-intrusive command with the ACK pulse handshake
protocol disabled, the BDC steals the next bus cycle for the access. If an operation requires multiple cycles,
then multiple cycles can be stolen. Thus if stolen cycles are not free cycles, the application code execution
is delayed. The delay is negligible because the BDC serial transfer rate dictates that such accesses occur
infrequently.
For data read commands, the external host must wait at least 16 BDCSI clock cycles after sending the
address before attempting to obtain the read data. This is to be certain that valid data is available in the
BDC shift register, ready to be shifted out. For write commands, the external host must wait 16 bdcsi
cycles after sending the data to be written before attempting to send a new command. This is to avoid
disturbing the BDC shift register before the write has been completed. The external host must wait at least
for 16 bdcsi cycles after a control command before starting any new serial command.
Table 5-7. BDC Command Types
Command Type
Secure
Status
BDC
Status
CPU Status
Command Set
Always-available
Secure or
Unsecure
Enabled or
Disabled
—
• Read/write access to BDCCSR
• Mass erase flash memory using ERASE_FLASH
• SYNC
• ACK enable/disable
Non-intrusive
Unsecure
Enabled
Code
execution
allowed
• Read/write access to BDCCSR
• Memory access
• Memory access with status
• Mass erase flash memory using ERASE_FLASH
• Debug register access
• BACKGROUND
• SYNC
• ACK enable/disable
Active background
Unsecure
Active
Code
execution
halted
• Read/write access to BDCCSR
• Memory access
• Memory access with status
• Mass erase flash memory using ERASE_FLASH
• Debug register access
• Read or write CPU registers
• Single-step the application
• Exit active BDM to return to the application program (GO)
• SYNC
• ACK enable/disable