![](http://datasheet.mmic.net.cn/110000/M32186F8VFP_datasheet_3496152/M32186F8VFP_159.png)
6
INTERNAL MEMORY
6-17
32185/32186 Group Hardware Manual
Rev.1.10 REJ09B0235-0110 May 15, 07
6.5 Registers Associated with Internal Flash Memory
6.5.3 Flash Control Registers
Flash Control Register 1 (FCNT1)
<Address: H’0080 01E2>
<Upon exiting reset: H’00>
b
Bit Name
Function
R
W
0–2
No function assigned. Fix to "0."
00
3
FENTRY
0: Normal read
R
W
Flash E/W enable mode entry bit
1: Program/erase enable
4–6
No function assigned. Fix to "0."
00
7
FEMMOD
0: Normal mode
R
W
Virtual flash emulation mode bit
1: Virtual flash emulation mode
Flash Control Register 1 (FCNT1) consists of the following two bits to control the internal flash memory.
(1) FENTRY (Flash E/W Enable Mode Entry) bit (Bit 3)
The FENTRY bit controls entry to flash E/W enable mode. Flash E/W enable mode can only be entered
when FENTRY = "1."
To set the FENTRY bit to "1," write "0" and then "1" to the FENTRY bit in succession while the FP pin = "H." To
clear the FENTRY bit, check to see that the Flash Status Register (FSTAT) FBUSY bit = "1" (ready), issue Read
Array comands (or Flash memory reset by FRESET bit),make sure that FAENS bit ="1," and then write "0" to the
FENTRY bit. However, when Flash memory is not reset by FRESET bit, it is not required to check the FAENS bit.
Note that the following operations cannot be performed while programming or erasing the internal flash
memory (FSTAT FBUSY bit = "0"). If one of these operations is attempted, the FENTRY bit is cleared to "0"
in hardware.
1) Writing "0" to the FENTRY bit
2) Entering a "L" level signal to the FP pin
3) Entering a "L" level signal to the RESET# pin
When running a program resident in the internal flash memory while the FENTRY bit = "0," the EI vector
entry is located at the address H’0000 0080 of the internal flash memory. When running the flash write/
erase program in the RAM while the FENTRY bit = "1," the EI vector entry is located at the address H’0080
4000 of the RAM, allowing the flash programming/erase operation to be controlled using interrupts.
Table 6.5.1 Changes of the EI Vector Entry by FENTRY
FENTRY
EI Vector Entry
Address
0
Internal flash memory area
H'0000 0080
1
Internal RAM area
H'0080 4000
(2) FEMMOD (Virtual Flash Emulation Mode) bit (Bit 7)
The FEMMOD bit controls entry to virtual flash emulation mode. Virtual flash emulation mode is entered by
setting the FEMMOD bit to "1" while the FENTRY bit = "0." (For details, see Section 6.7, “Virtual Flash
Emulation Function.”)
b0
12
3456
b7
FENTRY
FEMMOD
000
0000
0