English
Language : 

MC9S08DV60 Datasheet, PDF (53/414 Pages) Freescale Semiconductor, Inc – HCS08 Microcontrollers
Chapter 4 Memory
4.5.2 Program and Erase Times
Before any program or erase command can be accepted, the Flash clock divider register (FCDIV) must be
written to set the internal clock for the Flash module to a frequency (fFCLK) between 150 kHz and 200 kHz
(see Section 4.5.10.1, “Flash Clock Divider Register (FCDIV)”). This register can be written only once,
so normally this write is performed during reset initialization. The user must ensure that FACCERR is not
set before writing to the FCDIV register. One period of the resulting clock (1/fFCLK) is used by the
command processor to time program and erase pulses. An integer number of these timing pulses is used
by the command processor to complete a program or erase command.
Table 4-6 shows program and erase times. The bus clock frequency and FCDIV determine the frequency
of FCLK (fFCLK). The time for one cycle of FCLK is tFCLK = 1/fFCLK. The times are shown as a number
of cycles of FCLK and as an absolute time for the case where tFCLK = 5 μs. Program and erase times
shown include overhead for the command state machine and enabling and disabling of program and erase
voltages.
Table 4-6. Program and Erase Times
Parameter
Byte program
Burst program
Sector erase
Mass erase
Sector erase abort
1 Excluding start/end overhead
Cycles of FCLK
9
4
4000
20,000
4
Time if FCLK = 200 kHz
45 μs
20 μs1
20 ms
100 ms
20 μs1
4.5.3 Program and Erase Command Execution
The FCDIV register must be initialized after any reset and any error flag is cleared before beginning
command execution. The command execution steps are:
1. Write a data value to an address in the Flash array. The address and data information from this write
is latched into the Flash interface. This write is a required first step in any command sequence. For
erase and blank check commands, the value of the data is not important. For sector erase
commands, the address can be any address in the sector of Flash to be erased. For mass erase and
blank check commands, the address can be any address in the Flash .
NOTE
Before programming a particular byte in the Flash , the sector in which that
particular byte resides must be erased by a mass or sector erase operation.
Reprogramming bits in an already programmed byte without first
performing an erase operation may disturb data stored in the Flash memory.
2. Write the command code for the desired command to FCMD. The six valid commands are blank
check (0x05), byte program (0x20), burst program (0x25), sector erase (0x40), mass erase1 (0x41),
and sector erase abort (0x47). The command code is latched into the command buffer.
1. A mass erase is possible only when the Flash block is fully unprotected.
MC9S08DV60 Series Data Sheet, Rev 3
Freescale Semiconductor
53