English
Language : 

M16C1N Datasheet, PDF (192/238 Pages) Renesas Technology Corp – RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTER M16C FAMILY / M16C/10 SERIES
M16C/1N Group
19. Flash Memory Version
Figure 19.4 shows the FMR0 register and Figure 19.5 shows the FMR1 and FMR4 registers.
(1) FMR00 bit
This bit indicates the operating status of the flash memory. The bit is "0" when the program or erase
program is running; otherwise, the bit is "1".
(2) FMR01 bit
The microcomputer is made ready to accept commands by setting the FMR01 bit to "1" (CPU rewrite mode).
During boot mode, make sure the FMR05 bit also is "1" (user ROM area access).
(3) FMR02 bit
Block 0 and 1 do not accept the program or erase command while the FMR02 bit is set to "0" (inhibit
rewriting).
(4) FMSTP bit
This bit is provided for initializing the flash memory control circuits, as well as for reducing the amount
of current consumed in the flash memory. The internal flash memory cannot be accessed by setting
the FMSTP bit to "1". Therefore, the FMSTP bit must be written to by a program in a memory area
other than the flash memory.
In the following cases, set the FMSTP bit to "1":
• When flash memory access resulted in an error while erasing or programming in EW0 mode
(FMR00 bit not reset to "1" (ready))
• When entering low power mode or on-chip oscillator low power mode
Figure 19.7 shows a flow chart to be followed before and after entering low power mode.
Note that when going to stop or wait mode, the FMR0 register does not need to be set because the
power for the internal flash memory is automatically turned off and is turned back on again after
returning from stop or wait mode.
(5) FMR05 bit
This bit switches between the boot ROM and user ROM areas during boot mode. Set this bit to "0"
when accessing the boot ROM area (for read) or "1" (user ROM access) when accessing the user
ROM area (for read, write or erase).
(6) FMR06 bit
This is a read-only bit indicating the status of auto program operation. The bit is set to "1" when a
program error occurs; otherwise, it is cleared to "0". For details, refer to the description of 19.5.6 Full
Status Check.
(7) FMR07 bit
This is a read-only bit indicating the status of auto erase operation. The bit is set to "1" when an erase error
occurs; otherwise, it is cleared to "0". For details, refer to the description of 19.5.6 Full Status Check.
(8) FMR11 bit
Setting this bit to "1" places the microcomputer in EW1 mode. This bit is relevant if the FMR01 bit is set.
(9) FMR16 bit
When the FMR16bit is "0" (Rewrite disable), the block 0-3 don't accept the program and the block
erase commands. This bit is relevant if the FMR01 bit is set.
(10) FMR 40bit
When setting the FMR40 bit to "1", the erasure-suspend feature is enabled.
Rev.1.00 Oct 20, 2004 page 180 of 222
REJ09B0007-0100Z