Flash Area; Internal Flash Memory; Flash Programming; Protect Bits - Epson S1C17704 Technical Manual

Cmos 16-bit single chip microcomputer
Table of Contents

Advertisement

3.2 Flash Area

3.2.1 Internal Flash Memory

The 64K-byte area from address 0x8000 to address 0x17fff contains a Flash memory (4K bytes × 16 sectors) for
storing application programs and data. Address 0x8000 is defined as the vector table base address, therefore a
vector table (see Section 2.4, "Vector Table") must be placed from the beginning of the area. The Flash memory
can be read in 1 to 5 cycles.

3.2.2 Flash Programming

The S1C17704 supports on-board programming of the Flash memory, it makes it possible to program the Flash
memory with the application programs/data by using the debugger through the ICD Mini. Furthermore, the
S1C17704 supports self-programming by the application program stored in the Flash memory. The Flash memory
can be programmed in 16-bit units. For programming of the Flash memory, see Appendix B, "Flash Programming."
The Flash memory supports two erase methods, chip erase and sector erase. The table below lists the
correspondence between addresses and sectors required for sector erase.
Note: The debugger supports chip erase only and does not allow erasing in sector units.
Table 3.2.2.1 Correspondence Between Memory Address and Flash Sector
S1C17704 address
0x0f000–0x0ffff
0x0e000–0x0efff
0x0d000–0x0dfff
0x0c000–0x0cfff
0x0b000–0x0bfff
0x0a000–0x0afff
0x09000–0x09fff
0x08000–0x08fff
Note: The 32 bits (0x17ffc–0x17fff) at the end of Sector 15 are reserved for the system as the protect
bits. Do not program this area with data other than protect settings.

3.2.3 Protect Bits

In order to protect the memory contents, the Flash memory provides two protection features, write protection and
data read protection, that can be configured for every 16K-byte areas. The write protection disables writing data
to the configured area. The data-read protection disables reading data from the configured area (the read value is
always 0x0000). However, it does not disable the instruction fetch operation by the CPU.
The Flash memory provides the protect bits listed below. Program the protect bit corresponding to the area to be
protected to 0.
0x17ffc–0x17ffe: Flash Protect Bits
Address
Bit
0x17ffc
D15–4 reserved
(16 bits)
D3
Flash write-protect bit for 0x14000–0x17fff
D2
Flash write-protect bit for 0x10000–0x13fff
D1
Flash write-protect bit for 0x0c000–0x0ffff
D0
Flash write-protect bit for 0x08000–0x0bfff
0x17ffe
D15–4 reserved
(16 bits)
D3
Flash data-read-protect bit for 0x14000–0x17fff
D2
Flash data-read-protect bit for 0x10000–0x13fff
D1
Flash data-read-protect bit for 0x0c000–0x0ffff
D0
reserved
Notes: • Be sure not to locate the area with data-read protection into the .data and .rodata sections.
• Be sure to set D0 of address 0x17ffe to 1. If it is set to 0, the program cannot be booted.
S1C17704 TECHNICAL MANUAL
Flash sector number
7
6
5
4
3
2
1
0
Function
EPSON
3 MEMORY MAP, BUS CONTROL
S1C17704 address
0x17000–0x17fff
0x16000–0x16fff
0x15000–0x15fff
0x14000–0x14fff
0x13000–0x13fff
0x12000–0x12fff
0x11000–0x11fff
0x10000–0x10fff
Setting
1 Writable
0 Protected
1 Writable
0 Protected
1 Writable
0 Protected
1 Writable
0 Protected
1 Readable
0 Protected
1 Readable
0 Protected
1 Readable
0 Protected
1
Flash sector number
15
14
13
12
11
10
9
8
Init. R/W
Remarks
1
R/W
1
R/W
1
R/W
1
R/W
1
R/W
1
R/W
1
R/W
1
R/W Always set to 1.
3-3

Advertisement

Table of Contents
loading

Table of Contents