English
Language : 

Z8F042ASJ020EG2156 Datasheet, PDF (201/280 Pages) Zilog, Inc. – High-Performance 8-Bit Microcontrollers
Z8 Encore! XP® F082A Series
Product Specification
186
enabled, the OCD ignores the BRK signal and the BRK instruction operates as an NOP
instruction.
Breakpoints in Flash Memory
The BRK instruction is opcode 00H, which corresponds to the fully programmed state of a
byte in Flash memory. To implement a Breakpoint, write 00H to the required break
address, overwriting the current instruction. To remove a Breakpoint, the corresponding
page of Flash memory must be erased and reprogrammed with the original data.
Runtime Counter
The On-Chip Debugger contains a 16-bit Runtime Counter. It counts system clock cycles
between Breakpoints. The counter starts counting when the On-Chip Debugger leaves
Debug Mode and stops counting when it enters Debug Mode again or when it reaches the
maximum count of FFFFH.
On-Chip Debugger Commands
The host communicates to the on-chip debugger by sending OCD commands using the
DBG interface. During normal operation, only a subset of the OCD commands are avail-
able. In Debug Mode, all OCD commands become available unless the user code and con-
trol registers are protected by programming the Flash Read Protect Option bit (FRP). The
Flash Read Protect Option bit prevents the code in memory from being read out of the Z8
Encore! XP F082A Series device. When this option is enabled, several of the OCD com-
mands are disabled. See Table 109.
Table 110 on page 191 is a summary of the on-chip debugger commands. Each OCD com-
mand is described in further detail in the bulleted list following this table. Table 110 also
indicates those commands that operate when the device is not in Debug Mode (normal
operation) and those commands that are disabled by programming the Flash Read Protect
Option bit.
Table 109. Debug Command Enable/Disable
Debug Command
Read OCD Revision
Reserved
Read OCD Status Register
Read Runtime Counter
Write OCD Control Register
Read OCD Control Register
Command
Byte
00H
01H
02H
03H
04H
05H
Enabled when
Not in Debug
Mode?
Yes
–
Yes
–
Yes
Yes
Disabled by Flash Read Protect
Option Bit
–
–
–
–
Cannot clear DBGMODE bit.
–
PS022828-0413
PRELIMINARY
On-Chip Debugger Commands