Samsung S3F80JB User Manual

Page 290

Advertising
background image

S3F80JB

EMBEDDED FLASH MEMORY INTERFACE

15-11

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

Advertising