
Advance Information
MC68HC908TV24 — Rev. 2.1
178
User FLASH Memory
Freescale Semiconductor
User FLASH Memory
12.7 FLASH Program/Margin Read Operation
NOTE:
After a total of eight program operations have been applied to a row, the
row must be erased before further programming to avoid program
disturb. An erased byte will read $00.
Programming of the user FLASH memory is done on a page basis. A
page consists of eight consecutive bytes starting from address $XXX0
or $XXX8. The smart programming algorithm is required to program
every page in the FLASH memory. The smart programming algorithm is
defined as an iterative program and margin read sequence. Every page
programming pulse (tStep duration) is followed by a margin read. A
margin read imposes a more stringent read condition on the bitcell than
an ordinary read. As part of the margin read, a built-in counter stretches
the data access for an additional eight cycles to allow sensing of the
lower bitcell current. During these eight stretch cycles, the COP counter
continues to run. The user must account for these extra cycles within
COP feed loops.
The steps of programming and margin reading repeats until the data
being programmed is identical to the margin read data. This iterative
process will ensure that data has been programmed with sufficient
margin for long-term data retention. Note that a margin read operation
can only follow a page programming operation.
NOTE:
To overwrite a memory location, it must first be erased to 0s then
programmed to the new value. For instance, if a location previously has
been programmed to $AA (1010 1010 binary) and the value should be
changed to $55 (0101 0101 binary), it is necessary to erase $AA to $00
first before programming to $55. If the erase operation in this example is
not performed and $AA is simply re-programmed to $55, then the
location will be read as $FF (1111 1111 binary). (0s cannot be
programmed. 0s only result from the erase operation.)
The smart programming algorithm consists of these steps. A flowchart
for the algorithm is shown in Figure 12-2. Values for the time parameters
1. Set the PGM bit in FL1CR. This configures the memory for
program operation and enables the latching of address and data
for programming.