English
Language : 

HD64F3642AHV Datasheet, PDF (160/551 Pages) Renesas Technology Corp – Old Company Name in Catalogs and Other Documents
Section 6 ROM
CMP.W R2,
R3
BNE EVR2
BRA OKEND
;Last address in block?
;
;
RERASE: BCLR #3,
@FLMCR:8
SUBS #1,
R3
MOV.W #H'0004, R4
CMP.W R4,
R6
BPL BRER
ADD.W R5,
R5
;Clear EV bit
;Erase-verify address – 1 → R3
;
;Erase-verify fail count = 4?
;If R6 ≥ 4. branch to BRER (branch until R6 = 4 – 602)
;If R6 < 4, double erase time (executed only for R6 = 1, 2, 3)
BRER:
MOV.W #H'025A, R4
CMP.W R4,
R6
BNE ERASE
BRA ABEND2
;
;Erase-verify executed 602 times?
;If erase-verify not executed 602 times, erase again
;If erase-verify executed 602 times, branch to ABEND2
OKEND:
BCLR #3,
MOV.B #H'00,
MOV.B R6L,
@FLMCR:8
R6L
@EBR*:8
;Clear EV bit
;
;Clear EBR*
One block erased
ABEND2: Erase error
Rev. 6.00 Sep 12, 2006 page 138 of 526
REJ09B0326-0600