Mitsubishi 32172 User Manual page 162

M32r series
Table of Contents

Advertisement

6
(1) When the write programs do not exist in the internal flash memory
Use the program in the boot ROM located on the 32172/32173 memory map to write to the flash
memory. To transfer the write data, use serial I/O1 in clock-synchronized serial mode.
This method is used for writing to the flash memory using a flash programmer.
FP=L or H
MOD1= L
RAM
Boot ROM
Flash
memory
FP=H
MOD1= L
Flash write
RAM
program
Boot ROM
Flash
memory
FP=H
MOD1= L
Flash write
RAM
program
Boot ROM
Flash
memory
Flash write
data
Figure 6.5.2 Procedure for Writing to the Internal Flash Memory (when no write programs
exist in the flash memory)
MOD0=L
RESET=L
CPU
SIO1
M32R/E
MOD0=H
RESET=H
CPU
SIO1
M32R/E
MOD0=H
RESET=H
CPU
SIO1
M32R/E
6.5 Programming the Internal Flash Memory
<Step 1>
• Initial state (no write programs exist in the flash memory)
Write data
External device
<Step 2>
• Set the FP pin = high, MOD0 pin = high, and MOD1 pin = low to
place the microcomputer in boot mode.
• Negate reset, then start up from the boot program.
• Transfer the flash write program from the boot ROM into the RAM.
• Jump to the flash write program now in the RAM.
Write data
External device
<Step 3>
• Using the flash write program in the RAM, set the Flash Control
Register 1 (FCNT1) FENTRY bit to 1 to enter flash E/W enable
mode.
• Write data to the internal flash memory using the flash write
program.
• When the CPU finished writing data, return MOD0 low and jump to
the flash memory or go to normal mode by resetting the
microcomputer.
Write data
External device
6-18
INTERNAL MEMORY
Rev.1.0

Advertisement

Table of Contents
loading

This manual is also suitable for:

32173

Table of Contents