![](http://pdfasset.owneriq.net/6/b9/6b987e72-a4f4-4ccb-87ec-e3052083ac5a/6b987e72-a4f4-4ccb-87ec-e3052083ac5a-bg11a.png)
EMBEDDED FLASH MEMORY INTERFACE S3F80P5_UM_ REV1.00
SECTOR_ERASE:
LD R12,SecNumH
LD R14,SecNumL
MULT RR12,#80H ; Calculation the base address of a target sector
MULT RR14,#80H ; The size of one sector is 128-bytes
ADD R13,R14
; BTJRF FLAGS.7,NOCARRY
; INC R12
NOCARRY:
LD R10,R13
LD R11,R15
ERASE_START:
SB1
LD FMUSR,#0A5H ; User program mode enable
LD FMSECH,R10 ; Set sector address
LD FMSECL,R11
LD FMCON,#10100001B ; Select erase mode enable & Start sector erase
ERASE_STOP:
LD FMUSR,#00H ; User program mode disable
SB0
RET
14-10