Cpu Rewrite Mode - Renesas M16C/29 Series User Manual

Hide thumbs Also See for M16C/29 Series:
Table of Contents

Advertisement

M
1
6
C
2 /
9
G
o r
u
p

20.4 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 MCU mounted on a board without using the ROM writer. The
program and block erase commands are executed only in the user ROM area.
When the interrupt requests are generated during the erase operation in CPU rewirte mode, the flash
memory offers an erase suspend function to suspend the erase operation and process the interrupt opera-
tion. During the erase suspend function is operated, the user ROM area can be read by program.
Erase-write(EW) 0 mode and erase-write 1 mode are provided as CPU rewrite mode. Table 20.3 lists
differences between EW mode 0 and EW mode 1. One wait is required for the CPU erase-write control.
Table 20.3 EW Mode 0 and EW Mode 1
Item
Operation mode
Areas in which a
rewrite control
program can be located
Areas where
rewrite control
program can be
(2)
executed
Areas which can be
rewritten
Software command
Restrictions
Mode after programming Read Status Register Mode
or erasing
CPU state during auto-
write and auto-erase
Flash memory status
detection
Condition for transferring
to erase-suspend
(3)
NOTES:
1. Do not generate a DMA transfer.
2. Block 1 and Block 0 are enabled for rewrite by setting FMR02 bit in the FMR0 register to 1 and setting
FMR16 bit in the FMR1 register to 1. Block 2 to Block 5 are enabled for rewrite by setting FMR16 bit
in the FMR1 register to 1.
3. The time, until entering erase suspend and reading flash is enabled, is maximum
satisfying the conditions.
R
e
. v
1
1 .
2
M
r a
3 .
, 0
2
0
0
7
R
E
J
0
9
B
0
1
0
1
0 -
1
1
2
EW mode 0
Single chip mode
User ROM area
The rewrite control program must be The rewrite control program can be
transferred to any other than the flash excuted in the user ROM area
memory (e.g., RAM) before being
executed
User ROM area
None
Operating
• Read the FMR00, FMR06, and
FMR07 bits in the FMR0 register
by program
• Execute the read status register
command to read bits SR7, SR5,
and SR4.
Set bits FMR40 and FMR41 in
the FMR4 register to 1 by program.
page 337
f o
4
5
8
20. Flash Memory Version
EW mode 1
Single chip mode
User ROM area
User ROM area
However, this excludes blocks with the
rewrite control program
• Program, block erase command
Cannot be executed in a block having
the rewite control program
• Read Status Register command
Cannot be executed
Read Array mode
In a hold state (I/O ports retain the state
before the command is excuted
Read the FMR00, FMR06, and FMR07
bits in the FMR0 registerby program
The FMR40 bit in the FMR4 register is
set to 1 and the interruput request of
an acknowledged interrupt is generated
(1)
td(SR-ES)
after

Advertisement

Table of Contents
loading

Table of Contents