EMBEDDED FLASH MEMORY INTERFACE S3F80P5_UM_ REV1.00
The Sector Erase Procedure in User Program Mode
1. Set Flash Memory User Programming Enable Register (FMUSR) to “10100101B”.
2. Set Flash Memory Sector Address Register (FMSECH and FMSECL).
3. Set Flash Memory Control Register (FMCON) to “10100001B”.
4. Set Flash Memory User Programming Enable Register (FMUSR) to “00000000B”.
SB1
Start
; Select Bank1
; User Programimg Mode Enable
; Set Sector Base Address
; User Prgramming Mode Disable
; Mode Select & Start Erase
FMCON #10100001B
; Select Bank0
FMUSR #00H
SB0
Finish One Sector Erase
FMSECH High Address of Sector
FMSECL Low Address of Sector
FMUSR #0A5H
Figure 14-8. Sector Erase Flowchart in User Program Mode
NOTES
1. If user erases a sector selected by Flash Memory Sector Address Register FMSECH and FMSECL,
FMUSR should be enabled just before starting sector erase operation. And to erase a sector, Flash
Operation Start Bit of FMCON register is written fr om operation stop ‘0’ to operation start ‘1’. That bit
will be cleared automatically just after the corresponding operation completed. In other words, when
S3F80P5 is in the condition that flash memory user programming enable bits is enabled and
executes start operation of sector erase, it will get the result of er asing selected sector as user’s a
purpose and Flash Operation Start Bit of FMCON register is also clear automatically.
2. If user executes sector erase operation with FMUSR disabled, FMCON.0 bit, Flash Operation Start
Bit, remains 'high', which means start operation, and is not cleared even though next instruction is
executed. So user should be careful to set FMUSR when executing sector erase, for no effect on
other flash sectors.
14-8