English
Language : 

M16C29 Datasheet, PDF (367/499 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M16C/Tiny SERIES
M16C/29 Group
20. Flash Memory Version
EW mode 0 operation procedure
Single-chip mode
Rewrite control program
Set the FMR01 bit to 1 after writing 0 (CPU
rewrite mode enabled) (2)
Set CM0, CM1, and PM1 registers
(1)
Transfer a rewrite control program to internal RAM
area
Jump to the rewrite control program transfered to an
internal RAM area (in the following steps, use the
rewrite control program internal RAM area)
Execute software commands
Execute the Read Array command (3)
Write 0 to the FMR01 bit
(CPU rewrite mode disabled)
Jump to a specified address in the flash memory
NOTES:
1. Select 10 MHz or below for CPU clock using the CM06 bit in the CM0 register and bits CM17 to 16 in the CM1
register. Also, set the PM17 bit in the PM1 register to 1 (with wait state).
2. Set the FMR01 bit to 1 immediately after setting it to 0. Do not generate an interrupt or a DMA transfer
between setting the bit to 0 and setting it to 1. Set the FMR01 bit in a space other than the internal flash
memory. Also, set only when the P85/NMI/SD pin is “H” at the time of the NMI function selected.
3. Disables the CPU rewrite mode after executing the read array command.
Figure 20.8 Setting and Resetting of EW Mode 0
EW mode 1 operation procedure
Program in ROM
Single-chip mode
Set CM0, CM1, and PM1 registers (1)
Set the FMR01 bit to 1 (CPU rewrite mode
enabled) after writing 0
Set the FMR11 bit to 1 (EW mode 1) after writing
0 (2, 3)
Execute software commands
Set the FMR01 bit to 0
(CPU rewrite mode disabled)
NOTES:
1. Select 10 MHz or below for CPU clock using the CM06 bit in the CM0 register and bits CM17 to 16
in the CM1 register. Also, set the PM17 bit in the PM1 register to 1 (with wait state).
2. Set the FMR01 bits to 1 immediately after setting it to 0. Do not generate an interrupt or a DMA
transfer between setting the bit to 0 and setting the bit to 1. Set the FMR01 bit in a space other than
the internal flash memory. Set only when the P85/NMI/SD pin is “H” at the time of the NMI function
selected.
3. Set the FMR11 bit to 1 immediately after setting it to 0 while the FMR01 bit is set to 1. Do not
generate an interrupt or a DMA transfer between setting the FMR11 bit to 0 and setting it to 1.
Figure 20.9 Setting and Resetting of EW Mode 1
Rev. 1.12 Mar.30, 2007 page 343 of 458
REJ09B0101-0112