
6
6-19
INTERNAL MEMORY
32176 Group User’s Manual (Rev.1.01)
Figure 6.5.2 Procedure for Programming/Erasing the Internal Flash Memory (when the flash write/erase
program does not exist in it)
(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.
SIO1
CPU
SIO1
CPU
Flash write/
erase
program
MOD1 = L
SIO1
CPU
RAM
Flash
memory
FP = L or H
RAM
<Step 1>
Initial state (Flash write/erase program nonexistent
in the internal flash memory)
<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
Deassert 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.
<Step 3>
Using the flash write/erase program in the RAM, set the Flash
Control Register 1 (FCNT1) FENTRY bit to 1.
Program or erase the internal flash memory using the flash
write/erase program.
When finished, set the MOD0 low and jump to the internal
flash memory or apply a reset to enter normal mode.
M32R/ECU
External device (e.g., flash programmer)
Flash
memory
Flash write
data
Flash
memory
MOD0 = L
Boot
program
Boot
program
Boot
program
MOD1 = L
FP = H
MOD0 = H
MOD1 = L
FP = H
MOD0 = H
RESET# = L
RESET# = H
Flash write/
erase
program
Write data
External device (e.g., flash programmer)
6.5 Programming the Internal Flash Memory