Precautions In Cpu Rewrite Mode; Operation Speed; Prohibited Instructions; Interrupts - 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.6 Precautions in CPU Rewrite Mode

Described below are the precautions to be observed when rewriting the flash memory in CPU rewrite
mode.

21.6.1 Operation Speed

When CPU clock source is the main clock, before entering CPU rewrite mode (EW0 or EW1 mode),
select 10 MHz or below for CPU clock using the CM06 bit in the CM0 register and the CM17 to CM16 bits
in the CM1 register. Also, when selecting f
entering CPU rewrite mode (EW0 or EW1 mode), the ROCR3 to ROCR2 bits in the ROCR register set the
CPU clock division rate to "divide-by-4" or "divide-by-8".
On both cases, set the PM17 bit in the PM1 register to "1" (with wait state).

21.6.2 Prohibited Instructions

The following instructions cannot be used in EW0 mode because the CPU tries to read data in the flash
memory: UND instruction, INTO instruction, JMPS instruction, JSRS instruction, and BRK instruction

21.6.3 Interrupts

EW0 Mode

• To use interrupts having vectors in a relocatable vector table, the vectors must be relocated to the
RAM area.
_______
• The NMI and watchdog timer interrupts can be used since the FMR0 and FMR1 registers are
forcibly reset when either interrupt is generated. However, the jump addresses for each interrupt
service routines to the fixed vector table are set and interrupt programs are required. Flash
memory rewrite operation is halted when the NMI or watchdog timer interrupt is generated. Set the
FMR01 bit to "1" and execute the rewrite and erase program again after exiting the interrupt rou-
tine.
• The address match interrupt can not be used since the CPU tries to read data in the flash memory.

EW1 Mode

• Do not acknowledge any interrupts with vectors in the relocatable vector table or the address
match interrupt during the auto-program or erase-suspend function.

21.6.4 How to Access

To set the FMR01, FMR02, or FMR11 bit to "1", write "1" after first setting the bit to "0". Do not generate
an interrupt or a DMA transfer between the instruction to set the bit to "0" and the instruction to set it to "1".
_______
When the NMI function is selected, set these bits while an "H" signal is applied to the P8

21.6.5 Writing in the User ROM Space

21.6.5.1 EW0 Mode
• If the supply voltage drops while rewriting the block where the rewrite control program is stored, the
flash memory can not be rewritten, because the rewrite control program is not correctly rewritten. If
this error occurs, rewrite the user ROM area in standard serial I/O mode or parallel I/O mode.
21.6.5.2 EW1 Mode
• Do not rewrite the block where the rewrite control program is stored.
Rev.1.00 Nov 01,2004
REJ09B0101-0100Z
page 380 of 402
(ROC) of a on-chip oscillator as a CPU clock source, before
3
21. Flash Memory Version
_______ _____
/NMI/SD pin.
5

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c seriesM16c/tiny series

Table of Contents