AN2302 Freescale Semiconductor / Motorola, AN2302 Datasheet - Page 4

no-image

AN2302

Manufacturer Part Number
AN2302
Description
EEPROM Emulation for the MC9S12C32
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Freescale Semiconductor, Inc.
AN2302/D
There are two strategies that can be employed (within the context of the
software described in this paper) to increase the effective permitted number of
data updates. The first is simply to increase the number of Flash sectors
allocated to non-volatile data storage. If the non-volatile data variables fill one
entire sector, the permitted number of data updates is Number of Sectors x
Program/Erase cycles per Sector.
Thus if the previous example is modified so that 16 Flash sectors are allocated
to non-volatile data storage then the total number of updates becomes 16 x
10,000 = 160,000. If, as before, 200 variables are each updated 10 times and
50 variables are each updated 100 times, then the remaining 6 variables can
be updated 160,000 - 2000 - 5000 = 153,000 times, or an average of 25,500
times each.
However, if the size of all the non-volatile data variables is less than half the
size of a Flash sector, the Flash sector can be conceptually sub-divided into
units called banks or pages. Each bank must be large enough to hold all the
non-volatile data variables and there must be an integer number of whole
banks per sector. Thus valid bank sizes are 512, 256, 128, 64, 32, 16, 8, 4, and
2 bytes. The permitted number of data updates is now:
Number of Banks per Sector x Number of Sectors x Program/Erase cycles per
Sector.
If we now consider an example where there are 32 non-volatile data variables
each 2 bytes long, then we can have 8 banks of 64 bytes per sector. If 4 Flash
sectors are allocated to non-volatile data storage, then the permitted number of
data updates for this example is 8 x 4 x 10,000 = 320,000. This equates to an
average of 10,000 updates per data variable.
As mentioned previously, the number of Flash program/erase cycles used can
be minimised by permanently allocating copies of the most frequently updated
non-volatile data variables in RAM. The frequently changing copies in RAM can
then be used to update the non-volatile data on a less frequent basis, prior to
a power-down cycle for example.
4
EEPROM Emulation for the MC9S12C32
MOTOROLA
For More Information On This Product,
Go to: www.freescale.com

Related parts for AN2302