English
Language : 

UPD78F9234MC-5A4-A Datasheet, PDF (329/419 Pages) Renesas Technology Corp – Old Company Name in Catalogs and Other Documents
CHAPTER 19 FLASH MEMORY
; Setting internal verify command
FlashVerify:
MOVW
HL,#WriteAdr ; Sets verify address
MOV
FLCMD,#02H
; Sets flash control command (internal verify 2)
MOV
A,H
MOV
FLAPH,A
; Sets verify start address
MOV
A,L
MOV
FLAPL,A
; Sets verify start address
MOV
A,D
MOV
FLAPHC,A
; Sets verify end address
MOV
A,E
MOV
FLAPLC,A
; Sets verify end address
CALL
!ModeOn
; Shift to self programming mode
; Execution of internal verify command
MOV
PFS,#00H
; Clears flash status register
MOV
WDTE,#0ACH
; Clears & restarts WDT
HALT
; Self programming is started
MOV
A,PFS
CMP
A,#00H
BNZ
$StatusError ; Checks internal verify error
; Performs abnormal termination processing when an error occurs
CALL
!ModeOff
; Shift to normal mode
BR
StatusNormal
;---------------------------------------------------------------------
;END (abnormal termination processing); Perform processing to shift to
normal mode in order to return to normal processing
;---------------------------------------------------------------------
StatusError:
;---------------------------------------------------------------------
;END (normal termination processing)
;---------------------------------------------------------------------
StatusNormal:
User’s Manual U17446EJ5V0UD
327