English
Language : 

Z8F042ASJ020EG2156 Datasheet, PDF (200/280 Pages) Zilog, Inc. – High-Performance 8-Bit Microcontrollers
Z8 Encore! XP® F082A Series
Product Specification
185
Serial Break leaves the device in Debug Mode if that is the current mode. The OCD is held
in Reset until the end of the Serial Break when the DBG pin returns High. Because of the
open-drain nature of the DBG pin, the host can send a Serial Break to the OCD even if the
OCD is transmitting a character.
OCD Unlock Sequence (8-Pin Devices Only)
Because of pin-sharing on the 8-pin device, an unlock sequence must be performed to
access the DBG pin. If this sequence is not completed during a system reset, then the PA0/
DBG pin functions only as a GPIO pin.
The following sequence unlocks the DBG pin:
1. Hold PA2/RESET Low.
2. Wait 5ms for the internal reset sequence to complete.
3. Send the following bytes serially to the debug pin:
DBG ← 80H (autobaud)
DBG ← EBH
DBG ←5AH
DBG ←70H
DBG ←CDH (32-bit unlock key)
4. Release PA2/RESET. The PA0/DBG pin is now identical in function to that of the
DBG pin on the 20-/28-pin device. To enter Debug Mode, reautobaud and write 80H
to the OCD Control Register (see the On-Chip Debugger Commands section on
page 186).
Caution: Between Steps 3 and 4, there is an interval during which the 8-pin device is neither in RE-
SET nor Debug Mode. If a device has been erased or has not yet been programmed, all
program memory bytes contain FFH. The CPU interprets this value as an illegal instruc-
tion; therefore some irregular behavior can occur before entering Debug Mode, and the
register values after entering Debug Mode will differ from their specified reset values.
However, none of these irregularities prevent the programming of Flash memory. Before
beginning system debug, Zilog recommends that some legal code be programmed into
the 8-pin device and that a RESET occurs.
Breakpoints
Execution Breakpoints are generated using the BRK instruction (opcode 00H). When the
eZ8 CPU decodes a BRK instruction, it signals the On-Chip Debugger. If Breakpoints are
enabled, the OCD enters Debug Mode and idles the eZ8 CPU. If Breakpoints are not
PS022828-0413
PRELIMINARY
Operation