AN2504 Freescale Semiconductor / Motorola, AN2504 Datasheet - Page 26

no-image

AN2504

Manufacturer Part Number
AN2504
Description
On-Chip FLASH Programming API for CodeWarrior Software
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2504/D
26
On-Chip FLASH Programming API for CodeWarrior Software
/********************************************************************
void ProgramRange(Word *_ini, Byte
}
* ProgramRange: Programs a range of FLASH.
*
* Parameters:
*
*
*
* Entry Conditions: DATA contains the data to be programmed
*
* Exit Conditions:
*
* Return:
*
* Remarks:
*/
Freescale Semiconductor, Inc.
Word _first;
_first = *_ini;
FLBPR = 0xFF;
CPUSPD = OSC;
LADDRH = ((_first + _num - 1) & 0xFF00) >> 8;
LADDRL = ((_first + _num - 1) & 0x00FF);
__asm
PRGRNGE();
FLBPR = 0x00;
return;
For More Information On This Product,
ldhx _first;
Go to: www.freescale.com
_*ini: pointer to the starting address
_num: length of the range.
None.
None.
_num must be less to or equal to 64
of the range.
// Disables write protection.
// Set Clock Bus Operation speed.
// Define Last Address High & Low
// Define first address.
// Call ROM-resident routine.
// Enables write protection.
_num) {
MOTOROLA

Related parts for AN2504