EasyManua.ls Logo

Renesas M32R/ECU Series - Page 144

Renesas M32R/ECU Series
839 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6
6-15
INTERNAL MEMORY
32180 Group Users Manual (Rev.1.0)
Figure 6.5.4 Procedure for Programming/Erasing the Internal Flash Memory (when the flash write/erase
program already exists in it)
(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.
SIO0
CPU
Flash write/
erase
program
SIO0
CPU
Flash write/
erase
program
MOD1 = L
SIO0
CPU
RAM
Flash write/
erase
program
FP = L or H
Write data
RAM
RAM
<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.
<Step 2>
• Set the FP pin high, MOD1 pin low and MOD0 pin low to place the
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.
<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 in the RAM.
• When finished, jump to the program in the flash memory or apply a
reset to enter normal mode.
M32R/ECU
M32R/ECU
M32R/ECU
External device
External device
External device
Flash
memory
Flash write
data
Flash
memory
MOD0 = L
MOD1 = LFP = H MOD0 = L
MOD1 = LFP = H MOD0 = L
Write data
Write data
6.5 Programming the Internal Flash Memory

Table of Contents

Related product manuals