Mitsubishi Electric M32R Series User Manual page 152

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

Advertisement

6
(1) When the write program does not exist in the internal flash memory
Use a program in the boot ROM located on memory map to write to the flash memory. To transfer
the write data, use serial I/O1 in clock-synchronized serial mode. Use this serial transfer when
writing to the flash memory using a flash programmer.
FP=L or H
Boot ROM
FP=H
Flash write
RAM
Boot ROM
FP=H
Flash write
RAM
Boot ROM
Flash
memory
Flash write
Figure 6.5.2 Procedure for Writing to Internal Flash Memory (when the write program does not
exist in the flash memory)
MOD1= L
MOD0=L
RESET=L
RAM
CPU
Flash
SIO1
memory
M32R/E
MOD1= L
MOD0=H
RESET=H
CPU
program
Flash
SIO1
memory
M32R/E
MOD1= L
MOD0=H
RESET=H
CPU
program
SIO1
data
M32R/E
6.5 Programming of the Internal Flash Memory
<Step 1>
• Initial state (where the write program does not
(exist in the flash memory)
Write data
External device
<Step 2>
• Set the FP pin high, the MOD0 pin high, and
the MOD1 pin low to place the device in
boot mode + flash E/W enable mode.
• Deassert reset and start up using the boot
program.
• Transfer the flash write program from boot
ROM to 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.
• When you finished writing, reset MOD0 low
and jump to the flash memory or apply reset to
enter normal mode.
Write data
External device
6-18
INTERNAL MEMORY
Ver.0.10

Advertisement

Table of Contents
loading

Table of Contents