
21.3.2
Sector erase (4-kbyte partial erase)
This command erases the flash memory in units of 4 kbytes. The flash memory area to be erased is specified
by the upper 4 bits of the 6th bus write cycle address. The range of addresses that can be specified is shown in
Table 21-3. For example, to erase 4 kbytes from 0x8000 through 0x8FFF in the code area, set FLSCR1<FAREA>
to "0y10", set "0xD5" on FLSCR2<CR1EN>, and then specify either 0x8000 or 0x8FFF as the 6th bus write
cycle. The sector erase command is effective only in MCU and serial PROM modes, and it cannot be used in
parallel PROM mode.
The time needed to erase 4 kbytes is 30 ms maximum. The next command sequence cannot be executed if an
ongoing erase operation is not completed. To check the completion of the erase operation, perform read operations
twice on the same address in the flash memory, and perform polling until the same data is read from the flash
memory. During the erase operation, bit 6 is reversed each time a read is performed.
Data in the erased area is 0xFF.
Note 1: The data and code areas become mirror areas. As you access these areas, you are brought to the same
physical address in memory. When performing a sector erase, make sure that you erase data from either of
these two areas, not both.
Note 2: Do not perform a sector erase on areas other than those shown in
Table 21-3.Table 21-3 Range of Addresses Specifiable
Erase Area
FLSCR1
<FAREA>
Address specified by instruction
(Address of 6th bus write cycle)
AREA D1
(Data area)
0x8000 through 0x8FFF
00
0x8000 through 0x8FFF
0x9000 through 0x9FFF
0xA000 through 0xAFFF
0xB000 through 0xBFFF
0xC000 through 0xCFFF
0xD000 through 0xDFFF
0xE000 through 0xEFFF
0xF000 through 0xFFFF
AREA C1
(Code area)
0x8000 through 0x8FFF
10
0x8000 through 0x8FFF
0x9000 through 0x9FFF
0xA000 through 0xAFFF
0xB000 through 0xBFFF
0xC000 through 0xCFFF
0xD000 through 0xDFFF
0xE000 through 0xEFFF
0xF000 through 0xFFFF
21.3.3
Chip erase (all erase)
This command erases the entire flash memory.
The time needed to erase it is 30 ms maximum. The next command sequence cannot be executed if an ongoing
erase operation is not completed. To check the completion of the erase operation, perform read operations twice
on the same address in the flash memory, and perform polling until the same data is read from the flash memory.
During the erase operation, bit 6 is reversed each time a read is performed.
TMP89FM42
Page 331
RA005