English
Language : 

HD64F3644PV Datasheet, PDF (162/551 Pages) Renesas Technology Corp – Old Company Name in Catalogs and Other Documents
Section 6 ROM
Sample Program for Erasing Multiple Blocks
This program uses the following registers:
R0: Used for erase block specification (set as explained below). Also stores address used in
prewrite and erase-verify.
R1H: Used to test bits 8 to 11 of R0. Stores read data; used in dummy write.
R1L: Used to test bits 0 to 11 of R0.
R2: Specifies address where address used in prewrite and erase-verify is stored.
R3: Stores address used in prewrite and erase-verify.
R4: Stores last address of block to be erased.
R5: Used for prewrite and erase loop counter value setting.
R6L: Used for prewrite-verify and erase-verify fail count.
Arbitrary blocks can be erased by setting bits in R0. R0 settings should be made by writing with a
word transfer instruction.
A bit map of R0 and a sample setting for erasing specific blocks are shown below.
Bit:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R0
    LB3 LB2 LB1 LB0 SB7 SB6 SB5 SB4 SB3 SB2 SB1 SB0
Corresponds to EBR1
Corresponds to EBR2
Note: Bits 15 to 12 should be cleared to 0.
Example: To erase blocks LB2, SB7, and SB0
Bit:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
R0
    LB3 LB2 LB1 LB0 SB7 SB6 SB5 SB4 SB3 SB2 SB1 SB0
Corresponds to EBR1
Corresponds to EBR2
0000010010000001
R0 is set as follows:
MOV.W
MOV.B
MOV.B
#H'0481, R0
R0H,
@EBR1
R0L,
@EBR2
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.11 and 6.12.
Rev. 6.00 Sep 12, 2006 page 140 of 526
REJ09B0326-0600