R01UH0092EJ0110 Rev.1.10
Page 682 of 807
Jul 31, 2012
M16C/64C Group
30. Flash Memory
30.8.2.1
Suspend Function (EW1 Mode)
When using suspend function in EW1 mode, an interrupt request is not accepted until td(SR-SUS)
elapses after the interrupt request is generated. When the interrupt request is accepted, the flash
memory enters erase suspend or program suspend. Set the FMR31 bit to 0 (command restart) to
restart automatic program and erase operations at the completion of the interrupt. Figure 30.11 to
Figure 30.13 show a flowchart in EW1 mode when the suspend function is enabled, and Figure 30.14
shows Suspend Operation Example in EW1 Mode.
Figure 30.11 Program Flowchart in EW1 Mode (Suspend Function Enabled)
Start
Write command code xx41h
to WA address
FMR31 = 0 ?
Full status check
Program completed
No
Yes
Write 0 and then 1
to the FMR30 bit
Maskable interrupt
(1)
REIT
Access flash memory
FMR31
←
0
Note:
1. An interrupt request is not accepted until td(SR-SUS) elapses after the interrupt
request is generated. Enable interrupts used to enter suspend mode beforehand.
I flag
←
1
Suspend
enabled
Interrupt
enabled
Command
restart
NOP instruction
×
6
Write WD0 to WA address
Write WD1 to WA address
I flag
←
0
Interrupt
disabled
Содержание M16C Series
Страница 846: ...M16C 64C Group R01UH0092EJ0110...