English
Language : 

SH7018 Datasheet, PDF (355/431 Pages) Renesas Technology Corp – SuperH™ RISC engine
Sample 128-Byte Programming Program: The wait time set values (number of loops) are for
the case where f = 20 MHz. For other frequencies, the set value is given by {wait time (µs) × f
(MHz) ÷ 4}.
Registers Used
R11 (input): Program data storage address
R12 (input): Programming destination address
R13 (output): OK (normal) or NG (error)
R0–10, 14: Work registers
FLMCR1
OK
NG
WAIT_X
WAIT_Y
WAIT_Z1
WAIT_Z5
WAIT_ZA
WAIT_A
WAIT_B
WAIT_C
WAIT_D
WAIT_E
WAIT_F
WDT_TCSR .EQU
WDT_1m
SWESET
PSUSET
PSET
PCLEAR
PSUCLEAR .EQU
PVSET
PVCLEAR
SWECLEAR .EQU
MAXVERIFY
;
FLASHPROGRAM
MOV
MOV.L
.EQU H'80
.EQU H'0
.EQU H'1
.EQU 5
.EQU 250
.EQU 150
.EQU 1000
.EQU 50
.EQU 25
.EQU 25
.EQU 20
.EQU 10
.EQU 10
.EQU 500
H'FFFF8610
.EQU H'A57A
.EQU H'40
.EQU H'50
.EQU H'51
.EQU H'50
H'40 ; B'01000000
.EQU H'44
.EQU H'40
H'00 ; B'00000000
.EQU 1000
.EQU $
R11,R3
#RDATABUFF,R0
; 1 µs
; 50 µs
; 30 µs (1st to 6th time)
; 200 µs (7th to 1000th time)
; 10 µs (Additional write)
; 5 µs
; 5 µs
; 4 µs
; 2 µs
; 2 µs
; 100 µs
; B'01000000
; B'01010000
; B'01010001
; B'01010000
; B'01000100
; B'01000000
; Save program data to
; work area
339