
Section 6 ROM
Rev. 6.00 Sep 12, 2006 page 136 of 526
REJ09B0326-0600
PREWRT: MOV.B #H'00, R6L
;
Prewrite verify fail counter
MOV.W
#H'a,
R5 ;
Set prewrite loop counter
PREWRS: INC
R6L
;
Prewrite-vector fail c 1
→
R6L
MOV.B
#H'00,
R1H
;
MOV.B
R1H,
@R3
;
Write H'00
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
;
Start watchdog timer
MOV.W
R5,
R4 ;
Set prewrite loop counter
BSET
#0,
@FLMCR:8
;
Set P bit
LOOPR1: SUBS
#1,
R4
;
MOV.W
R4,
R4 ;
BNE
LOOPR1
;
Wait loop
BCLR
#0,
@FLMCR:8
;
Clear P bit
MOV.B
#H'50,
R4L
;
MOV.B
R4L,
@TCSRW:8
;
Stop watchdog timer
MOV.B
#H'c,
R4H
;
Set prewrite-verify loop counter
LOOPR2: DEC
R4H
;
BNE
LOOPR2
;
Wait loop
MOV.B
@R3,
R1H
;
Read data = H'00?
BEQ
PWVFOK
;
If read data = H'00, branch to PWVFOK
CMP.B
#H'06,
R6L
;
Prewrite-verify executed 6 times?
BEQ
ABEND1
;
If prewrite-verify executed 6 times, branch to ABEND1
ADD.W
R5,
R5 ;
Double the programming time
BRA
PREWRS
;
Prewrite again
ABEND1:
Write error
PWVFOK: ADDS
#1,
R3
;
A 1
→
R3
CMP.W
R2,
R3 ;
Last address?
BNE
PREWRT
;
If not last address, prewrite next address
;
Execute erase
Summary of Contents for F-ZTAT H8/3642A Series
Page 6: ...Rev 6 00 Sep 12 2006 page iv of xx ...
Page 8: ...Rev 6 00 Sep 12 2006 page vi of xx ...
Page 22: ...Rev 6 00 Sep 12 2006 page xx of xx ...
Page 124: ...Section 5 Power Down Modes Rev 6 00 Sep 12 2006 page 102 of 526 REJ09B0326 0600 ...
Page 188: ...Section 6 ROM Rev 6 00 Sep 12 2006 page 166 of 526 REJ09B0326 0600 ...
Page 190: ...Section 7 RAM Rev 6 00 Sep 12 2006 page 168 of 526 REJ09B0326 0600 ...
Page 298: ...Section 9 Timers Rev 6 00 Sep 12 2006 page 276 of 526 REJ09B0326 0600 ...
Page 378: ...Section 12 A D Converter Rev 6 00 Sep 12 2006 page 356 of 526 REJ09B0326 0600 ...
Page 446: ...Section 13 Electrical Characteristics Rev 6 00 Sep 12 2006 page 424 of 526 REJ09B0326 0600 ...