English
Language : 

MC908JL3ECPE Datasheet, PDF (31/180 Pages) Freescale Semiconductor, Inc – Microcontrollers
Flash Program Operation
2.10 Flash Program Operation
Programming of the Flash memory is done on a row basis. A row consists of 32 consecutive bytes starting
from addresses $XX00, $XX20, $XX40, $XX60, $XX80, $XXA0, $XXC0 or $XXE0. Use this step-by-step
procedure to program a row of Flash memory (Figure 2-5 shows a flowchart of the programming
algorithm):
1. Set the PGM bit. This configures the memory for program operation and enables the latching of
address and data for programming.
2. Write any data to any Flash location within the address range of the row to be programmed.
3. Wait for a time, tnvs (10μs).
4. Set the HVEN bit.
5. Wait for a time, tpgs (5μs).
6. Write data to the byte being programmed.
7. Wait for time, tPROG (30μs).
8. Repeat step 6 and 7 until all the bytes within the row are programmed.
9. Clear the PGM bit.
10. Wait for time, tnvh (5μs).
11. Clear the HVEN bit.
12. After time, trcv (1μs), the memory can be accessed in read mode again.
This program sequence is repeated throughout the memory until all data is programmed.
NOTE
The time between each Flash address change (step 6 to step 6), or the time
between the last Flash addressed programmed to clearing the PGM bit
(step 6 to step 10), must not exceed the maximum programming time,
tPROG max.
NOTE
Programming and erasing of Flash locations cannot be performed by code
being executed from the Flash memory. While these operations must be
performed in the order shown, other unrelated operations may occur
between the steps.
2.11 Flash Protection
Due to the ability of the on-board charge pump to erase and program the Flash memory in the target
application, provision is made to protect blocks of memory from unintentional erase or program operations
due to system malfunction. This protection is done by use of a Flash Block Protect Register (FLBPR). The
FLBPR determines the range of the Flash memory which is to be protected. The range of the protected
area starts from a location defined by FLBPR and ends to the bottom of the Flash memory ($FFFF). When
the memory is protected, the HVEN bit cannot be set in either ERASE or PROGRAM operations.
MC68HC908JL3E Family Data Sheet, Rev. 4
Freescale Semiconductor
31