English
Language : 

MC68HC908LJ12 Datasheet, PDF (180/413 Pages) Freescale Semiconductor, Inc – 8-bit microcontroller units
Monitor ROM (MON)
When the user dedicates a page of FLASH for data storage, and the size
of the data array defined, each call of the EE_WRTIE routine will
automatically transfer the data in the data array (in RAM) to the next
blank block of locations in the FLASH page. Once a page is filled up, the
EE_WRITE routine automatically erases the page, and starts reuse the
page again. In the 128-byte page, an 8-byte control block is used by the
routine to monitor the utilization of the page. In effect, only 120 bytes are
used for data storage. (see Figure 10-10). The page control operations
are transparent to the user.
F LASH
PAGE BOUNDARY
ONE PAGE = 128 BYTES
CONTROL: 8 BYTES
DATA ARRAY
DATA ARRAY
DATA ARRAY
$XX00 OR $XX80
PAGE BOUNDARY
Figure 10-10. EE_WRITE FLASH Memory Usage
When using this routine to store a 2-byte data array, the FLASH page
can be programmed 60 times before the an erase is required. In effect,
the write/erase endurance is increased by 60 times. When a 15-byte
data array is used, the write/erase endurance is increased by 8 times.
Due to the FLASH page size limitation, the data array is limited from 2
bytes to 15 bytes.
The coding example below uses the $EF00–$EE7F page for data
storage. The data array size is 15 bytes, and the bus speed is
4.9152 MHz. The coding assumes the data block is already loaded in
RAM, with the address pointer, FILE_PTR, pointing to the first byte of the
data block.
MC68HC908LJ12 — Rev. 2.1
Freescale Semiconductor
Monitor ROM (MON)
Technical Data
181