6
6-15
INTERNAL MEMORY
32180 Group User’s 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 = L
FP = H
MOD0 = L
MOD1 = L
FP = H
MOD0 = L
Write data
Write data
6.5 Programming the Internal Flash Memory
Summary of Contents for M32R/ECU Series
Page 17: ...12 This page is blank for reasons of layout...
Page 712: ...CHAPTER 18 OSCILLATOR CIRCUIT 18 1 Oscillator Circuit 18 2 Clock Generator Circuit...
Page 794: ...CHAPTER 22 TYPICAL CHARACTERISTICS...
Page 796: ...APPENDIX 1 MECHANICAL SPECIFICAITONS Appendix 1 1 Dimensional Outline Drawing...
Page 798: ...APPENDIX 2 INSTRUCTION PROCESSING TIME Appendix 2 1 32180 Instruction Processing Time...
Page 802: ...APPENDIX 3 PROCESSING OF UNUSED PINS Appendix 3 1 Example Processing of Unused Pins...