English
Language : 

M16C1N Datasheet, PDF (191/238 Pages) Renesas Technology Corp – RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/10 SERIES
M16C/1N Group
19. Flash Memory Version
19.5.1 EW0 mode
The microcomputer is placed in CPU rewrite mode by setting the FMR0 register's FMR01 bit to "1"
(CPU rewrite mode enabled), ready to accept commands. In this case, because the FMR1 register's
FMR11 bit = 0, EW0 mode is selected. The FMR01 bit can be set to "1" by writing "0" and then "1" in
succession.
Use software commands to control program and erase operations. Read the FMR0 register or status
register to check the status of program or erase operation at completion.
When shifting to erasure-suspend during auto erasing, set the FMR40 bit to "1" (Suspend enable) and
the FMR41 bit to "1" (Suspend request).
After waiting for td (SR-ES) time, access user ROM area after confirming that the FMR46bit has been
set to "1" (Erase inactive).
Setting the FMR41 bit to "0" (Erase restart), the erasure operation is resumed.
19.5.2 EW1 mode
EW1 mode is selected by setting FMR11 bit to "1" (by writing "0" and then "1" in succession) after
setting the FMR01 bit to "1" (by writing "0" and then "1" in succession).
Read the FMR0 register to check the status of program or erase operation at completion. The status
register cannot be read during EW1 mode.
When enabling the erasure-suspend feature, execute the block erase command after setting the
FMR40 bit to "1" (Suspend enable).
In addition, the interrupt for shifting to erasure suspend has to have been enabled beforehand.
When shifting to erasure-suspend after td (SR-ES) time from interrupt request, the interrupt request is
accepted.
When the interrupt request occurs, the FMR41bit is set to "1" (Suspend request) automatically and
erasure operation is suspended.
After processing the interrupt, when the FM00 bit is "0" (Busy (being erased)), set the FMR41 bit to "0"
and re-execute the block erase command.
Rev.1.00 Oct 20, 2004 page 179 of 222
REJ09B0007-0100Z