Renesas M32R/ECU Series User Manual page 144

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

Advertisement

6
(2) When the flash write/erase program already exists in the internal flash memory
In this case, the flash write/erase program prepared in the internal flash memory is used to program or erase
the internal flash memory.
For programming/erase operation here, use the internal peripheral circuits in the manner suitable for the
programming system. (All resources of the internal peripheral circuits such as the data bus, serial I/O and
ports can be used.)
The following shows an example for programming or erasing the internal flash memory by using serial I/O0 in
single-chip mode.
FP = L or H
RAM
Flash write/
erase
program
FP = H
Flash write/
erase
RAM
program
Flash
memory
FP = H
Flash write/
erase
RAM
program
Flash
Flash write
memory
data
Figure 6.5.4 Procedure for Programming/Erasing the Internal Flash Memory (when the flash write/erase
program already exists in it)
<Step 1>
• Initial state (Flash write/erase program existing in the internal flash memory)
• An ordinary program in the internal flash memory is being executed.
MOD1 = L
MOD0 = L
CPU
SIO0
Write data
M32R/ECU
<Step 2>
• Set the FP pin high, MOD1 pin low and MOD0 pin low to place the
MOD1 = L
MOD0 = L
flash memory in single-chip + flash E/W enable mode.
• After determining the FP pin and MOD1 pin levels, transfer the flash
write/erase program from the internal flash memory area into the RAM.
• Jump to the flash write/erase program in the RAM.
CPU
SIO0
Write data
M32R/ECU
<Step 3>
• Using the flash write/erase program in the RAM, set the Flash Control
MOD1 = L
MOD0 = L
Register 1 (FCNT1) FENTRY bit to 1.
• Program or erase the internal flash memory using the flash write/erase
program in the RAM.
• When finished, jump to the program in the flash memory or apply a
reset to enter normal mode.
CPU
SIO0
Write data
M32R/ECU
6.5 Programming the Internal Flash Memory
External device
External device
External device
6-15
INTERNAL MEMORY
32180 Group User's Manual (Rev.1.0)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents