Cpu Rewrite Mode - Renesas M16C FAMILY series Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C FAMILY series:
Table of Contents

Advertisement

M
1
6
C
2 /
8
G
o r
u
p
(
M
1
6
C

18.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 microcomputer 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 18.3 lists
differences between EW mode 0 and EW mode 1. One wait is required for the CPU erase-write control.
Table 18.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
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
(2)
detection
Condition for transferring
(3)
to erase-suspend
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
2
0 .
0
J
a
. n
3
, 1
2
0
0
7
R
E
J
0
9
B
0
0
4
7
0 -
2
0
0
2 /
, 8
M
1
6
C
2 /
8
) B
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 the SR7, SR5,
and SR4 bits.
Set the FMR40 and FMR41 bits in
the FMR4 register to "1" by program. set to "1" and the interruput request of
page 304
f o
3
8
5
18. 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
an acknowledged interrupt is generated
(1)
td(SR-ES)
after

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tiny seriesM16c series

Table of Contents