Freescale Semiconductor MCF51QE128RM Answering Machine User Manual


 
MCF51QE128 MCU Series Reference Manual, Rev. 3
80 Freescale Semiconductor
Get the latest version from freescale.com
Chapter 4 Memory
2. Write a valid command to the FCMD register.
3. Clear the FCBEF flag in the FSTAT register by writing a 1 to FCBEF to launch the command.
After a command is launched, the completion of the command operation is indicated by the setting of
FSTAT[FCCF]. The FCCF flag sets upon completion of all active and buffered burst program commands.
4.5.2 Flash Commands
Table 4-16 summarizes the valid flash commands along with the effects of the commands on the flash
block.
CAUTION
A flash block address must be in the erased state before being programmed.
Cumulative programming of bits within a flash block address is not allowed
except for status field updates required in EEPROM emulation applications.
4.5.2.1 Erase Verify Command
The erase verify operation verifies that the entire flash array memory is erased.
An example flow to execute the erase verify operation is shown in Figure 4-10. The erase verify command
write sequence is as follows:
1. Write to an aligned flash block address to start the command write sequence for the erase verify
command. The address and data written are ignored.
2. Write the erase verify command, 0x05, to the FCMD register.
3. Clear the FCBEF flag in the FSTAT register by writing a 1 to FCBEF to launch the erase verify
command.
After launching the erase verify command, FSTAT[FCCF] sets after the operation has completed. The
number of bus cycles required to execute the erase verify operation is equal to the number of addresses in
the flash array memory plus several bus cycles as measured from the time the FCBEF flag is cleared until
the FCCF flag is set. Upon completion of the erase verify operation, FSTAT[FBLANK] is set if all
addresses in the flash array memory are verified to be erased. If any address in the flash array memory is
not erased, the erase verify operation terminates and FSTAT[FBLANK] remains cleared.
Table 4-16. Flash Command Description
FCMD
NVM
Command
Function on Flash Memory
0x05 Erase Verify Verify all memory bytes in the flash array memory are erased.
If the flash array memory is erased, FSTAT[FBLANK] sets upon command completion.
0x20 Program Program an address in the flash array.
0x25 Burst Program Program an address in the flash array with the internal address incrementing after the
program operation.
0x40 Sector Erase Erase all memory bytes in a sector of the flash array.
0x41 Mass Erase Erase all memory bytes in the flash array.
A mass erase of the full flash array is only possible when no protection is enabled prior
to launching the command.