Mitsubishi Electric M32R Series User Manual page 154

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

Advertisement

6
(2) When the write program already exists in the internal flash memory
Use the flash write program already stored in the internal flash memory to write to the flash
memory. For write to the flash memory, use the internal peripheral circuits according to your
programming system. (The data bus, serial I/O, and ports can be used.)
The following shows an example for writing to the flash memory by using serial I/O0 in single-chip
mode.
FP=L or H
Boot ROM
Flash write
program
FP=H
Flash write
RAM
program
Boot ROM
memory
FP=H
Flash write
RAM
program
Boot ROM
Flash
memory
Flash write
Figure 6.5.4 Procedure for Writing to Internal Flash Memory (when the write program already
exists in the flash memory)
MOD1= L
MOD0=L
RAM
CPU
SIO0
M32R/E
MOD1= L
MOD0=L
CPU
Flash
SIO0
M32R/E
MOD1= L
MOD0=L
CPU
SIO0
data
M32R/E
6.5 Programming of the Internal Flash Memory
<Step 1>
• Initial state (where the write program already
exists in the flash memory)
• Ordinary program in the flash memory is
being executed.
Write data
External device
<Step 2>
• Set the FP pin high, the MOD1 pin low, and
the MOD0 pin low to place the device in
single-chip + flash E/W enable mode.
• After determining the FP pin and MOD1 pin
levels, transfer the flash write program from
the flash memory area into RAM.
• Jump to the flash write program in RAM.
Write data
External device
<Step 3>
• Using the flash write program in RAM, set the
Flash Control Register 1 (FCNT1) FENTRY
bit to 1.
• Write data to the internal flash memory using
the flash write program in RAM.
• When you finished writing, jump to the
program in the flash memory or apply reset to
enter normal mode.
Write data
External device
6-20
INTERNAL MEMORY
Ver.0.10

Advertisement

Table of Contents
loading

Table of Contents