S3F84B8_UM_REV 1.00
19 EMBEDDED FLASH MEMORY INTERFACE
19-3
19.1.5 FLASH MEMORY CONTROL REGISTERS (USER PROGRAM MODE)
19.1.5.1 Flash Memory Control Register (FMCOn)
The FMCON register is only available in User Program mode to select the Flash Memory Operation mode, sector
erase, and byte programming, and to make the status of flash memory as hard lock protection.
Flash Memory Control Register
(FMCON)
.7
.6
. 5
.4
.3
.2
.1
.0
MSB
LSB
(Erase or Hard Lock Protection)
(This bit will be automatically cleared just
after erase operation)
Flash Memory Mode Selection Bits
Not used for S3F84B8
Flash operation start bit
0 = operation stop
1 = operation start
F5H, Set1, Bank1
0101 = Programming mode
1010 = Erase mode
0110 = Hard lock mode
Others: not used for S3F84B8
Figure 19-2 Flash Memory Control Register (FMCON)
The bit 0 of FMCON register (FMCON.0) specifies a bit for the start of Erase and Hard Lock Protection operations.
Therefore, both Erase and Hard Lock Protection operations are activated when you set FMCON.0 to “1”. If you
write FMCON.0 to 1 for erasing, the CPU is stopped automatically for erasing time (minimum for 4ms). After
erasing time, the CPU is restarted automatically. When you read or program a byte data from or into flash
memory, you do not need to touch this bit.
19.1.5.2 Flash Memory User Programming Enable Register (FMUSR)
The FMUSR register is used for safe operation of the flash memory. This register will protect undesired erase or
program operation from malfunctioning of the CPU caused by electrical noise. After reset, the User Program mode
is disabled because the value of FMUSR becomes “00000000B” due to reset operation. If it is necessary to
operate the flash memory, you can use the User Program mode by setting the value of FMUSR to “10100101B”. If
the value of FMUSR is other than “10100101B,” User Program mode is disabled.
Flash Memory User Programming Enable Register (FMUSR)
EEH, Set1, Bank 1, R/W
.7
.6
.5
.4
.3
.2
.1
.0
MSB
LSB
Flash Memory User Programming Enable Bits
10100101: Enable user programming mode
Other values: Disable user programming mode
Figure 19-3 Flash Memory User Programming Enable Register (FMUSR)