361
16.6 Starting the Automatic Algorithm
16.6 Starting the Automatic Algorithm

For writing data to or erasing data from flash memory, start the automatic algorithm

stored in flash memory.

Command Operation
At the start of the automatic algorithm, one to six half-words (16 bits) are written. This data is
called the command.
If the address and data to be written are invalid or are written in an incorrect se que nc e, the flas h
memory is reset to read mode.
Table 16.6-1 lists the commands of the automatic algorithm .
Read/Reset command
When returning to the read mode after the time limit was exceeded, a Read/Reset command
sequence can be issued. Data is read from the flash memory in t he next read cycle.
The flash memory remains in reading state until another c ommand is entered.
When the power is turned on, flash memory is automatically set to the read or reset st ate. In
Table 16.6-1 Commands
Command
sequence First write cycle Sec ond wr ite cycle Third write cy cle Fourth wr ite or
read cycle Fifth read cy cle Sixt h writ e cycle
Data Data Dat a Data Data Data
Read/
Reset 1xxxxxxxxh F0F0h
Read/
Reset 4AAAAh 5555h F0F0h RA RD
Program 4AAAAh 5555h A0A0h PA PD
Chip Erase 6AAAAh 5555h 8080h AAAAh 1010h
Sector
Erase 6AAAAh 5555h 8080h AAAAh SA 3030h
Temporarily Stop
Sector Erase B0B0h
Start Sector Erase 3030h
Access
count
xxxxxxxxh
xxxxxxxxh
Address Address
AddressAddress
Address Address
000D5556h
000D5556h
000D5556h
000D5556h
000EAAAAh
000EAAAAh
000EAAAAh
000EAAAAh
000D5556h
000D5556h
000D5556h
000D5556h
000D5556h
000D5556h
000EAAAAh
000EAAAAh
000D5556h
5555h
5555h
In FR-CPU programming mode, always issue the command in half-word write mode.
RA: read address; RD: read data
PA: write address; PD: write data
SA: sector address (specify one sector address arbitrarily. See Table 16.4-1.)
The Temporarily Stop Sector Erase or Temporarily Stop Erase command (B0H) and the Start Sector Erase
or Restart Erase command (30H) are valid only during a sector erase operation.
Both Reset commands can reset flash memory to the read mode.