R8C/1A Group, R8C/1B Group
18. Flash Memory
Rev.1.30
Dec 08, 2006
Page 275 of 315
REJ09B0252-0130
NOTES:
1. Do not use the address match interrupt while a command is executing because the vector of the
address match interrupt is allocated in ROM.
2. Do not use a non-maskable interrupt while block 0 is being automatically erased because the fixed
vector is allocated in block 0.
18.7.1.4
How to Access
Write 0 before writing 1 when setting the FMR01, FMR02, or FMR11 bit to 1. Do not generate an interrupt
between writing 0 and 1.
18.7.1.5
Rewriting User ROM Area
In EW0 Mode, if the supply voltage drops while rewriting any block in which a rewrite control program is
stored, it may not be possible to rewrite the flash memory because the rewrite control program cannot be
rewritten correctly. In this case, use standard serial I/O mode.
18.7.1.6
Program
Do not write additions to the already programmed address.
18.7.1.7
Entering Stop Mode or Wait Mode
Do not enter stop mode or wait mode during erase-suspend.
Table 18.10
EW1 Mode Interrupts
Mode
Status
When Maskable Interrupt Request
is Acknowledged
When Watchdog Timer, Oscillation
Stop Detection and Voltage Monitor 2
Interrupt Request is Acknowledged
EW1 During auto-erasure
(erase- suspend
function enabled)
Auto-erasure is suspended after
td(SR-SUS) and interrupt handling
is executed. Auto-erasure can be
restarted by setting the FMR41 bit
in the FMR4 register to 0 (erase
restart) after interrupt handling
completes.
Once an interrupt request is
acknowledged, auto-programming or
auto-erasure is forcibly stopped
immediately and the flash memory is
reset. Interrupt handling starts after
the fixed period and the flash memory
restarts. Since the block during auto-
erasure or the address during auto-
programming is forcibly stopped, the
normal value may not be read.
Execute auto-erasure again and
ensure it completes normally.
Since the watchdog timer does not
stop during the command operation,
interrupt requests may be generated.
Reset the watchdog timer regularly
using the erase-suspend function.
During auto-erasure
(erase- suspend
function disabled)
Auto-erasure has priority and the
interrupt request
acknowledgement is put on
standby. Interrupt handling is
executed after auto-erasure
completes.
During auto-
programming
(program suspend
function enabled)
Auto-programming is suspended
after td(SR-SUS) and interrupt
handling is executed. Auto-
programming can be restarted by
setting the FMR42 bit in the FMR4
register to 0 (program restart) after
interrupt handling completes.
During auto-
programming
(program suspend
function disabled)
Auto-programming has priority
and the interrupt request
acknowledgement is put on
standby. Interrupt handling is
executed after auto-programming
completes.