Lapis ML610Q111 User Manual page 371

Table of Contents

Advertisement

LEA
MOV
MOV
MOV
MOV
MOV
MOV
;
:
(Set the write start address in ER8)
(Set the write end address in ER12)
:
SB
MOV
:
MARK:
:
(Set the write data in ER10)
:
ST
ST
MOV
ST
ST
NOP
NOP
;
L
CMP
BNE
;
ADD
CMP
BLE
;
RB
;
Note:
− Be sure to set the NOP instruction twice or more, following the write to FLASHDH instruction.
− During one-word writing, the CPU is in a wait state for max.40μs. Clear the WDT counter in a proper timing, because
the peripheral circuits continue to work.
− Use it with high-speed clock oscillation (HSCLK) enabled in the frequency control register (FCON1), and with HSCLK
selected as system clock.
FEUL610Q111
offset FLASHAL
R0,
#0FAH
R1,
#0F5H
R2,
#02H
R3,
#00H
R4,
#(offset FLASHACP)&0FFH
R5,
#(offset FLASHACP)>>8
FSELF
R3,
#00H
R0,
[ER4]
R1,
[ER4]
R6,
#02H
R6,
FLASHSEG
XR8,
[EA]
ER14,
R6:[ER8]
ER14,
ER10
ERROR
ER8,
ER2
ER8,
ER12
MARK
FSELF
Figure 23-6 Sample Program of 1-word Write
ML610Q111/ML610Q112 User's Manual
Chapter 23 Data Flash Memory
; EA <- FLASHAL address
; Flash acceptor enable data
; Flash acceptor enable data
; Address increment data
; ER4 <- FLASHACP address
; Enables the flash rewrite function
; Enable flash acceptor
; Enable flash acceptor
; Setting data for the segment
; Set address and data, start 1-word write
; * Always set
; * Always set
; Load data
; Check data
; Go to error routine on error
; Address increment
; Compare addresses
; Disables the flash rewrite function
23-18

Advertisement

Table of Contents
loading

Related Products for Lapis ML610Q111

This manual is also suitable for:

Ml610q112

Table of Contents