INTERNAL MEMORY
6.5 Programming the Internal Flash Memory
6
(1) When the flash write/erase program does not exist in the internal flash memory
In this case, the boot program is used to program or erase the internal flash memory. To transfer the write
data, use serial I/O1 in clock-synchronized serial mode.
To program or erase the internal flash memory using a flash programmer, follow the procedure described below.
<Step 1>
• Initial state (Flash write/erase program nonexistent in the internal
flash memory)
FP = L or H MOD1 = L MOD0 = L RESET = L
CPU
RAM
Boot
program
Flash
memory
Write data
SIO1
External device (e.g., flash programmer)
M32R/ECU
<Step 2>
• Set the FP pin high, MOD0 pin high and MOD1 pin low to place the
flash memory in boot mode + flash E/W enable mode.
• Dessert reset signal and start up with the boot program.
• Transfer the flash write/erase program into the RAM.
• Jump to the flash write/erase program in the RAM.
FP = H MOD1 = L MOD0 = H RESET = H
Flash write/
RAM
erase
CPU
program
Boot
program
Flash
Write data
memory
SIO1
External device (e.g., flash programmer)
M32R/ECU
<Step 3>
• Using the flash write/erase program in the RAM, set the Flash Control
Register 1 (FCNT1) FENTRY bit to 1.
FP = H MOD1 = L
MOD0 = H RESET = H
• Program or erase the internal flash memory using the flash write/erase
program.
• When finished, reset MOD0 low and jump to the internal flash memory
or apply a reset to enter normal mode.
Flash write/
erase
RAM
CPU
program
Boot
Flash
Flash write
data
program
memory
SIO1
Write data
M32R/ECU
External device (e.g., flash programmer)
Figure 6.5.2 Procedure for Programming/Erasing the Internal Flash Memory (when the flash write/erase
program does not exist in it)
32180 Group User’s Manual (Rev.1.0)
6-13