English
Language : 

Z8FMC16100 Datasheet, PDF (236/402 Pages) Zilog, Inc. – Z8 Encore-R Motor Control Flash MCUs
Z8 Encore!® Motor Control Flash MCUs
Product Specification
214
Chip Debugger or by using the Flash Controller Bypass mode. Refer to the Option Bits
chapter on page 223 and the On-Chip Debugger chapter on page 241 for more informa-
tion.
Flash Write/Erase Protection
The Z8FMC16100 Series Flash MCU device provides several levels of protection against
accidental program and erasure of the contents of Flash memory. This protection is pro-
vided 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 Flash
memory. To program or erase 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.
2. Write the page to be programmed or erased to the Page Select Register.
3. Write the first unlock command 73h to the Flash Control Register.
4. Write the second unlock command 8Ch to the Flash Control Register.
5. Rewrite the page written in Step 2 to the Page Select Register.
Flash Sector Protection
The Flash Sector Protect Register can be configured to prevent sectors from being pro-
grammed or erased. After a sector is protected, it cannot be unprotected by user code. The
Flash Sector Protect Register is cleared after reset and any previously written protection
values are lost. User code must write this register in their initialization routine if they want
to enable sector protection.
The Flash Sector Protect Register shares its Register File address with the Page Select
Register. The Flash Sector Protect Register is accessed by writing the Flash Control Regis-
ter with 5EH. After the Flash Sector Protect Register is selected, it can be accessed at the
Page Select Register address. When user code writes the Flash Sector Protect Register,
bits can only be set to 1. Therefore, sectors can be protected, but not unprotected, via reg-
ister Write operations. The Flash Sector Protect Register is deselected by writing any
value to the Flash Control Register.
The steps to setup the Flash Sector Protect Register from user code are:
1. Write 00h to the Flash Control Register to reset the Flash Controller.
Program Memory
PRELIMINARY
PS024604-1005