English
Language : 

UPD78F9234MC-5A4-A Datasheet, PDF (316/419 Pages) Renesas Technology Corp – Old Company Name in Catalogs and Other Documents
CHAPTER 19 FLASH MEMORY
MOV
MOV
MOV
HALT
MOV
CMP
BNZ
FLAPHC,#07H
FLAPLC,#0FFH
WDTE,#0ACH
A,PFS
A,#00H
$StatusError
; Sets blank check block compare number (same value as of
; FLAPH)
; Fixes FLAPLC to “FFH”
; Clears & restarts WDT
; Self programming is started
; Checks blank check error
; Performs abnormal termination processing when an error
; occurs
MOV
ModeOffLoop:
MOV
MOV
MOV
MOV
MOV
FLCMD,#00H
PFS,#00H
PFCMD,#0A5H
FLPMC,#00H
FLPMC,#0FFH
FLPMC,#00H
; Clears FLCMD register
; Clears flash status register
; PFCMD register control
; FLPMC register control (sets value)
; FLPMC register control (inverts set value)
; Sets normal mode via FLPMC register control (sets value)
BT
PFS.0,$ModeOffLoop ; Checks completion of write to specific registers
; Repeats the same processing when an error occurs
; Restore the CPU clock to its setting before the self
; programming, after normal completion of the specific
; sequence
MOV
MK0,#INT_MK0
; Restores interrupt mask flag
MOV
MK1,#INT_MK1
EI
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:
314
User’s Manual U17446EJ5V0UD