AN2302 Freescale Semiconductor / Motorola, AN2302 Datasheet - Page 25

no-image

AN2302

Manufacturer Part Number
AN2302
Description
EEPROM Emulation for the MC9S12C32
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
ProgFlash
MOTOROLA
Parameters:
Prototype:
Example :
Return:
This function is copied to and executed from RAM. This function is written in
assembly code for maximum code efficiency, to minimise the RAM requirement.
This function performs programming of a single word or erasure of a single
sector of Flash. Programming a word requires approximately 50 s. Erasing a
sector requires approximately 20ms. This function is called by
ProgEepromWord and EraseEepromBank and is not callable by the application.
If EECALLBACK is defined, this function will repeatedly call the user defined
function EECallBackFunc while programming or erasure is taking place.
UINT8 ProgFlash(UINT8 command, UINT16 *progAddr, UINT16 data)
command PROG - programs a single word of data,
progAddr pointer to the Flash word to be programmed or the Flash sector to
data
PASS
FAIL
status = ProgFlash(PROG, eepromAddr, eepromData.word);
Freescale Semiconductor, Inc.
For More Information On This Product,
EEPROM Emulation for the MC9S12C32
ERASE - erases a single Flash sector.
be erased.
the data word to be programmed, dummy data if erasing.
the ACCERR or PVIOL bits were not set when the program or erase
command was executed.
the ACCERR or PVIOL bits were set when the program or erase
command was executed.
Go to: www.freescale.com
Software Description
AN2302/D
25

Related parts for AN2302