AN2302 Freescale Semiconductor / Motorola, AN2302 Datasheet - Page 20

no-image

AN2302

Manufacturer Part Number
AN2302
Description
EEPROM Emulation for the MC9S12C32
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2302/D
CopyToRAM
ProgEepromWord
20
Parameters:
Parameters:
Prototype:
Prototype
Example:
Example:
Return:
Return
This static function is called by InitRAMFuncs to copy code and data from Flash
to RAM. It is not callable by the application.
void CopyToRAM(UINT8 *src, UINT8 *dest, UINT16 size)
src
dest
size
void
CopyToRAM((UINT8 *)FLASH_COPY_START,
(UINT8 *)RAM_FUNCS_START, RAM_FUNCS_SIZE);
This static function is called by WriteEeprom to program a single word of
emulated EEPROM. After verifying the programmed word, the flash address
pointer is incremented. Interrupts are masked if IRQ_DURING_PROG is not
defined. This function is not callable by the application.
UINT8 ProgEepromWord(UINT16 **progAddr, UINT16 data);
progAddr pointer to a pointer to the flash location to be programmed.
data
PASS
FAIL
Status = ProgEepromWord(&eepromAddr, eepromData);
Freescale Semiconductor, Inc.
For More Information On This Product,
EEPROM Emulation for the MC9S12C32
pointer to the source code to be copied.
pointer to the destination for the code to be copied to.
size in bytes of code to be copied.
data word to be programmed
word was programmed successfully
word failed to program
Go to: www.freescale.com
Figure 8. CopyToRAM Flow Diagram
data to destination address
Copy one byte of source
destination addresses
Inrement source and
Decrement size
CopyToRAM
size = 0 ?
No
Yes
Return
MOTOROLA

Related parts for AN2302