Fujitsu FR20 Manuel D’Utilisation
288
CHAPTER 21 Flash Memory
21.4
Flash Memory Auto Algorithm (Embedded Algorithm
TM
)
Writing or erasing of the flash memory cell is carried out by initiating the auto algorithm
stored by the flash memory itself.
stored by the flash memory itself.
■
Command Operation
In order to initiate the auto algorithm, execute continuous writing of half-word (16-bit) data for 1 to 6 times
to the flash memory. This is called a command.
If an invalid address or data is written, or the address and data are written in the wrong order, the flash
memory is reset to read mode.
Table 21.4-1 lists the command.
*: Commands must be issued by writing half-words under the FR-CPU programming mode.
RA: Read address /RD: Read data
PA: Write address/PD: Write data
SA: Sector address (specification of any address in the sector. Refer to Table 21.1-1 and Table 21.1-2 )
Erase suspension command (B0
H
) and erase restart command (30
H
) are only valid while erasing the sector.
Two types of reset command can reset the flash memory to read mode.
Table 21.4-1 Command sequence table
Command
sequence
Access numbers
1 Writing Cycle
2 Writing Cycle
3 Writing Cycle
4 Writing Cycle
5 Writing Cycle
6 Writing Cycle
Address
Data
Address
Data
Address
Data
Address
Data
Address
Data
Address
Data
Read/Reset
1
XXXXXXXX
H
F0F0
H
-
-
-
-
-
Read/Reset
4
000F5556
H
AAAA
H
000EAAAA
H
5555
H
000F5556
H
F0F0
H
RA RD
-
-
Program 4
000F5556
H
AAAA
H
000EAAAA
H
5555
H
000F5556
H
A0A0
H
PA PD
000EAAAA
H
5555
H
000E5556H
1010
H
Chip Erasing
6
000F5556
H
AAAA
H
000EAAAA
H
5555
H
000F5556
H
8080
H
000F5556
H
AAAA
H
000EAAAA
H
5555
H
SA
3030
H
Sector Erasing
6
000F5556
H
AAAA
H
000EAAAA
H
5555
H
000F5556
H
8080
H
000F5556
H
AAAA
H
-
-
Sector Erasing being Suspended XXXXXXXX
H
B0B0
H
-
-
-
-
-
Sector Erasing being Restarted
XXXXXXXX
H
3030
H
-
-
-
-
-