
Section 6 ROM
Rev. 6.00 Sep 12, 2006 page 131 of 526
REJ09B0326-0600
BSET
#0, @FLMCR:8
;
Set P bit
LOOP1: SUBS
#1, R4
;
MOV.W R4, R4
;
BNE
LOOP1
;
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'b, R4H
;
Set program-verify fail counter
BSET #2,
@FLMCR:8
;
Set PV bit
LOOP2: DEC R4H
;
BNE LOOP2
;
Wait loop
MOV.B @R3, R1L
;
Read programmed data
CMP.B R1H,
R1L ;
Compare programmed data with read data
BEQ PVOK
;
Program-verify decision
BCLR #2, @FLMCR:8
;
Clear PV bit
CMP.B #H'06,
R6L
;
Program-verify executed 6 times?
BEQ NGEND
;
If program-verify executed 6 times, branch to NGEND
ADD.W R5, R5
;
Double programming time
BRA PRGMS
;
Program again
PVOK: BCLR #2, @FLMCR:8
;
Clear PV bit
MOV.B #H'00,
R6L
;
MOV.B R6L,
@EBR*:8
;
Clear EBR
*
One byte programmed
NGEND:
Programming error
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 ...