English
Language : 

HD64F3642AHV Datasheet, PDF (158/551 Pages) Renesas Technology Corp – Old Company Name in Catalogs and Other Documents
Section 6 ROM
PREWRT: MOV.B #H'00, R6L
MOV.W #H'a, R5
PREWRS: INC R6L
MOV.B #H'00, R1H
MOV.B R1H, @R3
MOV.W #H'FE5A, R4
MOV.B R4L, @TCSRW:8
MOV.B R4H, @TCW:8
MOV.B #H'36, R4L
MOV.B R4L, @TCSRW:8
MOV.W R5,
R4
BSET #0,
@FLMCR:8
LOOPR1: SUBS #1,
R4
MOV.W R4,
R4
BNE LOOPR1
BCLR #0,
@FLMCR:8
MOV.B #H'50, R4L
MOV.B R4L, @TCSRW:8
MOV.B #H'c, R4H
LOOPR2: DEC R4H
BNE LOOPR2
MOV.B @R3, R1H
BEQ PWVFOK
CMP.B #H'06, R6L
BEQ ABEND1
ADD.W R5,
R5
BRA PREWRS
;Prewrite verify fail counter
;Set prewrite loop counter
;Prewrite-vector fail counter + 1 → R6L
;
;Write H'00
;
;
;
;
;Start watchdog timer
;Set prewrite loop counter
;Set P bit
;
;
;Wait loop
;Clear P bit
;
;Stop watchdog timer
;Set prewrite-verify loop counter
;
;Wait loop
;Read data = H'00?
;If read data = H'00, branch to PWVFOK
;Prewrite-verify executed 6 times?
;If prewrite-verify executed 6 times, branch to ABEND1
;Double the programming time
;Prewrite again
ABEND1: Write error
PWVFOK: ADDS #1,
R3
CMP.W R2,
R3
BNE PREWRT
;Address + 1 → R3
;Last address?
;If not last address, prewrite next address
; Execute erase
Rev. 6.00 Sep 12, 2006 page 136 of 526
REJ09B0326-0600