Z8F640x/Z8F480x/Z8F320x/Z8F240x/Z8F160x
Z8 Encore!®
157
Table 93. On-Chip Debugger Commands
Enabled when NOT
Command Byte in Debug mode?
Disabled by
Read Protect Option Bit
Debug Command
Write Program Memory
Read Program Memory
Write Data Memory
Read Data Memory
Read Program Memory CRC
Reserved
0AH
0BH
-
-
-
-
-
-
-
-
-
-
-
-
-
Disabled
Disabled
0CH
Yes
0DH
-
0EH
-
0FH
-
Step Instruction
10H
Disabled
Stuff Instruction
Execute Instruction
Reserved
11H
Disabled
12H
Disabled
13H - 1FH
20H
-
Write Watchpoint
Read Watchpoint
Reserved
Disabled
21H
-
-
22H - FFH
In the following bulleted list of OCD Commands, data and commands sent from the host
to the On-Chip Debugger are identified by ’DBG <-- Command/Data’. Data sent from
the On-Chip Debugger back to the host is identified by ’DBG --> Data’
•
Read OCD Revision (00H)—The Read OCD Revision command is used to
determine the version of the On-Chip Debugger. If OCD commands are added,
removed, or changed, this revision number changes.
DBG <-- 00H
DBG --> OCDREV[15:8] (Major revision number)
DBG --> OCDREV[7:0] (Minor revision number)
•
•
Read OCD Status Register (02H)—The Read OCD Status Register command is
used to read the OCDSTAT register.
DBG <-- 02H
DBG --> OCDSTAT[7:0]
Read Runtime Counter (03H)—The Runtime Counter is used to count Z8 Encore!
system clock cycles in between Breakpoints. The 16-bit Runtime Counter counts up
from 0000Hand stops at the maximum count of FFFFH. The Runtime Counter is
overwritten during the Write Memory, Read Memory, Write Register, Read Register,
Read Memory CRC, Step Instruction, Stuff Instruction, and Execute Instruction
commands.
PS017610-0404
On-Chip Debugger