![](http://datasheet.mmic.net.cn/30000/M30855FHTGP_datasheet_2359399/M30855FHTGP_422.png)
Page 399
4
9
4
f
o
5
0
2
,
1
0
.
l
u
J
3
0
.
1
.
v
e
R
3
0
1
0
-
7
3
0
B
9
0
J
E
R
25. Flash Memory Version
)
T
5
8
/
C
2
3
M
,
5
8
/
C
2
3
M
(
p
u
o
r
G
5
8
/
C
2
3
M
25.3.3 Flash Memory Control Register (FMR0 Register and FMR1 Register)
Figure 25.4 FMR0 Register
Flash Memory Control Register 0
Symbol
Address
After Reset
FMR0
005716
0000 00012
RW
RO
RW
RO
RW
RO
FMR00
FMR01
FMR02
RY/BY Status Flag
FMSTP
(b4)
FMR05
FMR06
FMR07
CPU Rewrite Mode
Select Bit(1, 7)
Lock Bit Disable
Select Bit(2)
Flash Memory Stop
Bit(3, 5)
User ROM Area Select
Bit(3) (Available in boot
mode only)
Program Status Flag(4)
Erase Status Flag(4)
Bit Name
Function
Bit
Symbol
0 : BUSY (programming or erasing)(6)
1 : READY
0 : Disables CPU rewrite mode
1 : Enables CPU rewrite mode
0 : Enables the lock bit
1 : Disables the lock bit
0 : Starts the flash memory
1 : Stops the flash memory
(Enters low power consumption state
and flash memory is reset)
0 : Boot ROM area is accessed
1 : User ROM area is accessed
0 : Successfully completed
1 : Terminated by error
0 : Successfully completed
1 : Terminated by error
Reserved Bit
Set to "0"
NOTES:
1. Set the FMR01 bit while the NMI pin is held "H". Set it by program in a space other than the flash
memory in EW mode 0.
2. Set the FMR02 bit to "1" in 8-bit unit immediately after setting it first to "0" while the FMR01 bit is set to
"1". Do not generate an interrupt or a DMA transfer between setting the FMR02 bit to "0" and setting it
to "1".
3. Set the FMSTP and FMR05 bits by program in a space other than the flash memory.
4. The FMR07 and FMR06 bits is set to "0" by executing the clear status command.
5. FMSTP bit setting is enabled when the FMR01 bit is set to "1" (CPU rewrite mode enabled).
The FMSTP bit can be set to "1" when the FMR01 bit is set to "0", but the flash memory does not enter
low-power consumption state nor is reset.
6. Write and read operations by the lock bit program command and read lock bit status command are
included.
7. To change a FMR01 bit setting from "0" to "1", set the FMR01 bit to "1" immediately after setting it
first to "0" in 8-bit unit. Do not generate an interrupt or a DMA transfer between setting the FMR01 bit to
"0" and setting it to "1".
To change a FMR01 bit setting from "1" to "0", enter read array mode to write to addresses 005716
in 16-bit unit. Write "0016" into 8 high-order bits.
e. g., to change a FMR01 bit setting from "1" to "0";
Assembly language:
mov.w
#0000h, 0057h
b7
b6
b5
b4
b3
b2
b1
b0
0