Procedure For Programming/Erasing The Internal Flash Memory - Renesas M32R/ECU Series User Manual

Mitsubishi 32-bit risc single-chip microcomputers
Table of Contents

Advertisement

6

6.5.4 Procedure for Programming/Erasing the 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 commands 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.5.2 Commands in Flash E/W Enable Mode
Command Name
Read Array command
Page Program command
Lock Bit Program command
Block Erase command
Erase All Unlocked Blocks command
Read Status Register command
Clear Status Register command
Read Lock Bit Status command
Verify command (Note 1)
Note 1: • This command is used in conjunction with Lock Bit Program, Block Erase and Erase All Unlocked Blocks
operations.
• This command must be issued immediately after the Lock Bit Program, Block Erase or Erase All Unlocked Blocks
command.
• If the Lock Bit Program, Block Erase or Erase All Unlocked Blocks command is followed by the Read Array com-
mand (H'FFFF), the Lock Bit Program, Block Erase or Erase All Unlocked Blocks command is canceled.
• If the Lock Bit Program, Block Erase or Erase All Unlocked Blocks command is followed by other than the Verify
(H'D0D0) or Read Array (H'FFFF) command, the Lock Bit Program, Block Erase or Erase All Unlocked Blocks
command is not executed normally and terminated in error.
(1) Read Array command
Writing the 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.
Figure 6.5.7 Read Array Command
6.5 Programming the Internal Flash Memory
Issued Command Data
H'FFFF
H'4141
H'7777
H'2020
H'A7A7
H'7070
H'5050
H'7171
H'D0D0
START
Write the Read Array command (H'FFFF)
to any address of the internal flash memory
Read the desired flash memory address
END
6-20
INTERNAL MEMORY
32180 Group User's Manual (Rev.1.0)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents