
Section 6 ROM
Rev. 6.00 Sep 12, 2006 page 140 of 526
REJ09B0326-0600
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
0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1
R0 is set as follows:
MOV.W #H'0481, R0
MOV.B R0H, @EBR1
MOV.B 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.
Содержание F-ZTAT H8/3642A Series
Страница 6: ...Rev 6 00 Sep 12 2006 page iv of xx ...
Страница 8: ...Rev 6 00 Sep 12 2006 page vi of xx ...
Страница 21: ...Rev 6 00 Sep 12 2006 page xix of xx Appendix E Product Code Lineup 522 Appendix F Package Dimensions 524 ...
Страница 22: ...Rev 6 00 Sep 12 2006 page xx of xx ...
Страница 124: ...Section 5 Power Down Modes Rev 6 00 Sep 12 2006 page 102 of 526 REJ09B0326 0600 ...
Страница 188: ...Section 6 ROM Rev 6 00 Sep 12 2006 page 166 of 526 REJ09B0326 0600 ...
Страница 190: ...Section 7 RAM Rev 6 00 Sep 12 2006 page 168 of 526 REJ09B0326 0600 ...
Страница 298: ...Section 9 Timers Rev 6 00 Sep 12 2006 page 276 of 526 REJ09B0326 0600 ...
Страница 378: ...Section 12 A D Converter Rev 6 00 Sep 12 2006 page 356 of 526 REJ09B0326 0600 ...
Страница 446: ...Section 13 Electrical Characteristics Rev 6 00 Sep 12 2006 page 424 of 526 REJ09B0326 0600 ...