mc68hc908ap8a Freescale Semiconductor, Inc, mc68hc908ap8a Datasheet - Page 128

no-image

mc68hc908ap8a

Manufacturer Part Number
mc68hc908ap8a
Description
M68hc08 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Monitor Mode (MON)
FILE_PTR:
BUS_SPD
DATASIZE
START_ADDR
DATAARRAY
PRGRNGE
FLASH_START
INITIALISATION:
MAIN:
8.5.2 ERARNGE
ERARNGE is used to erase a range of locations in FLASH.
There are two sizes of erase ranges: a page or the entire array. The ERARNGE will erase the page (512
consecutive bytes) in FLASH specified by the address ADDRH:ADDRL. This address can be any address
within the page. Calling ERARNGE with ADDRH:ADDRL equal to $FFFF will erase the entire FLASH
array (mass erase). Therefore, care must be taken when calling this routine to prevent an accidental mass
erase.
The ERARNGE routine do not use a data array. The DATASIZE byte is a dummy byte that is also not
used.
128
:
MOV
MOV
LDHX
STHX
RTS
BSR
:
:
LDHX
JSR
Routine Description
Data Block Format
ORG
DS.B
DS.B
DS.W
DS.B
EQU
EQU
ORG
#20,
#64,
#FLASH_START
START_ADDR
INITIALISATION
#FILE_PTR
PRGRNGE
Calling Address
Routine Name
Stack Used
RAM
1
1
1
64
$FC34
$EE00
FLASH
BUS_SPD
DATASIZE
MC68HC908AP A-Family Data Sheet, Rev. 3
; Indicates 4x bus frequency
; Data size to be programmed
; FLASH start address
; Reserved data array
Table 8-12. ERARNGE Routine
ERARNGE
Erase a page or the entire array
$FCE4
9 bytes
Bus speed (BUS_SPD)
Data size (DATASIZE)
Starting address (ADDRH)
Starting address (ADDRL)
Freescale Semiconductor

Related parts for mc68hc908ap8a