User`s guide
1/15/03 5-1
Chapter 5
Internal Flash
The LZ87010 has 64KB of internal Flash memory, mapped as program memory. At Reset,
execution begins at address 0x0000 of this memory space. This memory supports zero-
wait-state execution at full processor speed.
The Flash can be written under external control or through the control of on-chip software.
Both Mass Erase of the entire Flash and Sector Erase of individual 512-byte sectors is
supported. Once a sector is erased, individual bytes can be written with the enhanced
‘MOVC @(DPTR++,A)’ instruction.
External writing can take place over the SHARP Debug Interface or with a bulk programmer.
5.1 Theory of Operation
The Flash controller has four basic modes of operation that are selected in the
FLASHCFG.FMOD field:
1. Normal Mode (a random-access read-only mode)
2. Program Mode (a random-access read/write mode)
3. Sector Erase (a write to an address erases the entire sector containing the address)
4. Mass Erase (any write erases the entire array).
Random-access reads are available in all modes. In Program Mode, data writes are
random-access.
5.1.1 The Info Array
In addition to the 64KB Data Array, there is a 128-byte Info Array. The last byte of the Info
Array is used to implement Secure Mode. The remaining 127 bytes have no special signif-
icance to the Flash controller, and can be used for general-purpose storage.
The Info Array is mapped to the upper 128 bytes of memory (0xFF80-0xFFFF) if the
FLASHCFG.FMAP bit is set to ‘1’. Otherwise, the Info Array is not accessible. When the
Info Array is accessible, the Flash’s Main Array is also still accessible except for this 128-
byte segment.
Care must be taken by the user when writing to the Flash.
Improper write timing can damage the Flash cells.
Writing and erasing the Flash are guaranteed down to a min-
imum of 0°C.
CAUTION