CHAPTER1: Flash Memory
3. Operations
P E R I P H E R A L M A N U A L
16
S6E1Cx_MN710-00016-1v0-E, August 31, 2015
CONFIDENTIAL
3.1.2
Command Operations
This section explains the command operations.
To execute the command operation program, store the program in RAM.
Read/Reset Command
The flash memory can be read and reset by sending the read/reset command.
When a read/reset command is issued, the flash memory maintains the read state until another command is
issued.
When the execution of the automatic algorithm exceeds the time limit (HANG), the flash memory is returned
to the read/reset state by issuing the read/reset command.
The read/reset command issued during each command operation is valid. In this case, commands
previously issued are cleared. So, the commands issued should be issued again from the first command.
See Section "3.2.1 Read/Reset Operation" for details on the actual operation.
Program (Write) Command
The data is written in the address specified at the fourth time by issuing the write command to the target
sector for four consecutive times. Data can be written in a byte (8 bits) or a half-word (16 bits) according to
the data width specified at the fourth time. For the first to third commands, the data width is not judged.
Once the forth command issuance has finished, the automatic algorithm is activated and the automatic write
to the flash memory starts. After executing the automatic write algorithm command sequence, there is no
need to control the flash memory externally.
See Section "3.2.2 Write Operation" for details on the actual operation.
Note:
−
Only a single byte or half-word of data can be written for each write command sequence.
To write multiple pieces of data, issue one write command sequence for each piece of data.
Flash Erase (All Sector Batch Erase) Command
All of the sectors in the flash memory can be batch-erased by sending the flash erase command in six
consecutive writes. Once the sixth sequential write has finished, the automatic algorithm is activated and the
flash erase operation starts.
Note:
−
By flash erase command, the security/CR trimming data value can also be erased.
Sector Erase Command
By sending the sector erase command in six consecutive writes, the single sector specified by sixth write
can be erased. When the sixth write data is "0x30", the automatic algorithm is activated and the sector erase
operation begins.
To erase multiple sectors, issue the sector erase code (0xE0) which is the sixth write data. To erase more
sectors, write the sector erase code, "0xE0" to sector address added in the seventh time and later. By writing
the sector erase code, "0x30" in the last write data, the automatic algorithm is activated and the sector erase
operation begins.
There is no restriction on number of sectors to be erased and all sectors can be erased collectively.
Note:
−
The sector erase is started only by writing 0x30 to the sector erase command. 0xE0 cannot start the
erase operation.