English
Language : 

UPD78F9234MC-5A4-A Datasheet, PDF (313/419 Pages) Renesas Technology Corp – Old Company Name in Catalogs and Other Documents
CHAPTER 19 FLASH MEMORY
Example programs that perform internal verify 1 and 2 in self programming mode are shown below.
• Internal verify 1
;----------------------------
;START
;----------------------------
FlashVerify:
MOV
FLCMD,#01H
MOV
FLAPH,#07H
MOV
FLAPL,#00H
MOV
FLAPHC,#07H
MOV
FLAPLC,#FFH
; Sets flash control command (internal verify 1)
; Sets block number for which internal verify is performed,
; to FLAPH (Example: Block 7 is specified here)
; Sets 00H
; Sets FFH
MOV
MOV
HALT
MOV
MOV
PFS,#00H
WDTE,#0ACH
A,PFS
CmdStatus,A
; Clears flash status register
; Clears & restarts WDT
; Self programming is started
; Execution result is stored in variable
; (CmdStatus = 0: normal termination, other than 0: abnormal
; termination)
;----------------------------
;END
;----------------------------
• Internal verify 2
;----------------------------
;START
;----------------------------
FlashVerify:
MOV
FLCMD,#02H
MOV
FLAPH,#07H
MOV
FLAPL,#00H
MOV
FLAPHC,#07H
MOV
FLAPLC,#20H
; Sets flash control command (internal verify 2)
; Sets block number for which internal verify is
; performed, to FLAPH (Example: Block 7 is specified here)
; Sets FLAPL to the start address for verify (Example: Address
; 00H is specified here)
; Sets FLAPLC to the end address for verify (Example: Address
; 20H is specified here)
MOV
MOV
HALT
MOV
MOV
PFS,#00H
WDTE,#0ACH
A,PFS
CmdStatus,A
; Clears flash status register
; Clears & restarts WDT
; Self programming is started
; Execution result is stored in variable
; (CmdStatus = 0: normal termination, other than 0: abnormal
; termination)
;----------------------------
;END
;----------------------------
User’s Manual U17446EJ5V0UD
311