NEC 78K0S/KA1+ User Manual page 304

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0S/KA1+:
Table of Contents

Advertisement

MOV
FLAPHC,#07H
MOV
FLAPLC,#0FFH
MOV
WDTE,#0ACH
HALT
MOV
A,PFS
CMP
A,#00H
BNZ
$StatusError
ModeOffLoop:
MOV
PFS,#00H
MOV
PFCMD,#0A5H
MOV
FLPMC,#00H
MOV
FLPMC,#0FFH
MOV
FLPMC,#00H
MOV
A,PFS
CMP
A,#00H
BNZ
$ModeOffLoop
MOV
MK0,#INT_MK0
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:
304
CHAPTER 18 FLASH MEMORY
; 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.
; 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)
; Checks completion of write to specific registers
; Repeats the same processing when an error occurs
; Restores interrupt mask flag
User's Manual U16898EJ3V0UD

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents