English
Language : 

MC68HC908RK2 Datasheet, PDF (36/158 Pages) Motorola, Inc – Microcontroller Unit
Memory
2.5.8 Embedded Function Descriptions
This subsection describes the embedded functions.
2.5.8.1 RDVRRNG Routine
Name: RDVRRNG
Purpose: Read and/or verify a range of FLASH memory
Entry conditions: H:X
Contains the first address of the range
LADDR Contains the last address of the range
DATA
Contains the data to compare the read data against for
read/verify to RAM only (length is user determined)
ACC
Non-zero for read/verify to RAM, 0 for output to PA0
Exit conditions: C bit
Set if good compare for read/verify to RAM only
ACC
Contains checksum
DATA Contains read FLASH data for read/verify to RAM only
Ready/verify RAM option:
This subroutine both compares data passed in the DATA array to the
FLASH data and reads the data from FLASH into the DATA array. It also
calculates the checksum of the data.
Output to PA0 option: This subroutine dumps the data from the range to PA0 in the same format
as monitor data. It also calculates the checksum of the data.
NOTE
This serial dump does not circumvent security because the security vectors
must still be passed to make FLASH readable in monitor mode.
2.5.8.2 PRGRNGE Routine
Name: PRGRNGE
Purpose: Programs a range of addresses in FLASH memory
Entry conditions: H:X
Contains the first address in the range
LADDR Contains the last address in the range
DATA Contains the data to be programmed (length is user determined)
CPUSPD Contains the bus frequency times 4 in MHz
BUMPS Contains the maximum allowable number of programming
bumps to use
Exit conditions: C bit
Set if successful program; cleared otherwise
I bit
Set, masking interrupts
This routine programs a range of FLASH defined by H:X and LADDR. The range can be from one byte to
as much RAM as can be allocated to DATA. The smart programming algorithm defined in 2.5.4 FLASH
2TS Program/Margin Read Operation is used.
MC68HC908RK2 Data Sheet, Rev. 5.1
36
Freescale Semiconductor