
6
INTERNAL MEMORY
6-27
32185/32186 Group Hardware Manual
Rev.1.10 REJ09B0235-0110 May 15, 07
Figure 6.6.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 SIO1 of serial interface in clock-synchronous serial interface or clock-asynchronous serial interface 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
Internal RAM
Internal Flash
memory
FP = L or H
Internal RAM
<Step 1>
Initial state (Flash write/erase program nonexistent
in the internal flash memory)
<Step 2>
Set the FP pin "H," MOD0 pin "H" and MOD1 pin "L" 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 internal RAM.
Jump to the flash write/erase program in the internal RAM.
<Step 3>
Using the flash write/erase program in the RAM,
set 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 "L" and jump to the internal
flash memory or apply a reset to enter normal mode.
M32R/ECU
External device (e.g., flash programmer)
Internal Flash
memory
Flash write
data
Internal 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)
Note 1: When started by boot mode, internal RAM value is indefinite after started by boot mode in order to
"Flash writing/ Erase program" is transferd to internal RAM.
6.6 Programming Internal Flash Memory