Download Print this page

Renesas M16C/50 Series User Manual page 689

Advertisement

M16C/5L Group, M16C/56 Group
FMR01 (CPU rewrite mode select bit) (b1)
Commands can be accepted by setting the FMR01 bit to 1 (CPU rewrite mode enabled).
To set the FMR01 bit to 1, write 0 and then 1 in succession. Do not generate any interrupts or DMA
transfers between setting 0 and 1.
Change the FMR01 bit when the PM24 bit in the PM2 register is 0 ( NMI interrupt disabled) or high is
input to the NMI pin.
While in EW0 mode, write to this bit from a program in RAM.
Enter read array mode, and then set this bit to 0.
FMR02 (Lock bit disable select bit) (b2)
The lock bit is disabled by setting the FMR02 bit to 1 (lock bit disabled) (Refer to 26.8.4 "Data Protect
Function").
The FMR02 bit does not change the lock bit data, but disables the lock bit function. If an erase
command is executed when the FMR02 bit is set to 1, the lock bit data status changes from 0 (locked)
to 1 (unlocked) after command execution is completed.
To set the FMR02 bit to 1, write 0 and then 1 to the FMR02 bit in succession when the FMR01 bit is 1.
Make sure no interrupts or DMA transfers will occur before writing 1 after writing 0.
Do not change the FMR02 bit while programming, erasing or suspending.
FMSTP (Flash memory stop bit) (b3)
The FMSTP bit resets the flash memory control circuits and minimizes current consumption in the flash
memory. Access to the internal flash memory is disabled when the FMSTP bit is set to 1 (flash memory
operation stopped). Set the FMSTP bit by a program located in RAM.
Set the FMSTP bit to 1 under the following condition:
• A flash memory access error occurs while erasing or programming in EW0 mode (the FMR00 bit
does not revert to 1 (ready)).
Use the following steps to rewrite the FMSTP bit.
To stop the flash memory:
(1) Set the FMSTP bit to 1.
(2) Wait the wait time to stabilize the flash memory circuit (tps).
To restart the flash memory:
(1) Set the FMSTP bit to 0.
(2) Wait the wait time to stabilize the flash memory circuit (tps).
The FMSTP bit is enabled when the FMR01 bit is 1 (CPU rewrite mode). When the FMR01 bit is 0,
although the FMSTP bit can be set to 1 by writing 1, the flash memory is neither placed in low-power
mode nor initialized.
When the FMR22 bit is 1 (slow read mode enabled) or the FMR23 bit is 1 (low-current consumption
read mode enabled), do not set the FMSTP bit in the FMR0 register to 1 (flash memory operation
stopped). Also, when the FMSTP bit is 1, do not set the FMR22 or FMR23 bit to 1.
R01UH0127EJ0110 Rev.1.10
Sep 01, 2011
26. Flash Memory
Page 652 of 803

Advertisement

loading