English
Language : 

M16C65 Datasheet, PDF (758/829 Pages) Renesas Technology Corp – RENESAS MCU M16C FAMILY / M16C/60
Under development
M16C/65 Group
Preliminary Specification
This is a preliminary specification and is subject to change.
30. Flash Memory
• NMI, watchdog timer, oscillation stop/re-oscillation detect, voltage detect 1, and voltage detect 2
interrupts
Auto-erase operation or auto-program operation forcibly stops as soon as the interrupt occurs, and
the flash memory is reset. The flash memory restarts after a certain period of time, and then the
interrupt process starts.
After the flash memory restart, execute auto-erase operation again and confirm that it is completed
as expected in order to read the correct value.
The watchdog timer is not stopped during the command operation, and the interrupt request can be
generated. Initialize the watchdog timer regularly.
30.8.6.1 Suspend Function (EW0 Mode) (under review)
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.10 to Figure 30.12 show a flow chart in EW0 mode when the
suspend function is enabled, and Figure 30.13 shows Suspend Operation Example in EW0 Mode.
Start
Write 0 and then 1
to the FMR30 bit
Suspend
enabled
Write the command code
XX41h to the write address
I flag ← 1
Interrupt
enabled (2)
Write data to the write address
No
FMR00 = 1 ?
Yes
Full status check
Program completed
Maskable interrupt (1)
FMR00 = 0 ?
Yes
FMR31 ← 1 (3)
No
Suspend
request
No
FMR33 = 1 ?
Access flash memory
Yes
Program suspend accpeted
Access flash memory
FMR31 ← 0
Command
restart
REIT
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 are not necessary.
3. Program is not suspended until td(SR-SUS) elapses after the FMR31 bit is set to 1.
Figure 30.10 Program Flowchart in EW0 Mode (Suspend Function Enabled)
REJ09B0484-0030 Rev.0.30 Sep 09, 2008
Page 723 of 791