Renesas M16C/64C User Manual page 709

Table of Contents

Advertisement

M16C/64C Group
30.8.1.1
Suspend Function (EW0 Mode)
When using suspend function in EW0 mode, check the status of the flash memory in the interrupt
routine and enter suspend mode. Program suspend or erase suspend is not accepted until td(SR-
SUS) elapses after the FMR31 bit is set to 1. Access to the flash memory after confirming the
acceptance of program suspend or erase suspend by the FMR33 or FMR32 bit. Set the FMR31 bit to
0 (command restart) to restart auto-program and auto-erase operations at the completion of the
access to the flash memory. Figure 30.6 to Figure 30.8 show a flowchart in EW0 mode when the
suspend function is enabled, and Figure 30.9 shows Suspend Operation Example in EW0 Mode.
Start
I flag ← 0
Write 0 and then 1
to the FMR30 bit
Write command code xx41h
to WA address
Write WD0 to WA address
Write WD1 to WA address
I flag ← 1
FMR00 = 1 ?
Full status check
Program completed
Notes:
1. In EW0 mode, set the interrupt vector table for interrupts to be used and the interrupt routine in areas
other than flash memory.
2. When interrupts are not used, an instruction to enable interrupts is not necessary.
3. Program is not suspended until td(SR-SUS) elapses after the FMR31 bit is set to 1.
Figure 30.6
Program Flowchart in EW0 Mode (Suspend Function Enabled)
R01UH0092EJ0110 Rev.1.10
Jul 31, 2012
Interrupt
disabled
Suspend
enabled
Interrupt
(2)
enabled
No
Yes
(1)
Maskable interrupt
No
FMR00 = 0 ?
Yes
Suspend
FMR31 ← 1
(3)
request
No
FMR00 = 1 ?
Yes
Program suspend accepted
Access flash memory
Command
FMR31 ← 0
restart
REIT
30. Flash Memory
Access flash memory
Page 676 of 807

Advertisement

Table of Contents
loading

This manual is also suitable for:

M16c/60 seriesM16c series

Table of Contents