Page 312
21. Flash Memory
TMP89FM42
RA003
21.3 Command Sequence
In MCU and serial PROM modes, the command sequence consists of six commands (JEDEC compatible), as
shown in Table 21-1.
Note 1: Specify the address and data to be written (Refer to Table 21-2 about BA).
Note 2: The area to be erased is specified with the upper 4 bits of the address (Refer to Table 21-3 about SA).
Note 3: Do not start the STOP, IDLE0, IDLE1, IDLE2, SLEEP1 or SLEEP0 mode while a command sequence is being executed or
a task specified in a command sequence is being executed (write, erase or ID entry).
Note 4: # ; 0x8 through 0xF should be specified as the upper 4bits of the address. Usually, it is recommended that 0xF is speci-
fied.
Note 5: XXX ; Don’t care
21.3.1 Byte program
This command writes the flash memory in units of one byte. The address and data to be written are specified
in the 4th bus write cycle. The range of addresses that can be specified is shown in Table 21-2. For example, to
write data to 0x8000 in the data area, set FLSCR1<FAREA> to "0y00", set "0xD5" on FLSCR2<CR1EN>, and
then specify 0x8000 as an address in the 4th bus write cycle. The time needed to write each byte is 40
µ
s max-
imum. The next command sequence cannot be executed if an ongoing write operation is not completed. To
check the completion of the write 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 write operation, bit
6 is reversed each time a read is performed.
Note 1: To rewrite data to addresses in the flash memory where data (including 0xFF) is already written, make sure
that you erase the existing data by performing a sector erase or chip erase before writing data.
Note 2: 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 Byte Program, make sure that you write data to either of
these two areas, not both.
Note 3: Do not perform a Byte Program on areas other than those shown in Table 21-2.
Table 21-1 Command Sequence
Command sequence
1st Bus Write
Cycle
2nd Bus Write
Cycle
3rd Bus Write
Cycle
4th Bus Write
Cycle
5th Bus Write
Cycle
6th Bus Write
Cycle
Add
Data
Add
Data
Add
Data
Add
Data
Add
Data
Add
Data
1
Byte Program
0x#555
0xAA
0x#AAA
0x55
0x#555
0xA0
BA
(Note 1)
Data
(Note 1)
-
-
-
-
2
Sector Erase
(partial erase in units of
4KB)
0x#555
0xAA
0x#AAA
0x55
0x#555
0x80
0x#555
0xAA
0x#AAA
0x55
SA
(Note 2)
0x30
3
Chip Erase
(all erase)
0x#555
0xAA
0x#AAA
0x55
0x#555
0x80
0x#555
0xAA
0x#AAA
0x55
0x#555
0x10
4
Product ID Entry
0x#555
0xAA
0x#AAA
0x55
0x#555
0x90
-
-
-
-
-
-
5
Product ID Exit
0xXX
0xF0
-
-
-
-
-
-
-
-
-
-
6
Security Program
0x#555
0xAA
0x#AAA
0x55
0x#555
0xA5
0xFF7F
0x00
-
-
-
-
Table 21-2 Range of Addresses Specifiable (BA)
Write Area
FLSCR1
<FAREA>
Address specified by instruction
(Address of 4th bus write cycle)
AREA D1
(Data area)
0x8000 through 0xFFFF
00
0x8000 through 0xFFFF
AREA C1
(Code area)
0x8000 through 0xFFFF
10
0x8000 through 0xFFFF
Содержание TLCS-870/C1 Series
Страница 1: ...8 Bit Microcontroller TLCS 870 C1 Series TMP89FM42 查询TMP89FM42供应商 捷多邦 专业PCB打样工厂 24小时加急出货 ...
Страница 3: ...Revision History Date Revision 2007 10 25 1 First Release 2007 11 3 2 Contents Revised ...
Страница 4: ......
Страница 14: ......
Страница 18: ...1 3 Block Diagram TMP89FM42 1 3 Block Diagram Figure 1 2 Block Diagram ...
Страница 22: ...1 4 Pin Names and Functions TMP89FM42 ...
Страница 60: ...2 CPU Core 2 5 Revision History TMP89FM42 ...
Страница 76: ...3 Interrupt Control Circuit 3 8 Revision History TMP89FM42 ...
Страница 86: ...4 External Interrupt control circuit 4 3 Function TMP89FM42 ...
Страница 102: ...7 Voltage Detection Circuit 7 5 Revision History TMP89FM42 ...
Страница 126: ...8 I O Ports 8 3 I O Port Registers TMP89FM42 Note 2 i 0 to 1 ...
Страница 136: ...8 I O Ports 8 5 Revision History TMP89FM42 ...
Страница 142: ...9 Special Function Registers 9 3 SFR3 0x0E40 to 0x0EFF TMP89FM42 ...
Страница 146: ...10 Low Power Consumption Function for Peripherals TMP89FM42 ...
Страница 149: ...TMP89FM42 11 3 Revision History Rev Description RA001 Deleted SLEEP2 description ...
Страница 150: ...11 Divider Output DVO 11 3 Revision History TMP89FM42 ...
Страница 220: ...15 Real Time Clock RTC 15 4 Real Time Clock Operation TMP89FM42 ...
Страница 250: ...16 Asynchronous Serial Interface UART 16 15 Revision History TMP89FM42 ...
Страница 302: ...18 Serial Bus Interface SBI 18 7 Revision History TMP89FM42 ...
Страница 336: ...21 Flash Memory 21 4 Toggle Bit D6 TMP89FM42 Note 1 Make sure that you set the C register to 0x00 LD FLSCR2 0xD5 ...
Страница 338: ...21 Flash Memory 21 4 Toggle Bit D6 TMP89FM42 ...
Страница 384: ...22 Serial PROM Mode 22 15 Revision History TMP89FM42 ...
Страница 388: ...24 Input Output Circuit 24 1 Control Pins TMP89FM42 ...
Страница 404: ...25 Electrical Characteristics 25 11 Revision History TMP89FM42 ...
Страница 406: ...26 Package Dimensions TMP89FM42 ...
Страница 408: ......