HD6433640 HITACHI [Hitachi Semiconductor], HD6433640 Datasheet - Page 147

no-image

HD6433640

Manufacturer Part Number
HD6433640
Description
H8/3644 Series Hardware Manual
Manufacturer
HITACHI [Hitachi Semiconductor]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HD6433640RA78H
Manufacturer:
HITACHI/日立
Quantity:
20 000
Part Number:
HD6433640RB90H
Manufacturer:
RENESAS/瑞萨
Quantity:
20 000
Sample Program for Erasing One Block
This program uses the following registers:
R0:
R1H: Stores read data. Also used in dummy write.
R2:
R3:
R4:
R5:
R6L: Used for prewrite-verify and erase-verify fail count.
The values of #a, #b, #c, #d, and #e in the program depend on the operating frequency. They
should be set as indicated in tables 6.12 and 6.13. Erase block register (EBR1, EBR2) settings
should be made as indicated in sections 6.5.2 and 6.5.3 in section 6.5, Flash Memory Register
Descriptions. For #BLKSTR and #BLKEND, the start address and end address corresponding to
the set erase block register should be set as indicated in table 6.8.
138
FLMCR:
EBR1:
EBR2:
TCSRW:
TCW:
; #
; #
;
PREWRT:
PREWRS:
Execute prewrite
BLKSTR is start address of block to be erased
BLKEND is last address of block to be erased
Used for erase block specification. Also stores address used in prewrite and erase-verify.
Stores last address of block to be erased.
Stores address used in prewrite and erase-verify.
Used for prewrite, prewrite-verify, erase, and erase-verify loop counter value setting. Also
stores register set values.
Used for prewrite and erase loop counter value setting.
.EQU
.EQU
.EQU
.EQU
.EQU
.ALIGN
MOV.B
MOV.B
MOV.W
MOV.W
ADDS
MOV.W
MOV.B
MOV.W
INC
MOV.B
MOV.B
MOV.W
MOV.B
MOV.B
MOV.B
H'FF80
H'FF82
H'FF83
H'FFBE
H'FFBF
#H'**,
R0H,
#BLKSTR,
#BLKEND,
#1,
R0,
#H'00,
#H'a,
R6L
#H'00,
R1H,
#H'FE5A,
R4L,
R4H,
#H'36,
2
R0H
R0
R2
R2
R3
R6L
R5
R1H
@R3
R4
R4L
@EBR*:8
@TCSRW:8 ;
@TCW:8
;
;
;
;
;
;
;
;
;
;
;
;
;
;
Set EBR
Start address of block to be erased
Last address of block to be erased
Last address of block to be erased + 1
Start address of block to be erased
Prewrite verify fail counter
Set prewrite loop counter
Prewrite-vector fail counter + 1
Write H'00
*
R6L
R2

Related parts for HD6433640