Datasheet
FLASH Memory
Technical Data MC68HC908JB8•MC68HC08JB8•MC68HC08JT8 — Rev. 2.3
62 FLASH Memory Freescale Semiconductor
4.9.1 Variables
The ROM-resident routines use three variables: CTRLBYT, CPUSPD
and LADDR; and one data buffer. The minimum size of the data buffer
is one byte and the maximum size is 64 bytes.
CPUSPD must be set before calling the ERASE or PROGRAM routine,
and should be set to four times the value of the CPU internal bus speed
in MHz. For example: for CPU speed of 3MHz, CPUSPD should be set
to 12.
4.9.2 ERASE Routine
The ERASE routine erases the entire FLASH memory. The routine does
not check for a blank range before or after erase.
Table 4-2. ROM-Resident Routine Variables
Variable Address Description
CTRLBYT $0048 Control byte for setting mass erase.
CPUSPD $0049
Timing adjustment for different CPU
speeds.
LADDR $004A–$004B Last FLASH address to be programmed.
DATABUF $004C–$008B Data buffer for programming and verifying.
Table 4-3. ERASE Routine
Routine ERASE
Calling Address $FC06
Stack Use 5 Bytes
Input
CPUSPD — CPU speed
HX — Contains any address in the range to be
erased
CTRLBYT — Mass erase
Mass erase if bit 6 = 1
