English
Language : 

M16C30P_07 Datasheet, PDF (217/317 Pages) Renesas Technology Corp – 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/30 SERIES
M16C/30P Group
19. Flash Memory Version
19.3 CPU Rewrite Mode
In CPU rewrite mode, the user ROM area can be rewritten when the CPU executes software commands.
The user ROM area can be rewritten with the microcomputer mounted on a board without using a parallel or serial
programmer.
In CPU rewrite mode, only the user ROM area shown in Figure 19.1 can be rewritten. The boot ROM area cannot
be rewritten. Program and the block erase command are executed only in the user ROM area.
Erase-write 0 (EW0) mode and erase-write 1 (EW1) mode are provided as CPU rewrite mode. Table 19.5 lists
differences between erase-write 0 (EW0) and erase-write 1 (EW1) modes.
Table 19.5 EW0 Mode and EW1 Mode
Item
Operating Mode
Space where the
rewrite control
program can be
placed
Space where the
rewrite control
program can be
executed
Space which can be
rewritten
Software Command
Restriction
Mode after Program
or Erasing
CPU State during
Auto Write and Auto
Erase
Flash Memory State
Detection
EW0 Mode
• Single-chip mode
• Memory expansion mode
• Boot mode
• User ROM area
• Boot ROM area
The rewrite control program must be
transferred to any space other than the
flash memory (e.g., RAM) before being
executed (2)
User ROM area
None
Read status register mode
Operating
• Read the FMR00, FMR06 and FMR07
bits in the FMR0 register by program
• Execute the read status register
command to read the SR7, SR5 and
SR4 bits in the status register.
EW1 Mode
• Single-chip mode
• User ROM area
The rewrite control program can be
executed in the user ROM area
User ROM area
However, this excludes blocks with the
rewrite control program
• Program and block erase commands
cannot be executed in a block having
the rewrite control program.
• Read status register command cannot
be used.
Read array mode
Maintains hold state (I/O ports maintains
the state before the command was
executed) (1)
Read the FMR00, FMR06 and FMR07
bits in the FMR0 register by program
NOTES:
1. Do not generate an interrupt (except NMI interrupt) or DMA transfer.
2. When in CPU mode, the PM10 bit in the PM1 register is set to "1". Execute the rewrite control
program in the internal RAM or in an external area usable when the PM10 bit is "1".
Rev.1.22 Mar 29, 2007 Page 201 of 291
REJ09B0179-0122