AN2183 Freescale Semiconductor / Motorola, AN2183 Datasheet - Page 4

no-image

AN2183

Manufacturer Part Number
AN2183
Description
Using FLASH as EEPROM on the MC68HC908GP32
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Application Note
4
As part of a search algorithm, the software interrogates the first byte
location of each FlashEE data block to see if it is erased (i.e., $FF). For
this reason, when writing a new block of data, the first byte must not be
$FF. All subsequent data block locations have no restrictions on their
stored value.
Figure 1
occupied by two separate FlashEE sections (128 bytes each). Note that
the erased state of the FLASH memory is $FF and that the first 10
locations ($8000 to $8009) are not erased. This represents the current
state of FlashEE1 at the end of the example host test session shown in
Figure 2
As defined in the example provided, FlashEE1 starts at address $8000
with a data block size of five bytes. FlashEE2 starts at address $8080
and has a data block size of seven bytes. Although reasonably obvious,
delineations are shown in
seven evenly fit into a FLASH program row that is 64 bytes in size. The
routines provided will store the appropriate data sequentially in the
respective FlashEE sections only up to the last complete available data
block space. As defined, FlashEE1 will never store a value in the last
four locations of its FLASH program row (i.e., locations $803C to $803F
and $807C to $807F will always be erased.) Similarly, the last byte in
each FLASH program row of FlashEE2 will also remain erased (i.e.,
locations $80BF and $80FF). A FlashEE section with a data block size
of 33 to 64 bytes inclusive will only fit the data into each FLASH program
row once, leaving the remaining locations erased.
The program files provided are:
Freescale Semiconductor, Inc.
For More Information On This Product,
flashee.equ
definitions
flashee.asm
eetest.asm
gp32.equ
shows the MC68HC908GP32 memory map and the space
and described later in this text.
Go to: www.freescale.com
— MC68HC908GP32 microcontroller definitions
— FlashEE test program
— FlashEE subroutine operational parameter
— FlashEE subroutines
Figure 1
that demonstrate that neither five nor
MOTOROLA
AN2183

Related parts for AN2183