Message Edited by tonyp on 2006-09-22 12:11 AM
Specifications for the M68HC908 Family FLASH memory indicate a program/erase cycle endurance of 10,000 cycles across the full operating temperature range. This is typically more than sufficient for most applications. However, this value can be mathematically elongated by the number of times a small data block can fit within a FLASH erase page.It is important to note that the while the FLASH memory is "page" erasable, it is, in fact, byte programmable. It’s organization is configured for efficient "row" programming, but any algorithm must write each location on a byte-by-byte basis. There is no limit to the minimum number of bytes that must be programmed within a row. But every time a row is programmed, the high voltage charge pump must be enabled and disabled, regardless of the number of bytes that are programmed.
A critical FLASH memory specification is the cumulative program high voltage period. This is the maximum total time that a specific FLASH program row is subjected to being programmed between erasures. The technical data for the MC68HC908GP32 lists this maximum specification as being 4 ms.
The subroutines herein are optimized to program relatively small blocks of data sequentially within the FLASH memory, thereby minimizing the total cumulative length of time spent programming. These subroutines will only erase the FlashEE space when there is no more room for the next data block. Each FLASH erase page consists of two program rows. The FLASH erase page size for the MC68HC908GP32 is 128 bytes.
With both application notes, the write process is always to unprogrammed locations, so the "programming twice" limitation never occurs. The only restriction (for HC908 devices at least) would be the cumulative program high voltage period.
I notice that, for HC08 devices, the flash row size will be either 32 or 64 bytes, and the erase block size may vary between 64 and 512 bytes, with the larger block sizes applicable to higher capacity flash memory only. The smaller capacity devices use the 64 byte block size.
However, for the 9S08 families, the row size is always 64 bytes, and the erase block size 512 bytes, even for devices with 4K and 8K flash, i.e. 9S08QG. If only a few bytes are needed for non-volatile parameter data, the 512 block size represents a very significant chunk of memory not available for program code - for the 4K device, one eighth of the available flash. This might be another limitation for some applications.
Regards,
Mac
How do you write to a single bit in a byte? What do they mean by "an individual bit is not written to more than once"? As far as I know, you have to write the whole byte, or nothing at all.
AN2156 states:
. . . It is possible to program multiple bits at the same time. However, the same bit may not be programmed twice unless the entire byte has been erased first. This means that the same byte location may be programmed eight times as long as an individual bit is not written to more than once. This is referred to as selective bit programming. . .