Precautions On Cpu Rewrite Mode - Renesas M16C/62P Hardware Manual

Renesas 16-bit single-chip microcomputer
Hide thumbs Also See for M16C/62P:
Table of Contents

Advertisement

M16C/62P Group (M16C/62P, M16C/62PT)

22.3.4 Precautions on CPU Rewrite Mode

22.3.4.1 Operating Speed
Set the CM06 bit in the CM0 register and the CM17 to CM16 bits in the CM1 register to a CPU clock
frequency of 10 MHz or less before entering CPU rewrite mode (EW0 or EW1 mode). Also, set the
PM17 bit in the PM1 register to "1" (wait state).
22.3.4.2 Prohibited Instructions
The following instructions cannot be used in EW0 mode because the CPU tries to read data in the
flash memory: the UND instruction, INTO instruction, JMPS instruction, JSRS instruction, and BRK
instruction.
22.3.4.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 are available since the FMR0 and FMR1 registers are forc-
ibly reset when either interrupt occurs. Allocate the jump addresses for each interrupt service rou-
tines to the fixed vector table. Flash memory rewrite operation is aborted when the NMI or watchdog
timer interrupt occurs. Execute the rewrite program again after exiting the interrupt routine.
• The address match interrupt is not available since the CPU tries to read data in the flash memory.
22.3.4.4 Interrupts (EW1 mode)
• Do not acknowledge any interrupts with vectors in the relocatable vector table or address match
interrupt during the auto program or auto erase period.
• Do not use the watchdog timer interrupt.
_______
• The NMI interrupt is available since the FMR0 and FMR1 registers are forcibly reset when the inter-
rupt occurs. Allocate the jump address for the interrupt service routine to the fixed vector table.
Flash memory rewrite operation is aborted when the NMI interrupt occurs. Execute the rewrite
program again after exiting the interrupt service routine.
22.3.4.5 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 the
bit to "1". Set the bit while an "H" signal is applied to the NMI pin.
22.3.4.6 Rewriting in the User ROM Area (EW0 mode)
If the supply voltage drops while rewriting the block where the rewrite control program is stored, the
flash memory cannot be rewritten because the rewrite control program is not correctly rewritten. If this
error occurs, rewrite the user ROM area while in standard serial I/O mode or parallel I/O mode.
22.3.4.7 Rewriting in the User ROM Area (EW1 mode)
Avoid rewriting any block in which the rewrite control program is stored.
22.3.4.8 DMA Transfer
In EW1 mode, do not perform a DMA transfer while the FMR00 bit in the FMR0 register is set to "0"
(auto programming or auto erasing).
R
e
. v
2
3 .
0
S
e
p
0
, 1
2
0
0
4
R
E
J
0
9
B
0
1
8
5
0 -
2
3
0
Z
page 254
f o
3
6
4
22. Flash Memory Version
_______
_______
_______

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/62pt

Table of Contents