6
6-28
Rev.1.0
(4) Block Erase command
The Block Erase command erases the contents of the internal flash memory one block at a time.
For Block Erase, write the command data H'2020 to any address of the internal flash memory.
Next, write the confirm command data H'D0D0 to the last even address of the memory block to
be erased. (See Table 6.5.3, "Target Blocks and the Addresses to Specify.") The content of the
memory block is erased.
Protected blocks of the flash memory cannot be accessed for erase with the Block Erase
command.
Block Erase is automatically performed by the internal control circuit, and the completion of Block
Erase can be verified by checking the Flash Status Register 1 (FSTAT1) FSTAT1 bit. (Refer to
Section 6.4.2, "Flash Status Registers.") While the FSTAT1 bit = 0, you cannot erase the next
block.
(5) Erase All Unlock Blocks command
The Erase All Unlock Blocks command erases all unprotected memory blocks. To erase all
unprotected memory blocks, write the command data H'A7A7 to any address of the internal flash
memory. Next, write the command data H'D0D0 to any address of the internal flash memory, and
all of the unprotected memory blocks are erased.
(6) Read Status Register command
The Read Status Register command reads the content of Flash Status Register 2 (FSTAT2) that
indicates whether programming or erase operation on flash memory has terminated normally or
in an error. To read Flash Status Register 2, write the command data H'7070 to any address of
the internal flash memory. Next, read any address of the internal flash memory, and Flash Status
Register 2 (FSTAT2) is read out.
(7) Clear Status Register command
The Clear Status Register command clears the Flash Status Register 2 (FSTAT2) ERASE (auto
erase operating status), WRERR1 (program operating status 1), and WRERR2 (program
operating status 2) bits to 0. Write the command data H'5050 to any address of the internal flash
memory, and Flash Status Register 2 is cleared to 0.
If an error occurs when programming or erasing the flash memory and the Flash Status Register
2 (FSTAT2) ERASE (auto erase operating status), WRERR1 (program operating status 1), or
WRERR2 (program operating status 2) bit is set to 1, you cannot perform the next program or
erase operation unless WRERR1 (Program operating condition 1) or WRERR2 (Program
operating condition 2) is cleared to 0.
INTERNAL MEMORY
6.5 Programming the Internal Flash Memory
Содержание 32172
Страница 20: ... This is a blank page 16 ...
Страница 21: ...1 1 Overview 1 2 Block Diagram 1 3 Pin Functions 1 4 Pin Layout CHAPTER 1 CHAPTER 1 OVERVIEW ...
Страница 44: ...1 1 24 Rev 1 0 This is a blank page Overview 1 4 Pin Layout ...
Страница 58: ...2 2 14 Rev 1 0 This is a blank page CPU 2 6 Data Formats ...
Страница 122: ...4 4 26 Rev 1 0 This is a blank page EIT 4 13 Precautions on EIT ...
Страница 200: ...7 7 6 Rev 1 0 This is a blank page RESET 7 4 Precautions to Be Taken Immediately after Reset ...
Страница 240: ...8 8 40 Rev 1 0 This is a blank page INPUT OUTPUT PORTS AND PIN FUNCTIONS 8 5 Precautions on Input Output Ports ...
Страница 298: ...9 9 58 Rev 1 0 This is a blank page DMAC 9 4 Precautions on Using DMAC ...
Страница 416: ...10 10 118 Rev 1 0 This is a blank page INPUT OUTPUT TIMERS 10 6 TOM Output Related 16 bit Timers ...
Страница 658: ...14 14 16 Rev 1 0 REAL TIME DEBUGGER RTD 14 4 Typical Connection with the Host This is a blank page ...
Страница 718: ...16 16 16 Rev 1 0 This is a blank page D A CONVERTERS 16 3 Functional Description of the D A Converters ...
Страница 766: ...18 18 22 Rev 1 0 WAIT CONTROLLER 18 3 Typical Operation of the Wait Controller This is a blank page ...
Страница 776: ...19 19 10 Rev 1 0 RAM BACKUP MODE 19 4 Exiting RAM Backup Mode Wakeup This is a blank page ...
Страница 777: ...CHAPTER 20 CHAPTER 20 OSCILLATION CIRCUIT 20 1 Oscillator Circuit 20 2 Clock Generator Circuit ...
Страница 782: ...20 20 6 Rev 1 0 OSCILLATION CIRCUIT 20 2 Clock Generator Circuit This is a blank page ...
Страница 856: ...23 23 26 Rev 1 0 This is a blank page ELECTRICAL CHARACTERISTICS 23 6 AC Characteristics ...
Страница 857: ...24 1 A D Conversion Characteristics CHAPTER 24 CHAPTER 24 STANDARD CHARACTERISTICS ...
Страница 859: ...Appendix 1 1 Dimensional Outline Drawing APPENDIX 1 APPENDIX 1 MECHANICAL SPECIFICATIONS ...
Страница 861: ...Appendix 2 1 M32R E Instruction Processing Time APPENDIX 2 APPENDIX 2 INSTRUCTION PROCESSING TIME ...
Страница 865: ...Appendix 3 1 Precautions about Noise APPENDIX 3 APPENDIX 3 PRECAUTIONS ABOUT NOISE ...