Programming tip ⎯ sector erase – Samsung S3C8275X User Manual

Page 291

Advertising
background image

EMBEDDED FLASH MEMORY INTERFACE

S3F8275X

16-8

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/FMSECL).

3. Check user’s ID code (written by user).

4. Set Flash Memory Control Register (FMCON) to "10100001B".

5. Set Flash Memory User Programming Enable Register (FMUSR) to "00000000B"

6. Check the "sector erase status bit" whether "sector erase" is success or not.

PROGRAMMING TIP

Sector Erase

SB1

reErase:

LD

FMUSR,#0A5H

; User program mode enable

LD

FMSECH,#10H

LD

FMSECL,#00H

; Set sector address (1000H

− 107FH)

CP

UserID_Code,#User_value ; Check user’s ID code (written by user)

; User_value is any value by user

JR

NE,Not_ID_Code

; If not equal, jump to Not_ID_Code

LD

FMCON,#10100001B

; Start sector erase

NOP

; Dummy instruction, this instruction must be needed

NOP

; Dummy instruction, this instruction must be needed

LD

FMUSR,#0

; User program mode disable

TM

FMCON,#00001000B

;

Check

"Sector erase status bit"

JR

NZ,reErase

; Jump to reErase if fail


Not_ID_Code:

SB1

LD

FMUSR,#0

; User Program mode disable

Advertising
This manual is related to the following products: