English
Language : 

Z8F6421PM020SC Datasheet, PDF (201/299 Pages) Zilog, Inc. – High Performance 8-Bit Microcontrollers Z8 Encore-R 64K Series
Z8 Encore!® 64K Series
Product Specification
181
Timing Using the Flash Frequency Registers
Before performing a program or erase operation on the Flash memory, the user must first
configure the Flash Frequency High and Low Byte registers. The Flash Frequency regis-
ters allow programming and erasure of the Flash with system clock frequencies ranging
from 20kHz through 20MHz (the valid range is limited to the device operating frequen-
cies).
The Flash Frequency High and Low Byte registers combine to form a 16-bit value,
FFREQ, to control timing for Flash program and erase operations. The 16-bit Flash Fre-
quency value must contain the system clock frequency in KHz. This value is calculated
using the following equation:.
FFREQ[15:0]
=
-S---y---s--t--e---m------C-----l-o---c---k-----F----r--e---q---u----e--n----c--y-----(--H----z---)
1000
Caution:
Flash programming and erasure are not supported for system clock fre-
quencies below 20KHz, above 20MHz, or outside of the device operating
frequency range. The Flash Frequency High and Low Byte registers must
be loaded with the correct value to insure proper Flash programming and
erase operations.
Flash Read Protection
The user code contained within the Flash memory can be protected from external access.
Programming the Flash Read Protect Option Bit prevents reading of user code by the On-
Chip Debugger or by using the Flash Controller Bypass mode. Refer to the Option Bits
chapter and the On-Chip Debugger chapter for more information.
Flash Write/Erase Protection
The 64K Series provides several levels of protection against accidental program and era-
sure of the Flash memory contents. This protection is provided by the Flash Controller
unlock mechanism, the Flash Sector Protect register, and the Flash Write Protect option
bit.
Flash Controller Unlock Mechanism
At Reset, the Flash Controller locks to prevent accidental program or erasure of the Flash
memory. To program or erase the Flash memory, the Flash controller must be unlocked.
After unlocking the Flash Controller, the Flash can be programmed or erased. Any value
written by user code to the Flash Control register or Page Select Register out of sequence
will lock the Flash Controller.
The proper steps to unlock the Flash Controller from user code are:
1. Write 00H to the Flash Control register to reset the Flash Controller.
PS019915-1005
Flash Memory