English
Language : 

R8C-22_1 Datasheet, PDF (449/549 Pages) Renesas Technology Corp – MCU R8C FAMILY / R8C/2x SERIES
R8C/22 Group, R8C/23 Group
20. Flash Memory
Figure 20.9 shows the How to Set and Exit EW0 Mode. Figure 20.10 shows the How to Set and Exit EW1
Mode.
EW0 Mode Operating Procedure
Set CM0 and CM1 registers(1)
Transfer a rewrite control program which uses CPU
rewrite mode to the RAM.
Jump to the rewrite control program which has been
transferred to the RAM.
(The subsequent process is executed by the rewrite
control program in the RAM.)
Rewrite control program
Set the FMR01 bit by writing 0 and then 1
(CPU rewrite mode enabled)(2)
Execute software commands
Execute the read array command(3)
Write 0 to the FMR01 bit
(CPU rewrite mode enabled)
Jump to a specified address in the flash memory
NOTES:
1. Select 5 MHz or below for the CPU clock by the CM06 bit in the CM0 register and the CM16 to CM17 bits in the CM1 register.
2. When setting the FMR01 bit to 1, write 0 to the FMR01 bit before writing 1. Do not generate an interrupt between writing 0 and 1.
Write to the FMR01 bit in the RAM.
3. Disable the CPU rewrite mode after executing the read array command.
Figure 20.9 How to Set and Exit EW0 Mode
EW1 Mode Operating Procedure
Program in ROM
Write 0 to the FMR01 bit before writing 0
(CPU rewrite mode enabled)(1)
Write 0 to the FMR11 bit before writing 1
(EW1 mode)
Execute software commands
Write 0 to the FMR01 bit
(CPU rewrite mode disabled)
NOTE:
1. When setting the FMR01 bit to 1, write 0 to the FMR01 bit before writing 1.
Do not generate an interrupt between writing 0 and 1.
Figure 20.10 How to Set and Exit EW1 Mode
Rev.2.00 Aug 20, 2008 Page 429 of 501
REJ09B0251-0200