![](http://datasheet.mmic.net.cn/110000/M32186F8VFP_datasheet_3496152/M32186F8VFP_177.png)
6
INTERNAL MEMORY
6-35
32185/32186 Group Hardware Manual
Rev.1.10 REJ09B0235-0110 May 15, 07
6.6.3 Procedure for Programming/Erasing Internal Flash Memory
To program or erase the internal flash memory, set up chip mode to enter flash E/W enable mode and execute the
flash write/erase program in the internal RAM into which it has been transferred from the internal flash memory.
In flash E/W enable mode, because the internal flash memory cannot be accessed for read as in normal mode,
no programs present in it can be executed. Therefore, the flash write/erase program must be made available in
the internal RAM before entering flash E/W enable mode. Once flash E/W enable mode is entered into, only
flash command and no other commands can be used to access the internal flash memory.
To access the internal flash memory in flash E/W enable mode, issue commands for the internal flash memory
address to be operated on. The table below lists the commands that can be issued in flash E/W enable mode.
Note: During flash E/W enable mode, the internal flash memory cannot be accessed for read or write
wordwise.
Table 6.6.2 Commands in Flash E/W Enable Mode
Command Name
Issued Command Data
Read Array command
H'FFFF
4 Halfword Program command
H'4343
Lock Bit Program command
H'7777
Block Erase command
H'2020
Clear Status Register command
H'5050
Read Lock Bit Status command
H'7171
Verify command (Note 1)
H'D0D0
Note 1: This command must be issued immediately after the Lock Bit Program, Block Erase or Read Lock Bit Status
command. If the Lock Bit Program, Block Erase or Read Lock Bit Status command is followed by other than the Verify
(H'D0D0) command, the Lock Bit Program, Block Erase or Read Lock Bit Status command is not executed normally
and terminated in error.
(1) Read Array command
Writing the Read Array command (H’FFFF) to any address of the internal flash memory places it in read
mode. Then read the desired flash memory address, and the content of that address will be read out.
Before exiting flash E/W enable mode, always be sure to execute the Read Array command.
6.6 Programming Internal Flash Memory
START
Write the Read Array command (H'FFFF)
to any address of the internal flash memory
Read the desired flash memory address
END
Final Address?
YES
NO
Figure 6.6.8 Read Array