English
Language : 

MC9RS08KA2_08 Datasheet, PDF (30/136 Pages) Freescale Semiconductor, Inc – RS08 Microcontrollers
Chapter 4 Memory
• Up to 1000 program/erase cycles at typical voltage and temperature
• Security feature for Flash
4.6.2 Flash Programming Procedure
Programming of Flash memory is done on a row basis. A row consists of 64 consecutive bytes starting
from addresses $3X00, $3X40, $3X80, or $3XC0. Use the following procedure to program a row of Flash
memory:
1. Apply external VPP.
2. Set the PGM bit. This configures the memory for program operation and enables the latching of
address and data for programming.
3. Write any data to any Flash location, via the high page accessing window $00C0–$00FF, within
the address range of the row to be programmed. (Prior to the data writing operation, the PAGESEL
register must be configured correctly to map the high page accessing window to the corresponding
Flash row).
4. Wait for a time, tnvs.
5. Set the HVEN bit.
6. Wait for a time, tpgs.
7. Write data to the Flash location to be programmed.
8. Wait for a time, tprog.
9. Repeat steps 7 and 8 until all bytes within the row are programmed.
10. Clear the PGM bit.
11. Wait for a time, tnvh.
12. Clear the HVEN bit.
13. After time, trcv, the memory can be accessed in read mode again.
14. Remove external VPP.
This program sequence is repeated throughout the memory until all data is programmed.
NOTE
Flash memory cannot be programmed or erased by software code executed
from Flash locations. To program or erase Flash, commands must be
executed from RAM or BDC commands. User code should not enter wait or
stop during erase or program sequence.
These operations must be performed in the order shown; other unrelated
operations may occur between the steps.
4.6.3 Flash Mass Erase Operation
Use the following procedure to mass erase the entire Flash memory:
1. Apply external VPP.
2. Set the MASS bit in the Flash control register.
MC9RS08KA2 Series Data Sheet, Rev. 4
30
Freescale Semiconductor