
25. Flash Memory
25.3.3.4
Program Command
The program command is used to write data to the flash memory in words (in 2 bytes).
By writing the command code xx40h in the first bus cycle and data to the write address in the second bus cycle,
an auto program operation (program and verify data) will start. The address value specified in the first bus
cycle must be the same even address as the write address specified in the second bus cycle.
The FMR00 bit in the FMR0 register can be used to determine whether an auto program operation has been
completed or not. The FMR00 bit becomes 0 (busy) during auto program operation and to 1 (ready) when the
auto program operation is completed.
After an auto program operation is completed, the FMR06 bit in the FMR0 register is used to determine
details.)
Do not write to the same address more than once without executing the block erase command.
Figure 25.8shows a flow chart of the program command.
The lock bit can protect each block from being programmed inadvertently. (Refer to 25.3.4 Data Protect The flash memory enters read status register mode when an auto program operation starts, and so the status
register can be read. The SR7 bit in the status register becomes 0 (busy) when an auto program operation starts,
and becomes 1 (ready) when an auto program operation is completed. The flash memory remains in read status
register mode until the next read array command is written. After an auto program operation is completed, the
status register can be read to determine whether the auto program operation has been completed successfully or
not.
Figure 25.8
Program Command
Start
End
Full status check
FMR00 = 1?
YES
NO
Write the command code xx40h to a write address
Write data to the write address
Write command code and data to the same even address.
Program operation is completed.