AN1836 Motorola / Freescale Semiconductor, AN1836 Datasheet - Page 17

no-image

AN1836

Manufacturer Part Number
AN1836
Description
FLASH Programming for Motorola MC68HC912 Microcontrollers
Manufacturer
Motorola / Freescale Semiconductor
Datasheet
;--------------------------------------------------------
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;---
;--------------------------------------------------------
AN1836
MOTOROLA
FLASH EEPROM erase routine
MC68HC912B32 1.5T FLASH Module
Rev. 1.2
Rev. 1.1
Rev. 1.0
Written November 6, 1997
by Matt Ruff, BE/OS Systems Engineering
This code is intended for instructional use
only.
or modification of this code.
responsibility of the user to verify all
parameters, variables, timings, etc.
Erasing and Programming the FLASH
EEPROM on the MC68HC912B32
ASSEMBLER:
Application Note Source Code for AN1836
Fixed bug in ReadArray routine
Created Bit Name Labels for easier reading
Streamlined Code for efficiency
Changed to 10ms delay for tepulse
to match specification change
Changed to 100ms delay for tepulse
NOTE:
Motorola assumes no liability for use
February 9, 2000
January 11, 2000
April 16, 1998
This code segment follows the recommended procedure for erasing the
FLASH array. The flowchart in
The general idea is to set the erase flag, write to any location in the array,
apply the erase voltage to the FLASH module within the chip (by setting
the ENPE bit), then to make sure the entire array is erased. If the whole
array is erased, then the number of times the erase voltage was applied
to get this erasure will have been preserved in the Nep variable. The
erase voltage is then pulsed that many times again to ensure that the
array remains erased. This is a 100 percent erase margin.
The source code for this application note is available on Motorola’s Web
site at http://www.motorola.com/sps.
In the following code, the STEP comments refer to the steps shown at
the beginning of this section. Some steps in the code do not correspond
directly to the erasing algorithm but are included simply to provide output
to the indicator LEDs to show the user the status of the program.
IASM12 v. 3.06
P & E Microcomputer Systems
It is the
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
---
Figure 8
outlines this same procedure.
Erasing the FLASH Array
Application Note
17

Related parts for AN1836