Cpu Rewrite Mode - Renesas M16C/29 Series Hardware Manual

16-bit single-chip microcomputer
Hide thumbs Also See for M16C/29 Series:
Table of Contents

Advertisement

M16C/29 Group

21.4 CPU Rewrite Mode

In CPU rewrite mode, the user ROM area can be rewritten when the CPU executes software commands. In
CPU rewrite mode, only the user ROM area shown in Figure 21.2.1 to 21.2.3 can be rewritten and the boot
ROM area cannot be rewritten. The Program and the Block Erase commands are executed only on blocks
in the user ROM area. Therefore, the user ROM area can be rewritten directly while the microcomputer is
mounted on-board without using a ROM programmer, etc.
For interrupts (maskable) requested during an erase operation, the flash memory offers an erase-suspend
function in which the erasing operation can be suspended, and access made available to the flash. Erase-
write 0 (EW0) mode and erase-write 1 (EW1) mode are provided in CPU rewrite mode. Table 21.4.1 shows
the differences between erase-write 0 (EW0) and erase-write 1 (EW1) modes. 1 wait is required for the
CPU erase-write operations.
Table 19.4.1. EW0 Mode and EW1 Mode
Item
Operation mode
Area where
rewrite control
program can be placed
Area where
rewrite control
program can be
executed
Area 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(Note 2)
Condition for transferring
to erase-suspend (Note 3) the FMR4 register to "1" by program. is set to "1" and the interrupt request of
Note 1: Do not generate a DMA transfer.
Note 2: Block 1 and 0 are enabled to rewrite by setting the FMR02 bit in the FMR0 register to "1" and
setting the FMR16 bit in the FMR1 register to "1". Block 2 to 4 are enabled to rewrite by setting
the FMR16 bit in the FMR1 register to "1".
Note 3: The time, until entering erase suspend and reading flash is enabled, is maximum td (SR-ES)
after satisfying the conditions.
Rev.1.00 Nov 01,2004
REJ09B0101-0100Z
EW0 mode
Single chip mode
User ROM area
The rewrite control program must be The rewrite control program can be
transferred to any area other than
the flash memory (e.g., RAM) before
being executed
User ROM area
None
Operation
• Read the FMR00, FMR06 and
FMR07 bits in the FMR0 register by FMR06, and FMR07 bits in a program
a program
• Execute the read status register
command and read the SR7, SR5
and SR4 bits
Set the FMR40 and FMR41 bits in
page 372 of 402
21. Flash Memory Version
EW1 mode (Note 2)
Single chip mode
User ROM area
executed in the 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 rewrite control program
• Read status register command
Can not be used
Read Array mode
Hold state (I/O ports retain the state
before the command is executed
(Note 1)
Read the FMR0 register's FMR00,
The FMR40 bit in the FMR4 register

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c seriesM16c/tiny series

Table of Contents