Datasheet

ROM-Resident Routines
MC68HC908AP Family Data Sheet, Rev. 4
Freescale Semiconductor 127
During the software execution, it does not consume any dedicated RAM location, the run-time heap will
extend the system stack, all other RAM location will not be affected.
Figure 8-9. Data Block Format for ROM-Resident Routines
The control and data bytes are described below.
Bus speed This one byte indicates the operating bus speed of the MCU. The value of this byte
should be equal to 4 times the bus speed. E.g., for a 4MHz bus, the value is 16 ($10). This control
byte is useful where the MCU clock source is switched between the PLL clock and the crystal clock.
Data size — This one byte indicates the number of bytes in the data array that are to be
manipulated. The maximum data array size is 255. Routines EE_WRITE and EE_READ are
restricted to manipulate a data array between 7 to 15 bytes. Whereas routines ERARNGE and
MON_ERARNGE do not manipulate a data array, thus, this data size byte has no meaning.
Start address These two bytes, high byte followed by low byte, indicate the start address of the
FLASH memory to be manipulated.
Data array — This data array contains data that are to be manipulated. Data in this array are
programmed to FLASH memory by the programming routines: PRGRNGE, MON_PRGRNGE,
EE_WRITE. For the read routines: LDRNGE and EE_READ, data is read from FLASH and stored
in this array.
8.5.1 PRGRNGE
PRGRNGE is used to program a range of FLASH locations with data loaded into the data array.
Table 8-11. PRGRNGE Routine
Routine Name PRGRNGE
Routine Description Program a range of locations
Calling Address $FC34
Stack Used 15 bytes
Data Block Format
Bus speed (BUS_SPD)
Data size (DATASIZE)
Start address high (ADDRH)
Start address (ADDRL)
Data 1 (DATA1)
:
Data N (DATAN)
DATA SIZE (DATASIZE)
START ADDRESS HIGH (ADDRH)
START ADDRESS LOW (ADDRL)
DATA 0
DATA 1
BUS SPEED (BUS_SPD)
FILE_PTR
DATA N
DATA
ARRAY
$XXXX
DATA
BLOCK
ADDRESS AS POINTER
RAM