Programming Of The Internal Flash Memory; Outline Of Programming Flash Memory - Mitsubishi Electric M32R Series User Manual

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

Advertisement

6

6.5 Programming of the Internal Flash Memory

6.5.1 Outline of Programming Flash Memory

When writing to the internal flash memory, there are following two methods to use depending on
situation:
(1) When the write program does not exist in the internal flash memory
(2) When the write program already exists in the internal flash memory
For (1), set the FP pin = high, MOD0 = high, and MOD1 = low to enter boot flash E/W enable mode.
In this case, the reset vector entry is located at the beginning of the boot program area (H'8000
0000). (Normally, the reset vector entry is located at the start address of the internal flash memory.)
Transfer the "flash write program" from the boot area into the internal RAM using a boot program.
After this transfer, jump to the RAM and set the Flash Control Register 1 FENTRY bit to 1 to make
the flash memory ready for write. You now can write to the internal flash memory using the "flash
write program" that has been transferred into the internal RAM.
For (2), set the FP pin = high, MOD0 = low, and MOD1 = low to enter flash E/W enable mode in
single-chip mode. Transfer the "flash write program" from the internal flash memory in which it has
been prepared beforehand into the internal RAM. After this transfer, jump to the RAM and set the
Flash Control Register 1 (FCNT1) FENTRY bit to 1 using a program in the RAM to make the flash
memory ready for write. You now can write to the internal flash memory using the "flash write
program" that has been transferred into the internal RAM. Or you can set the FP pin = high, MOD0
= low, and MOD1 = high to enter flash E/W enable mode in extended external mode.
When in flash E/W enable mode (FP pin = 1, FENTRY bit = 1), the EIT vector entry for External
Interrupt (EI) is moved to the beginning of the internal RAM (H'0080 4000). During normal mode,
the EIT vector entry exists in the flash area (H'0000 0080).
6.5 Programming of the Internal Flash Memory
6-16
INTERNAL MEMORY
Ver.0.10

Advertisement

Table of Contents
loading

Table of Contents