English
Language : 

Z8F1601 Datasheet, PDF (174/246 Pages) Zilog, Inc. – Z8 Encore Microcontrollers with Flash Memory and 10-Bit A/D Converter
Z8F640x/Z8F480x/Z8F320x/Z8F240x/Z8F160x
Z8 Encore!®
156
ister. When the Watchpoint event occurs, the Z8F640x family device enters Debug mode
and the DBGMODE bit in the OCDCTL register becomes 1.
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 of the Z8F640x family device, only a subset of
the OCD commands are available. In Debug mode, all OCD commands become available
unless the user code and control registers are protected by programming the Read Protect
Option Bit (RP). The Read Protect Option Bit prevents the code in memory from being
read out of the Z8F640x family device. When this option is enabled, several of the OCD
commands are disabled. Table 93 contains a summary of the On-Chip Debugger com-
mands. Each OCD command is described in further detail in the bulleted list following
Table 93. Table 93 indicates those commands that operate when the Z8F640x family
device is not in Debug mode (normal operation) and those commands that are disabled by
programming the Read Protect Option Bit.
Table 93. On-Chip Debugger Commands
Debug Command
Enabled when NOT
Command Byte in Debug mode?
Disabled by
Read Protect Option Bit
Read OCD Revision
00H
Yes
-
Reserved
01H
-
-
Read OCD Status Register
02H
Yes
-
Read Runtime Counter
03H
-
-
Write OCD Control Register
04H
Yes
Cannot clear DBGMODE bit
Read OCD Control Register
05H
Yes
-
Write Program Counter
06H
-
Disabled
Read Program Counter
07H
-
Disabled
Write Register
08H
-
Only writes of the Flash Memory Control
registers are allowed. Additionally, only the
Mass Erase command is allowed to be
written to the Flash Control register.
Read Register
09H
-
Disabled
PS017610-0404
On-Chip Debugger