AN2183 Freescale Semiconductor / Motorola, AN2183 Datasheet - Page 9

no-image

AN2183

Manufacturer Part Number
AN2183
Description
Using FLASH as EEPROM on the MC68HC908GP32
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
EEWrite
eetest.asm Subroutines
AN2183
MOTOROLA
This subroutine requires two address pointers when called. The 16-bit
starting address of the desired FlashEE section must be saved on the
stack just prior to calling this subroutine. In addition, the 16-bit index
register H:X must point to the first byte of a source data block, which is
typically a buffer located in RAM. As well, the accumulator is preloaded
with the FlashEE data block size. This subroutine will then copy the
required number of bytes sequentially from the source location into the
FlashEE.
As a point of reference toward understanding the speed of this
subroutine, consider using a data block of 16 bytes and a bus frequency
of 7.3728 MHz. The best case programming time would be about 644 s.
The worst case would involve writing the data block into the FlashEE
with no available room. This requires that the FlashEE first be erased
prior to programming the data. In this given scenario, this subroutine
executes in about 1772 s, of which just over 1000 s is due to the
FlashEE erasure procedure.
Note that this subroutine will copy and execute a program in RAM. This
is required due to the fact that programming FLASH locations cannot be
performed by code being executed from the FLASH memory. While
executing code from RAM, all interrupts are disabled.
This file provides an executable demo program used to test and verify
the use of the FlashEE subroutines and files. Note that the files
flashee.equ, flashee.asm, and
test program via the "include" assembler directive.
A simple user interface is provided via the on-chip serial
communications interface (SCI) and industry standard RS232
communications with a host computer executing a simple terminal
program. The serial bit rate is configured for 115.2 kbaud.
The software implements four single ASCII character commands (case
insensitive) and provides the ability to test and interrogate two separate
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
gp32.equ
are incorporated in this
eetest.asm Subroutines
Application Note
9

Related parts for AN2183