R01UH0092EJ0110 Rev.1.10
Page 673 of 807
Jul 31, 2012
M16C/64C Group
30. Flash Memory
30.8
CPU Rewrite Mode
In CPU rewrite mode, the flash memory can be rewritten when the CPU executes software commands.
Program ROM 1, program ROM 2, and data flash can be rewritten with the MCU mounted on the board
and without using a ROM programmer.
The program and block erase commands are executed only in individual block areas of program ROM 1,
program ROM 2, and data flash.
The flash memory has a suspend function to temporarily suspend operation when erasing or
programming in CPU rewrite mode. Refer to 30.8.5 “Suspend Function” for details of the suspend
function.
EW0 mode and EW1 mode are available in CPU rewrite mode. Table 30.11 lists the differences between
EW0 mode and EW1 mode.
Refer to 30.8.1 “EW0 Mode” and 30.8.2 “EW1 Mode” for details.
Table 30.11
EW0 Mode and EW1 Mode
Item
EW0 Mode
EW1 Mode
Operating mode
• Single-chip mode
• Memory expansion mode
Single-chip mode
Rewrite control
program allocatable
area
• Program ROM 1
• Program ROM 2
• External area
• Program ROM 1
• Program ROM 2
Rewrite control
program executable
area
The rewrite control program must be
transferred to an area other than the
flash memory (e.g., RAM) before being
executed.
The rewrite control program can be
executed in program ROM 1 and
program ROM 2.
Rewritable area
• Program ROM 1
• Program ROM 2
• Data flash
• Program ROM 1
• Program ROM 2
• Data flash
Excluding blocks with the rewrite
control program
Software command
restriction
None
• Do not execute program and block
erase commands in a block with the
rewrite control program.
• Read status register command
Do not execute.
Mode after
program/erase, or
during program/erase
suspend
Read status register mode
Read array mode
State during auto
write and auto erase
Bus is not in a hold state.
Bus is in a hold state.
Flash memory
status detection
• Read bits FMR00, FMR06, and
FMR07 in the FMR0 register, and bits
FMR32 and FMR33 in the FMR3
register by a program.
• Execute the read status register
command, and then read bits SR7,
SR5 and SR4 in the status register.
Read bits FMR00, FMR06, and FMR07
in the FMR0 register, and bits FMR32
and FMR33 in the FMR3 register by a
program.
Note:
1.
Refer to 11.3.1.2 “Bus Hold” for detail about the bus hold.
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...