English
Language : 

MC68HC908RK2 Datasheet, PDF (35/158 Pages) Motorola, Inc – Microcontroller Unit
FLASH 2TS Memory
BPR0 — Block Protect Register Bit 0
This bit protects the FLASH memory contents in the address ranges $7800–$7FEF and
$FFF0–$FFFF.
1 = Address range protected from erase or program
0 = Address range open to erase or program
By programming the block protect bits, a portion of the memory will be locked so that no further erase or
program operations may be performed. Programming more than one bit at a time is redundant. If both
bit 1 and bit 2 are set, for instance, the FLASH address ranges between $7880–$FFFF are locked. If all
bits are erased, then all of the memory is available for erase and program.
The presence of a voltage VTST on the IRQ pin will bypass the block protection so that all of memory,
including the block protect register, can be programmed or erased.
2.5.7 Embedded Program/Erase Routines
The MC68HC908RK2 monitor ROM contains numerous routines for programming and erasing the
FLASH memory. These embedded routines are intended to assist the programmer with modifying the
FLASH memory array. These routines will implement the smart programming algorithm as defined in
Figure 2-4. The functions are listed in Table 2-4
.
Table 2-4. Embedded FLASH Routines
Function Description
Call
JSR to Address(1)
Read/verify a range
RDVRRNG
ROMSTRT + 0
Program range of FLASH
PRGRNGE
ROMSTRT + 3
Erase range of FLASH
ERARNGE
ROMSTRT + 6
Redundant program FLASH
REDPROG
ROMSTRT + 9
1. ROMSTRT is defined as the starting address of the monitor ROM in the
memory map. This is address $F000.
The functions shown in Table 2-4 accept data through the CPU registers and global variables in RAM.
Table 2-5 shows the RAM locations that are used for passing parameters.
Table 2-5. Embedded FLASH Routine Global Variables
Variable Location
CTRLBYT
CPUSPD
LADDR
BUMPS
DERASE
DATA
Variable Address(1)
RAMSTART + 8
RAMSTART + 9
RAMSTART + 10
RAMSTART + 12
RAMSTART + 13
RAMSTART + 15
1. RAMSTART is defined as the starting address of the RAM in the memory map.
This is address $0080.
MC68HC908RK2 Data Sheet, Rev. 5.1
Freescale Semiconductor
35