The revision list can be viewed directly by
clicking the title page.
The revision list summarizes the locations of
revisions and additions. Details should always
be checked by referring to the relevant text.
Group
32
Hardware Manual
Renesas 32-Bit RISC Microcomputer
SuperH RISC engine Family/SH7700 Series
Rev.5.00
2003.9.18
Renesas 32-Bit RISC Microcomputer
SuperH RISC engine Family/SH7700 Series
SH7709S Group
Hardware Manual
REJ09B0081-0500O
Cautions
Keep safety first in your circuit designs!
1. Renesas Technology Corp. puts the maximum effort into making semiconductor products
better and more reliable, but there is always the possibility that trouble may occur with them.
Trouble with semiconductors may lead to personal injury, fire or property damage.
Remember to give due con sideration to safety when making your circuit designs, with
appropriate measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of
nonflammable material or (iii) prevention against any malfunction or mishap.
Notes regarding these materials
1. These materials are intended as a reference to assist our customers in the selection of the
Renesas Technology Corp. product best suited to the customer's application; they do not
convey any license under any intellectual prope rty rights, or any other rights, belonging to
Renesas Technology Corp. or a third party.
2. Renesas Technology C orp. assumes no responsibility for any damage, or infringement of any
third-party's rights, originating in the use of any product data, diagrams, charts, programs,
algorithms, or circuit application examples contained in these materials.
3. All information contained in these materials, including product data, diagrams, charts,
programs and algorithms represents information on products at the time of pu bl i cation of these
materials, and are subject to change by Renesas Technology Corp. without notice due to
product improvements or other reasons. It is therefore recommended that customers contact
Renesas Technology Corp. or an authorized Renesas Technology Corp. product distributor for
the latest product information before purchasing a product listed herein.
The information described here may contain technical inaccuracies or typographical errors.
Renesas Technology Corp. assumes no responsibility for any damage, liability, or other loss
rising from these inaccuracies or errors.
Please also pay attention to inf ormation published by Renesas Technology Corp. by various
means, including the Renesas Technology Corp. Semiconductor home page
(http://www.renesas.com).
4. When using any or all of the information contained in these materials, in cludin g product data,
diagrams, charts, programs, and algorithms, please be sure to evaluate all information as a total
system before maki n g a final decision on the applicability of the in f ormation and products.
Renesas Technology Corp. assumes no responsibility for any damage, liability or other loss
resulting from the information contained herein.
5. Renesas Technology Corp. semiconductors are not designed or manufactured for use in a
device or system that is used under circumstances in which human life is potentially at stake.
Please contact Renesas Technology Corp. or an authorized Renesas Technology Corp. product
distributor when considering the use of a product contained herein for any specific purposes,
such as apparatus or systems for transportation, vehicular, medical, aerospace, nuclear, or
undersea repeater use.
6. The prior written approval of Renesas Technology Corp. is necessary to reprint or reproduce in
whole or in part these materials.
7. If these products or technologies are subject to the Japanese export control restrictions, they
must be exported under a license from the Japanese government and cannot be imported into a
country other than the approved destination.
Any diversion or reexport contrary to the export control laws and regulations of Japan and/or
the country of destination is prohibited.
8. Please contact Renesas Technology Corp. for further details on these materials or the products
contained therein.
Rev. 5.00, 09/03, page iv of xliv
General Precautions on Handling of Product
1. Treatment of NC Pins
Note: Do not connect anything to the NC pins.
The NC (not connected) pins are either not connected to any of the internal circuitry or are
used as test pins or to reduce noise. If something is connected to the NC pins, the
operation of the LSI is not guaranteed.
2. Treatment of Unused Input Pins
Note: Fix all unused input pins to high or low level.
Generally, the input pins of CMOS products are high-impedance input pins. If unused pins
are in their open states, intermediate levels are induced by noise in the vicinity, a passthrough current flows internally, and a malfunction may occur.
3. Processing before Initialization
Note: When power is f i rst supplied, the product’s state is undefined.
The states of internal circuits are undefined until full power is supplied throughout the
chip and a low level is input on the reset pin. During the period where the states are
undefined, the register settings and the output state of each pin are also undefined. Design
your system so that it does not malfunction because of processing while it is in this
undefined state. For those products which have a reset function, reset the LSI immediately
after the power supply has been turned on.
4. Prohibition of Access to Undefined or Reserved Addresses
Note: Access to undefin ed or reserved addresses i s prohibited.
The undefined or reserved addresses may be used to expand functions, or test registers
may have been be allocated to these addresses. Do not access these registers; the system’s
operation is not guaranteed if they are accessed.
Rev. 5.00, 09/03, page v of xliv
Configuration of This Manual
This manual comprises the following items:
1. General Precautions on Handling of Product
2. Configurati on of Thi s Manual
3. Preface
4. Contents
5. Overview
6. Description of Functional Modules
•CPU and System-Control Modules
•On-Chip Peripheral Modules
The configuration of the functional description of each module differs according to the
module. However, the generic style includes the following items:
i) Feature
ii) Input/Output Pin
iii) Register Description
iv) Operation
v) Usage Note
When designing an application system that includes this LSI, take notes into a ccount. Each se c tion
includes notes in relation to the descriptions given, and usage notes are given, as required, as the
final part of each section.
7. List of Registers
8. Electrical Characteristics
9. Appendix
10. Main Revisions and Additions in this Edition (only for revised versions)
The list of revisions is a summary of points that have been revised or added to earlier versions.
This does not include all of the revised contents. For details, see the actual locations in this
manual.
11.Index
Rev. 5.00, 09/03, page vi of xliv
Preface
This LSI is a microprocessor with the 32-bit SH-3 CPU as its core and peripheral functions
necessary for configuring a user system.
This LSI is built in with a variety of peripheral functions such as cache memory, memory
management unit (MMU), interrupt controller, timer, three serial communication interfaces, realtime clock (RTC), use break controller (UBC), bus state controller (BSC) and I/O ports.
This LSI can be used as a microcomputer for devices that require both high speed and low power
consumption.
Target Readers: This manual is designed for use by people who design application systems using
the SH7709S.
To use this manual, basic knowledge of electric circuits, logic circuits and micro computers is
required.
Purpose: This manual provides the information of the hardware functions and electrical
characteristics of the SH7709S.
The SH3, SH-3E, SH3-DSP Programming Manual contains detailed information of executable
instructions. Please read the Programming Manual together with this manual.
How to Use the Book:
• To understand general functions
Read the manual from the beginning.
The manual explains the CPU, system control functions, peripheral functions and electrical
characteristics in that order.
• To understanding CPU function s
Refer to the separate SH3, SH-3E, SH3-DSP Programming Manual.
Explanatory Note: Bit sequence: upper bit at left, and lower bit at right
List of Related Documents: The latest documents are available on our Web site. Please make
sure that you have the latest version.
(http://www.renesas.com/eng/)
• User manuals for SH7709S
Name of DocumentDocument No.
SH7709S Group Hardware ManualThis manual
SH3, SH-3E, SH3-DSP Programming ManualADE-602-156
Rev. 5.00, 09/03, page vii of xliv
•User manuals for development tools
Name of DocumentDocument No.
C/C++ Compiler, Assembler, Opti miz ing Lin kag e Editor User’s ManualADE-702-246
Simulator/Debugger User’s ManualADE-702-186
Embedded Workshop User’s ManualADE-702-201
Rev. 5.00, 09/03, page viii of xliv
List of Items Revised or Added for This Version
SectionPageDescription
1.2 Block Diagram
Figure 1.1 Block
Diagram
2.5.1 Processor States
5.4 Memory-Mapped
Cache
5.4.1 Address Array
6
53
113
ASERAM deleted from figure
UDI
INTC
CPG/WDT
ASERAM deleted from legend
Description amended
In the power-on reset state, the internal states of the CPU and the
on-chip supporting module registers are initialized. In the manual
reset state, the internal states of the CPU and registers of on-chip
supporting modules other than the bus state controller (BSC) are
initialized.
the register configurations in the relevant sections for further
details.
Description amended
This operation is used to invalidate the address specification for a
cache. Write back will take place when the U bit of the entry that
received a hit is 1. Note that, when a 0 is written to the V bit, a 0
should always be written to the U bit of the same entry, too.
BRIDGE
I bus 2
External bus
interface
Refer to
Rev. 5.0, 09/03, page ix of xliv
SectionPageDescription
5.4.3 Examples of
Usage
115,
116
(1) Invalidating a Specific Entry
Description amended
A specific cache entry can be invalidated by accessing the allocated
memory cache and writing a 0 to the entry’s U and V bits. The A bit is
cleared to 0, and an address is specified for the entry address and the
way. If the U bit of the way of the entry in question was set to 1, the
entry is written back and the V and U bits specified by the write data are
written to.
In the following example, the write data is specified in R0 and the
address is specified in R1.
; R0 = H'0000 0000 LRU = H'000, U = 0, V = 0
; R1 = H'F000
;
MOV.LR0, @R1
To invalidate all entries and ways, write 0 to the following addresses.
Addresses
This involves a total of 1, 024 writes.
The above operation should be performed using a non-cacheable area.
(2) Invalidating a Specific Address
Newly added
(3) Reading Data from a Specific Entry
Description amended
; R0 = H'F100 004C; Data array access, Entry = H'04,
; Way = 0, Longword address = 3
;
MOV.L R0, @R1; Longword 3 is read.
6.2.6 Interrupt
Exception Handling and
Priority
127
IPR (bit numbers) for SCI amended
(Before)IPRB(3-0) → (After)IPRB
Table 6.4 Interrupt
Exception Handling
Sources and Priority
(IRQ Mode)
6.3.6 Interrupt
Request Register 0
(IRR0)
138
Description amended
When clearing an IRQ5R–IRQ0R bit to 0, read the bit while bit set
to 1, and then write 0. In this case, 0 should be written only to the
bits to be cleared and 1 to the other bits. The co nten ts of the bits
to which 1 is written do not change.
8.2.1 Standby Control
Register (STBCR)
184
Description added
Bit 1—Module Standby 1 (MSTP1)
Before switching the RTC to module standby, access at least one
among the registers RTC, SCI, and TMU.
Rev. 5.0, 09/03, page x of xliv
1080, Way = 1, Entry = H'08, A = 0
F000 0000
F000 0010
F000 0020
:
F000 3FF0
(7-4)
SectionPageDescription
8.3.3 Precautions
187
Newley added
when Using the Sleep
Mode
8.5.1 Transition to
Module Standby
Function
191
Note *3 added to bit table
3. Before putting the RTC into module standby status, first
Note:
access one or more of the RTC, SCI, and TMU
registers. The RTC may then be put into module standby
status.
9.3 Clock Operating
Modes
Table 9.4 Available
Combinations of Clock
210
2. under cautions amended
The peripheral clock frequency should not be set higher than the
frequency of the CKIO pin, higher than
Mode and FRQCR
Values
9.5.1 Changing the
Multiplication Rate
213
Description added
5.Supply of the clock that has been set begins at WDT count
overflow, and the processor begins operating again. The WDT
stops after it overflows.
When the following three conditions are all met, FRQCR should
not be changed while a DMAC transfer is in progress.
• Bits IFC2 to IFC0 are changed.
• STC2 to STC0 are not changed.
• The clock ratio of Iφ (on-chip clock) to Bφ (bus clock) after the
change is other than 1:1.
9.8.2 Changing the
Frequency
218,
219
Description added
5.The counter stops at a value of H'00 or H'01. The stop value
depends on the clock ratio.
When the following three conditions are all met, FRQCR should
not be changed while a DMAC transfer is in progress.
• Bits IFC2 to IFC0 are changed.
• STC2 to STC0 are not changed.
• The clock ratio of Iφ (on-chip clock) to Bφ (bus clock) after the
change is other than 1:1.
10.1.1 Features
10.2.5 Individual
Memory Control
Register (MCR)
223
246
Refresh function description deleted
Description added
Bit 7—Synchronous DRAM Bank Active (RASD): Specifies
whether synchronous DRAM is used in bank active mode or autoprecharge mode. Set auto-precharge mode when areas 2 and 3
are both designated as synchronous DRAM space.
The bank active mode should not be used unless the bus width
for all areas is 32 bits.
33.34 MHz.
Rev. 5.0, 09/03, page xi of xliv
SectionPageDescription
A
10.2.13 MCS0 Control
Register (MCSCR0)
258
Description added
Bit 6—CS2/CS0 Select (CS2/0)
Only 0 should be used for the CS2/0 bit in MCSCR0. Either 0 or 1
may be used for MCSCR1 to MCSCR7.
10.3.4 Synchronous
DRAM Interface
290
Bank Active description added
… .In bank active mode, too, all banks become inactive after a
refresh cycle or after the bus is released as the result of bus
arbitration.
The bank active mode should not be used unless the bus width
for all areas is 32 bits.
10.3.6 PCMCIA
Interface
Figure 10.32 Basic
Timing for PCMCIA
310
Figure amended
D15 to D0
Write)
(
Memory Card Interface
10.3.7 Waits between
320
Figure amended
Access Cycles
Figure 10.40 Waits
between Access Cycles
CKIO
25 to A0
T
1
T2TwaitT
T2TwaitT
1
T
1
2
10.3.10 MCS[0] to
MCS[7] Pin Control
11.6 Usage Notes
13.4.3 Precautions
when Using RTC
Module Standby
323
387
426
Description amended
This enables 32-, 64-, 128-, or 256-Mbit memory to be connected
to area 0 or area 2.
However, only CS2/0 = 0 (area 0) should be
used for MCSCR0. Table 10.15 shows MCSCR0 – MCSCR7
settings and MCS[0]–MCS[7] assertion conditions.
Description added
13. DMAC transfers should not be perfor me d in the sleep mode
under conditions other than when the clock ratio of Iφ (on-
chip clock) to Bφ (bus clock) is 1:1.
14. When the following three conditions are all met, the
frequency control register (FRQCR) should not be changed
while a DMAC transfer is in progress.
• Bits IFC2 to IFC0 are changed.
• STC2 to STC0 in FRQCR are not changed.
• The clock ratio of Iφ (on-chip clock) to Bφ (bus clock) after
the change is other than 1:1.
Newly added
Rev. 5.0, 09/03, page xii of xliv
SectionPageDescription
16.4 SCIF Interrupts
550
Description amended
When the TDFE flag in the serial status register (SCSSR) is set to
1, a TXI interrupt request is generated. The DMAC can be
activated and data transfer performed when this interrupt is
generated.
written to the transmit data register (SCFTDR) by the DMAC, 1 is
read from the TDFE flag, after which 0 is written to it to clear it.
When the RDF flag in SCSSR is set to 1, an RXI interrupt request
is generated. The DMAC can be activated and data transfer
performed when the RDF flag in SCSSR is set to 1. When
receive data less than the receive trigger number is read from the
receive data register (SCFRDR) by the DMAC, 1 is read from the
RDF flag, after which 0 is written to it to clear it.
16.5 Usage Notes
551
Description amended
1. SCFTDR Writing and TDFE Flag:
However, if the number of data bytes written to SCFTDR is equal
to or less than the transmit trigger number,
set to 1 again even after having been cleared to 0. TDFE clearing
should therefore be carried out after data exceeding the specified
transmit trigger number has been written to SCFTDR.
2. SCFRDR Reading and RDF Flag:
However, if the number of data bytes in SCFRDR exceeds the
trigger number, the RDF flag will be set to 1 again even after
having been cleared to 0. RDF should therefore be cleared to 0
after being read as 1 after all the receive data has been read.
19.13.2 SC Port Data
610
Title Amended
Register (SCPDR)
When data exceeding the transmit trigger number is
the TDFE flag will be
Rev. 5.0, 09/03, page xiii of xliv
SectionPageDescription
20.3 Bus Master
Interface
Figure 20.2 A/D Data
Register Access
Operation (Reading
H'AA40)
622
Figure amended
Upper byte read
CPU
receives
data H'AA
Bus
interface
Module internal data bus
TEMP
[H'40]
23.1 Absolute
Maximum Ratings
Table 23.1 Absolute
Maximum Ratings
23.2 DC
Characteristics
Table 23.2 DC
Characteristics
657
659,
662
ADDRn L
[H'40]
Module internal data bus
TEMP
[H'40]
ADDRn L
[H'40]
n = A to D
n = A to D
Lower byte read
CPU
receives
data H'40
Bus
interface
ADDRn H
[H'AA]
ADDRn H
[H'AA]
Caution added
2.Until voltage is applied to all power supplies, a low level is input
at the RESETP pin, and CKIO has operated for a maximum of 4
clock cycles, internal circuits remain unsettled, and so pin states
are also undefin ed. The system design must ensure that these
undefined states do not cause erroneous system operation.
Note that the RESETP pin cannot receive a low level signal while
a low level signal is being input to the CA pin.
Test conditions for in sleep mode amended
ItemSymbol MinTyp Max Unit Test Conditions
Sleep
mode
Icc—1530
1
*
IccQ—1020
1
: When there is no
*
other external bus
cycle other than the
refresh cycle.
Vcc = 1.9 V
VccQ = 3.3 V
Bφ = 33MHz
Note * added
* If the IRL and IRLS interrupts are used, the minimum is 1.9 V.
Rev. 5.0, 09/03, page xiv of xliv
SectionPageDescription
A
A
A
23.3.6 Synchronous
DRAM Timing
690
Tnop cycle deleted from figure
Tc1Tc2 Tc3/Td1 Tc4/Td2 Td3Td4
Figure 23.31
Synchronous DRAM
Burst Read Bus Cycle
(RAS Down, Same Row
Address, CAS Latency
= 2)
CKIO
25 to A16
12 or A10
15 to A0
CSn
RD/WR
RAS
CAS
DQMxx
D31 to D0
BS
t
AD
t
AD
t
AD
t
CSD3
t
RWD
t
RASD2
t
CASD2
t
DQMD
Row address
Read command
Column address
t
RDS2
t
BSD
t
RDH2
t
AD
t
AD
t
CASD2
t
RDS2
t
AD
t
CSD3
t
RWD
t
DQMD
t
RDH2
t
BSD
CKE
DACKn
(High)
t
DAKD1
t
DAKD1
Rev. 5.0, 09/03, page xv of xliv
SectionPageDescription
A.2 Pin Specifications
Table A.2 Pin
Specifications
723
Function information amend ed for VCC–RTC, VCC–PLL1, VCC–
PLL2, and V
PinPin No.
(FP-208C,
FP-208E)
V
–
3E2Power
CC
RTC
145
VCC–
150
PLL1
–
V
CC
PLL2
V
29, 81,
CC
134, 154,
175
CC
Pin No.
(BP-
240A)
F16,
E17
L3, L4,
U11, T11,
J17, J16,
E18, C19,
C12, D12
I/OFunction
RTC oscillator power
supply
supply
(2.0/1.9/1.8/1.7 V)
Power
supply
Power
supply
PLL power supply
(2.0/1.9/1.8/1.7 V)
Internal power supply
(2.0/1.9/1.8/1.7 V)
A.3 Treatment of
Unused Pins
A.4 Pin States in
Access to Each
Address Space
Table A.3 Pin States
(Ordinary Memory/Little
Endian)
Table A.4 Pin States
(Ordinary Memory/Big
Endian)
Table A.5 Pin States
(Burst ROM/Little
Endian)
Table A.6 Pin States
(Burst ROM/Big
Endian)
Table A.9 Pin States
(PCMCIA/Little Endian)
Table A.10 Pin States
(PCMCIA/Big Endian)
724
726 to
738
"When RTC is not used" and "When PLL2 is not used" amended
(Before) (1.9/1.8V) →(After) (
2.0/1.9/1.8/1.7V)
Note 2 amended
Note: 2.Unused data pins should be switched to the port
function, or
pulled up.
Rev. 5.0, 09/03, page xvi of xliv
Contents
Section 1 Overview and Pin Functions
1.1SH7709S Features .............................................................................................................1
Figure 14.5Example of Data Format in Asynchronous Communication (8-Bit Data
with Parity and Two Stop Bits)............................................................................ 455
Figure 14.6Output Clock and Serial Data Timing (Asynchronous Mode) ............................. 457
Figure 14.7Sample Flowchart for SCI Initialization............................................................... 458
Figure 14.8Sample Flowchart for Transmitting Serial Data................................................... 459
Figure 14.9Example of SCI Transmit Operation in Asynchronous Mode (8-Bit Data
with Parity and One Stop Bit).............................................................................. 461
Figure 14.10 Sample Flowchart for Receiving Serial Data ....................................................... 462
Figure 14.11 Example of SCI Receive Operation (8-Bit Data with Parity and One Stop Bit).. 465
Figure 14.12 Communication Among Pr ocessors Using Multiprocessor Format
(Sending Data H'AA to Receiving Processor A).................................................. 466
Figure 14.13 Sample Flowchart for Transmitting Multiprocessor Serial Data.......................... 467
Figure 14.14 Example of SCI Multiprocessor Transmit Operation (8-Bit Data with
Multiprocessor Bit and One Stop Bit).................................................................. 468
Figure 14.15 Sample Flowchart for Receiving Multiprocessor Serial Data .............................. 470
Figure 14.16 Example of SCI Receive Operation (8-Bit Data with Multiprocessor Bit and
One Stop Bit)........................................................................................................ 472
Rev. 5.00, 09/03, page xxxiv of xliv
Figure 14.17 Data Format in Synchronous Communication ..................................................... 474
Figure 14.18 Sample Flowchart for SCI Initialization............................................................... 476
Figure 14.19 Sample Flowchart for Transmitting Serial Data................................................... 477
Figure 14.20 Example of SCI Transmit Operation.................................................................... 478
Figure 14.21 Sample Flowchart for Receiving Serial Data ....................................................... 480
Figure 14.22 Example of SCI Receive Operation...................................................................... 482
Figure 14.23 Sample Flowchart for Transmitting/Receiving Serial Data.................................. 483
Figure 14.24 Receive Data Sampling Timing in Asynchronous Mode..................................... 486
Figure 15.1Block Diagram of Smart Card Interface............................................................... 490
Figure 15.2Pin Connection Diagram for Smart Card Interface .............................................. 495
Figure 15.3Data Format for Smart Card Interface.................................................................. 496
Figure 15.4Waveform of Start Character................................................................................ 498
Figure 23.4Power-on Oscillation Settling Time ..................................................................... 666
Figure 23.5Oscillation Settling Time at Standby Return (Return by Reset)........................... 666
Figure 23.6Oscillation Settling Time at Standby Return (Return by NMI)............................ 667
Figure 23.7Oscillation Settling Time at Standby Return (Return by IRQ4 to IRQ0,
PINT0/1, IRL3 to IRL0)....................................................................................... 667
Figure 23.8PLL Synchronization Settling Time during Standby Recovery (Reset or NMI).. 668
Figure 23.9PLL Synchronization Settling Time during Standby Recovery (IRQ/IRL or
This LSI is a single-chip RISC microprocessor that integrates a Renesas Technology-original
RISC-type SuperH
and a memory management unit (MMU) as well as peripheral functions required for system
configuration such as a timer, a realtime clock, an interrupt controller, and a serial communication
interface. This LSI includes data protection, virtual memory, and other functions provided by
incorporating an MMU into a SuperH Series microprocessor (SH-1 or SH-2).
High-speed data transfers can be performed by an on-chip direct memory access controller
(DMAC) and an external memory access support function enables direct connection to different
types of memory. The SH7709S microproces sor also supports an infrared communication
function, an A/D converter, and a D/A converter.
A powerful built-in power management function keeps power consumption low, even du rin g highspeed operation. This LSI can run at six times the frequency of the system bus operating speed,
making it optimum for electrical devices such as PDAs that require both high speed and low
power.
The features of this LSI is listed in table 1.1. The specifications are shown in table 1.2.
Note: SuperH is a trademark of Renesas Technology, Corp.
TM
architecture CPU as its core that has an on-chip multiplier, cache memory,
Rev. 5.00, 09/03, page 1 of 760
Table 1.1SH7709S Features
ItemFeatures
CPU
Clock pulse
generator (CPG)
Memory
management
unit (MMU)
• Original Renesas Technology SuperH architecture
• Object code level with SH-1, SH-2, and SH-3 Series
• 32-bit internal data bus
• General-register files
Sixteen 32-bit general registers (eight 32-bit shadow registers)
Eight 32-bit control registers
Four 32-bit system registers
• RISC-type instruction set
Instruction length: 16-bit fixed length for improved code efficiency
Load-store architecture
Delayed branch instructions
Instruction set based on C language
• Instruction execution time: one instruction/cycle for basic instructions
• Logical address space: 4 Gbytes
• Space identifier ASID: 8 bits, 256 logical address space
• Five-stage pipeline
• Clock mo de: A n input clock can be selected from the external input (EXTAL
or CKIO) or crystal oscillator.
• Three types of clocks generated:
CPU clock: 1–24 times the input clock, maximum 200 MHz
Bus clock: 1–4 times the input clock, maximum 66.67 MHz
Peripheral clock: 1/4–4 times the input clock, maximum 33.34 MHz
• 23 external interrupt pins (NMI, IRQ5–IRQ0, PINT15 to PINT0)
• On-chip peripheral interrupts: set priority levels for each module
• 2 break channels
• Addresses, data values, type of access, and data size can all be set as break
conditions
• Supports a sequential break function
• Physical address space divi ded into six ar eas (area 0, areas 2 to 6), each a
maximum of 64 Mbytes, with the following features settable for each area:
Bus size (8, 16, or 32 bits)
Number of wait cycles (also supports a hardware wait function)
Setting the type of space enables direct connection to SRAM,
Supports PCMCIA interface (2 channels)
Outputs chip select signal (CS0, CS2–CS6) for corresponding area
• Synchronous DRAM refresh function
Programmable refresh interval
Support self-refresh mode
• Synchronous DRAM burst access function
• Usable as either big or little endian machine
• E10A emulator support
• JTAG-compliant
• Realtime branch address trace
• 1-kB on-chip RAM for fast emulation program execution
• 3-channel auto-reload-type 32-bit timer
• Input capture function
• 6 types of counter input clocks can be sel ected
• Maximum resolution: 2 MHz
• Built-in clock, calendar functions, and alarm functions
• On-chip 32-kHz crystal oscillator circuit with a maximum resolution (interrupt
cycle) of 1/256 second
Synchronous DRAM, and burst ROM
Rev. 5.00, 09/03, page 3 of 760
ItemFeatures
Serial communication interface 0
(SCI0/SCI)
• Asynchro nou s mode or cloc k sy nchr onous mode can be selected
• Full-duplex communication
• Supports smart card interface
Serial communication interface 1
(SCI1/IrDA)
• 16-byte FIFO for transmission/reception
• DMA can be transferred
• IrDA: interface based on 1.0
Serial communication interface 2
(SCI2/SCIF)
• 16-byte FIFO for transmission/reception
• DMA can be transferred
• Hardware flow control
Direct memory
access cont r ol ler
(DMAC)
• 4 channels
• Burst mode and cy cle-steal mode
• Data transfer size: 8-/16-/32-bit and 16-byte
I/O port
A/D converter
(ADC)
• Twelve 8-bit ports
• 10 bits ± 4 LSB, 8 channels
• Conversion time: 16 µs
• Input range: 0–AVcc (max. 3.6 V)
D/A converter
(DAC)
• 8 bits ± 4 LSB, 2 channels
• Conversion time: 10 µs
• Output range: 0–AVcc (max. 3.6 V)
Product lineup
Abbr.I/OInternal
SH7709S 3.3±0.3 V 2.0±0.15 V*200 MHzHD6417709SHF200B 208-pin plastic
Note: * 2.0 (+0.15, –0.1) V when an IRL or IRLS interrupt is used.
Power Supply Voltage
1.9±0.15 V 167 MHzHD6417709SF167B208-pin plastic
1.8+0.25 V
1.8–0.15 V
1.7+0.25 V
1.7–0.15 V
Operating
Frequency
133 MHzHD6417709SF133B208-pin plastic
100 MHzHD6417709SF100B208-pin plastic
Model NamePackage
HQFP (FP-208E)
LQFP (FP-208C)
HD6417709SBP167B 240-pin CSP
(BP-240A)
LQFP (FP-208C)
HD6417709SBP133B 240-pin CSP
(BP-240A)
LQFP (FP-208C)
HD6417709SBP100B 240-pin CSP
(BP-240A)
Rev. 5.00, 09/03, page 4 of 760
Table 1.2Characteristics
ItemCharacteristics
Power supply voltage
Operating frequency
Process
Note: * 2.0 (+0.15, –0.1) V when an IRL or IRLS interrupt is used.
• I/O: 3.3 ±0.3 V
Internal: 2.0 ±0.15 V (200 MHz model)*, 1.9±0.15 V (167 MHz model),
1.8 (+0.25, –0.15) V (133 MHz model), 1.7(+0.25, –0.15) V (100 MHz
model)
A/D converter
Advanced user debugger
Bus state controller
Cache memory
Cache memory controller
Compare match timer
Clock pulse generator/watchdog timer
Central processing unit
D/A converter
Direct memory access controller
User debugging interface
Rev. 5.00, 09/03, page 6 of 760
INTC:
Interrupt controller
IrDA:
Serial communicatiion interface (with IrDA)
MMU:
Memory management unit
RTC:
Realtime clock
SCI:
Serial communication interface (with smart card interface)
port H
13F4D31/PTB[7]I/OData bus / input/output port B
14G1D30/PTB[6]I/OData bus / input/output port B
15G2D29/PTB[5]I/OData bus / input/output port B
16G3D28/PTB[4]I/OData bus / input/output port B
17G4D27/PTB[3]I/OData bus / input/output port B
18H1D26/PTB[2]I/OData bus / input/output port B
19H2VssQ—Input/output power supply (0 V)
20H3D25/PTB[1]I/OData bus / input/output port B
21H4VccQ—Input/output power supply (3.3 V)
22J1D24/PTB[0]I/OData bus / input/output port B
23J2D23/PTA[7]I/OData bus / input/output port A
24J4D22/PTA[6]I/OData bus / input/output port A
25J3D21/PTA[5]I/OData bus / input/output port A
26K2D20/PTA[4]I/OData bus / input/output port A
3
*
)
Rev. 5.00, 09/03, page 9 of 760
Number of Pins
FP-208C
FP-208E
BP-240APin NameI/ODescription
27K3Vss—Power supply (0 V)
—K4Vss—Power supply (0 V)
28K1D19/PTA[3]I/OData bus / input/output port A
3
29L3Vcc—Power supply (1.9 V/1.8 V
3
—L4Vcc—Power supply (
*
)
*
)
30L2D18/PTA[2]I/OData bus / input/output port A
31L1D17/PTA[1]I/OData bus / input/output port A
32M4D16/PTA[0]I/OData bus / input/output port A
33M3VssQ—Input/output power supply (0 V)
34M2D15I/OData bus
35M1VccQ—Input/output power supply (3.3 V)
36N4D1 4I/OData bus
37N3D1 3I/OData bus
38N2D1 2I/OData bus
39N1D1 1I/OData bus
40P4D10I/OData bus
41P3D9I/OData bus
42P2D8I/OData bus
43P1D7I/OData bus
44R4D6I/OData bus
45R3VssQ—Input/output power supply (0 V)
46T4D5I/OData bus
47R1VccQ—Input/output power supply (3.3 V)
48T3D4I/OData bus
49T1D3I/OData bus
50R2D2I/OData bus
51U2D1I/OData bus
52T2D0I/OData bus
53V4A0OAddress bus
54V3A1OAddress bus
55V5A2OAddress bus
56W 4A3OAddress bus
Rev. 5.00, 09/03, page 10 of 760
Number of Pins
FP-208C
FP-208EBP-240APin NameI/ODescription
57U4VssQ—Input/output power supply (0 V)
58W 5A4OAddress bus
59U3VccQ—Input/output power supply (3.3 V)
60U5A5OAddress bus
61T5A6OAddress bus
62W 6A7OAddress bus
63V6A8OAddress bus
64U6A9OAddress bus
65T6A10OAddress bus
66W 7A11OAddress bus
67V7A12OAddress bus
68U7A13OAddress bus
69T7VssQ—Input/output power supply (0 V)
70W 8A14OAddress bus
71V8VccQ—Input/output power supply (3.3 V)
72U8A15OAddress bus
73T8A16OAddress bus
74W 9A17OAddress bus
75V9A18OAddress bus
76T9A19OAddress bus
77U9A20OAddress bus
78V10A21OAddress bus
79U10Vss—Power supply (0 V)
—T10VssOPower supply (0 V)
80W 10A22OAddress bus
3
81U11Vcc—Power supply (
—T11Vcc—Power supply (
*
)
3
*
)
82V11A23OAddress bus
83W11VssQ—Input/output power supply (0 V)
84T12A24OAddress bus
85U12VccQ—Input/output power supply (3.3 V)
86V12A25OAddress bus
Rev. 5.00, 09/03, page 11 of 760
Number of Pins
FP-208C
FP-208EBP-240APin NameI/ODescription
87W12BS/PTK[4]O / I/OBus cycle start signal / input/output
port K
88T13RDORead strobe
89U13WE0/DQMLLOD7–D0 select signal / DQM
(SDRAM)
90V13WE1/DQMLU/WEOD15–D8 select signal / DQM
106U18RAS3L/PTJ[0]O / I/OLower 32 M / 64 Mbytes address
(SDRAM) RAS / input/output port J
5
107U19PTJ[1]O / I/OInput/output port J
*
108R18CASL/PTJ[2]O / I/OLower 32 M / 64 Mbytes address
(SDRAM) CAS / input/output port J
109T19VssQ—Input/output power supply (0 V)
110T17CASU/PTJ[3]O / I/OLower 32 Mbytes address
(SDRAM) CAS / input/output port J
111R19VccQ—Input/output power supply (3.3 V)
112U17PTJ[4]I/OInput/output port J
113R17PTJ[5]I/OInput/output port J
114R16DACK0/PTD[5]O / I/ODMA acknowledge 0 / input/output
port D
115P19DACK1/PTD[7]O / I/ODMA acknowledge 1 / input/output
port D
116P18PTE[6]I/OInput/output port E
117P17PTE[3]I/OInput/output port E
118P16RAS3U/PTE[2]O / I/OUpper 32 Mbytes address
(SDRAM) RAS / input/output port
E
119N19PTE[1]I/OInput/output port E
120N18TDO/PTE[0]O / I/OTest data output / input/output
port E
121N17BACKOBus acknowledge
122N16BREQIBus request
123M19WAITIHardware wait request
124M18RESETMIManual reset request
125M17ADTRG/PTH[5]IAnalog trigger / input port H
126M16IOIS16/PTG[7]IIOIS16 (PCMCIA) / input port G
port G
129L16PTG[4]/CK102IInput port G / clock output
Rev. 5.00, 09/03, page 13 of 760
Number of Pins
FP-208C
FP-208EBP-240APin NameI/ODescription
130L17AUDATA[3]/PTG[3]I/O / IAUD data / input port G
131K18AUDATA[2]/PTG[2]I/O/IAUD data / input port G
132K17Vss—Power supply (0 V)
—K16Vss—Power supply (0 V)
133K19AUDATA[1]/PTG[1]I/O / IAUD data / input port G
3
134J17Vcc—Power supply (
—J16Vcc—Power supply (
*
)
3
*
)
135J18AUDATA[0]/PTG[0]I/O / IAUD data / input port G
136J19TRST/PTF[7]/PINT[15]ITest reset / input port F / port
interrupt
137H16TMS/PTF[6]/PINT[14]ITest mode switch / input port F /
port interrupt
138H17TDI/PTF[5]/PINT[13]ITest data input / input port F / port
interrupt
139H18TCK/PTF[4]/PNT[12]ITest clock / input port F / port
157B16STATUS0/PTJ[6]O / I/OProcessor status / input/output
port J
158B17STATUS1/PTJ[7]O / I/OProcessor status / input/output
port J
159B15TCLK/PTH[7]I/OTMU or RTC clock input/output /
input/output port H
160A16IRQOUTOInterrupt request notification
161C16VssQ—Input/output power supply (0 V)
162A15CKIOI/OSystem clock input/output
163C17VccQ—Power supply (3.3 V)
164C15TxD0/SCPT[0]OTransmit data 0 / SCI output port
165D15SCK0/SCPT[1]I/OSerial clock 0 / SCI input/output
port
166A14TxD1/SCPT[2]OTransmit data 1 / SCI output port
167B14SCK1/SCPT[3]I/OSerial clock 1 / SCI input/output
port
168C14TxD2/SCPT[4]OTransmit data 2 / SCI output port
169D14SCK2/SCPT[5]I/OSerial clock 2 / SCI input/output
port
170A13RTS2/SCPT[6]O / I/OTransmit request 2 / SCI
input/output port
171B13RxD0/SCPT[0]ITransmit data 0 / SCI output port
172C13RxD1/SCPT[2]ITransmit data 1 / SCI output port
173D13Vss—Power supply (0 V)
—A12Vss—Power supply (0 V)
174B12RxD2/SCPT[4]ITransmit data 2 / SCI output port
177B11MCS[7]/PTC[7]/PINT[7] O / I/O / I Mask ROM chip select /
input/output port C / port interrupt
178D11MCS[6]/PTC[6]/PINT[6] O / I/O / I Mask ROM chip select /
input/output port C / port interrupt
179C11MCS[5]/PTC[5]/PINT[5] O / I/O / I Mask ROM chip select /
input/output port C / port interrupt
180B10MCS[4]/PTC[4]/PINT[4] O / I/O / I Mask ROM chip select /
input/output port C / port interrupt
181C10VssQ—Input/output power supply (0 V)
182D10WAKEUP/PTD[3]O / I/OStandby mode interrupt request
notification / input/output port D
183A10VccQ—Input/output power supply (3.3 V)
184C9RESETOUT/PTD[2]O / I/OReset output / input/output port D
185D9MCS[3]/PTC[3]/PINT[3] O / I/O / I Mask ROM chip select /
input/output port C / port interrupt
186B9MCS[2]/PTC[2]/PINT[2] O / I/O / I Mask ROM chip select /
input/output port C / port interrupt
187A9MCS[1]/PTC[1]/PINT[1] O / I/O / I Mask ROM chip select /
input/output port C / port interrupt
188D8MCS[0]/PTC[0]/PINT[0] O / I/O / I Mask ROM chip select /
input/output port C / port interrupt
189C8DRAK0/PTD[1]O / I/ODMA request acknowledge /
input/output port D
190B8DRAK1/PTD[0]O / I/ODMA request acknowledge /
input/output port D
191A8DREQ0/PTD[4]IDMA request / input port D
192D7DREQ1/PTD[6]IDMA request / input port D
193C7RESETPIPower-on reset request
194B7CAIChip activate (hardware standby
request signal)
195A7MD3IArea 0 bus width setting
196D6MD4IArea 0 bus width setting
197C6MD5IEndian setting
Rev. 5.00, 09/03, page 16 of 760
Number of Pins
FP-208C
FP-208EBP-240APin NameI/ODescription
198B6AVss—Analog power supply (0 V)
199A6AN[0]/PTL[0]IA/D converter input / input port L
200D5AN[1]/PTL[1]IA/D converter input / input port L
201C5AN[2]/PTL[2]IA/D converter input / input port L
202D4AN[3]/PTL[3]IA/D converter input / input port L
203A5AN[4]/PTL[4]IA/D converter input / input port L
204C4AN[5]/PTL[5]IA/D converter input / input port L
205A4AVcc—Analog power supply (3.3 V)
206B5AN[6]/DA[1]/PTL[6]IA/D converter input /
D/A converter output / input port L
207B3AN[7]/DA[0]/PTL[7]IA/D converter input /
D/A converter output / input port L
208B4AVss—Analog power supply (0 V)
Notes: 1. Must be connected to the power supply even when the RTC is not used.
2. Except in hardware standby mode, all of the power supply pins must be connected to
the system power supply. (Supply power constantly.) In hardware standby mode, power
must be supplied at least to VCC –RTC and VSS –RTC. If power is not being supplied to
any of the power supply pins other than VCC –RTC and VSS –RTC, hold the CA pin low.
3. 2.0 V for the 200 MHz model, 1.9 V for the 167 MHz model, 1.8 V for the 133 MHz
model, 1.7 V for the 100 MHz model.
4. When this LSI is used on the user system alone, without an emulator and the U DI, hold
this pin at high level. When this pin is low or open, RESETP may be masked (see
section 22, User Debugging Inter face (UDI)).
5. B2, B1, C1, U1, V1, W1, V2, W2, W3, W17, W18, W19, V18, V19, B19, A19, B18, A18,
A17, A3, A2, and A1 are NC pins. Do not connect anything to these pins.
6. If EXTAL2 is not used, pull this pin up to the Vcc-RTC level.
Rev. 5.00, 09/03, page 17 of 760
Rev. 5.00, 09/03, page 18 of 760
Section 2 CPU
2.1Register Configuration
2.1.1Privileged Mode and Banks
Processor Mode s: There are two processor modes: user mode and privileged mode. The
SH7709S normally operates in user mode, and enters privileged mode wh en an exception occurs
or an interrupt is accepted. There are three kinds of registers—general registers, system registers,
and control registers—and the registers that can be accessed differ in the two processor modes.
General Registers: There are 16 general registers, designated R0 to R15. General registers R0 to
R7 are banked registers which are switched by a processor mode change. In privileged mode, the
register bank bit (RB) in the status register (SR) defines which banked register set is accessed as
general registers, and which set is accessed only through the load control register (LDC) and store
control register (STC) instructions.
When the RB bit is 1, the 16 registers comprising BANK1 general registers R0_BANK1–
R7_BANK1 and non-banked general registers R8–R15 function as the general register set, with
the 8 registers comprising BANK0 general registers R0_BANK0–R7_BANK0 accessed only by
the LDC/STC instructions.
When the RB bit is 0, BANK0 general registers R0_BANK0–R7_BANK0 and nonbanked general
registers R8–R1 5 funct ion as the general registe r set, with BANK 1 gene ra l reg iste r s R0_ B ANK1 –
R7_BANK1 accessed only by the LDC/STC instructions. In user mode, the 16 registers
comprising bank 0 general registers R0_BANK0–R7_BANK0 and non-banked registers R8–R15
can be accessed as general registers R0–R15, and bank 1 general registers R0_BANK1–
R7_BANK1 cannot be accessed.
Control Registers: Control registers comprise the global base r egister (GBR) and status register
(SR) which can be accessed in both processor modes, and the saved status register (SSR), saved
program counter (SPC), and vector base register (VBR) which can only be accessed in privileged
mode. Some bits of the status register (such as the RB bit) can only be accessed in privileged
mode.
System Registers: System registers comprise the multiply and accumulate registers
(MACL/MACH), the procedure register (PR), and the program counter (PC). Access to these
registers does not depend on the processor mode.
The register configuration in each mode is shown in figures 2.1 and 2.2.
Switching between user mode and privileged mode is controlled by the processor mode bit (MD)
in the status register.
Notes: 1.2.R0 functions as an index register in the indexed register-indirect addressing
mode and indexed GBR-indirect addressing mode.
Banked register.
Figure 2.1 User Mode Register Configuration
Rev. 5.00, 09/03, page 20 of 760
310
R0_BANK1
R1_BANK1
R2_BANK1
R3_BANK1
R4_BANK1
R5_BANK1
R6_BANK1
R7_BANK1
*1 *2
*2
*2
*2
*2
*2
*2
*2
R8
R9
R10
R11
R12
R13
R14
R15
310
R0_BANK0
R1_BANK0
R2_BANK0
R3_BANK0
R4_BANK0
R5_BANK0
R6_BANK0
R7_BANK0
*1 *3
*3
*3
*3
*3
*3
*3
*3
R8
R9
R10
R11
R12
R13
R14
R15
SR
SSR
GBR
MACH
MACL
PR
VBR
PC
SPC
R0_BANK0
R1_BANK0
R2_BANK0
R3_BANK0
R4_BANK0
R5_BANK0
R6_BANK0
R7_BANK0
*1 *3
*3
*3
*3
*3
*3
*3
*3
a. Privileged mode
register configuration
(RB = 1)
SR
SSR
GBR
MACH
MACL
PR
VBR
PC
SPC
R0_BANK1
R1_BANK1
R2_BANK1
R3_BANK1
R4_BANK1
R5_BANK1
R6_BANK1
R7_BANK1
*1 *2
*2
*2
*2
*2
*2
*2
*2
b. Privileged mode
register configuration
(RB = 0)
Notes:
1.
R0 functions as an index
register in the indexed
register-indirect addressing
mode and indexed GBRindirect addressing mode.
Banked register
2.
When the RB bit of the SR
register is 1, the register can
be accessed for general use.
When the RB bit is 0, it can
only be accessed with the
LDC/STC instruction.
Banked register
3.
When the RB bit of the SR
register is 0, the register can
be accessed for general use.
When the RB bit is 1, it can
only be accessed with the
LDC/STC instruction.
Figure 2.2 Privileged Mode Register Configuration
Rev. 5.00, 09/03, page 21 of 760
Register values after a reset are shown in table 2.1.
Table 2.1Initial Register Values
TypeRegistersInitial Value
*
General registersR0 to R15Undefined
Control registersSRMD bit = 1, RB bit = 1, BL bit = 1,
Note: * Register values are initialized at power-on reset or manual reset.
2.1.2General Registers
There are 16 general registers, designated R0 to R15 (figure 2.3). General registers R0 to R7 are
banked registers, with a different R0–R7 register bank (R0_BANK0–R7_BANK0 or
R0_BANK1–R7_BANK1) being accessed according to the processor mode. For details, see
figures 2.1 and 2.2.
The general register configuration is shown in figure 2.3.
310
*1 *2
R0
*2
R1
*2
R2
*2
R3
*2
R4
*2
R5
*2
R6
*2
R7
R8
R9
R10
R11
R12
R13
R14
R15
General Registers
Notes:
1.
R0 functions as an index register in the indexed
register-indirect addressing mode and indexed
GBR-indirect addressing mode. In some instructions,
only R0 can be used as the source register or
destination register.
2.
R0–R7 are banked registers.
In privileged mode, SR.RB specifies which banked
registers are accessed as general registers
(R0_BANK0−R7_BANK0 or R0_BANK1−R7_BANK1).
Rev. 5.00, 09/03, page 22 of 760
Figure 2.3 General Registers
2.1.3System Registers
System registers can be accessed by the LDS and STS instructions. When an exception occurs, the
contents of the program counter (PC) are saved in the saved program counter (SPC). The SPC
contents are restored to the PC by the RTE instruction used at the end of the exception handling.
There are four system registers, as fo llows.
• Multiply and accumulate high register (MACH)
• Multiply and accumulate low register (MACL)
• Procedure register (PR)
• Program counter (PC)
The system register configu rat i on is shown in figure 2.4.
310
MACH
MACL
310
PR
310
PC
System Registers
Multiply and Accumulate High and Low Registers
(MACH/L)
Store the results of multiply-and-accumulate operations.
Procedure Register (PR)
Stores the return address for exiting a subroutine
procedure.
Program Counter (PC)
Indicates the address four addresses (two instructions)
ahead of the currently executing instruction. Initialized
to H'A0000000 by a reset.
Figure 2.4 System Registers
2.1.4Control Registers
Control registers can be accessed in privileged mode using the LDC and STC instructions. The
GBR register can also be accessed in user mode. There are five control registers, as follows:
• Status register (SR)
• Saved status regist e r (SSR)
• Saved program counter (SPC)
• Global base register (GBR)
• Vector base register (VBR)
Rev. 5.00, 09/03, page 23 of 760
310
SSR
310
SPC
310
GBR
310
VBR
Saved Status Register (SSR)
Stores current SR value at time of exception to
indicate processor status in return to instruction
stream from exception handler.
Saved Program Counter (SPC)
Stores current PC value at time of exception to
indicate return address at completion of exception
handling.
Global Base Register (GBR)
Stores base address of GBR-indirect
addressing mode. The GBR-indirect addressing mode
is used for on-chip supporting module register area
data transfers and logic operations.
The GBR register can also be accessed in user mode.
Its contents are undefined after a reset.
Vector Base Register (VBR)
Stores base address of exception handling vector area.
Initialized to H'0000000 by a reset.
3
CL
111213
00
3129 28 2710 9 8 701
30
0RB
MDBLM Q0−−−−−−−−−−−−−−−−−−−−−−0I3 I2 I1 I0 0 0 S T
MD:
Processor operation mode bit: Indicates the processor operation mode as follows:
MD =1: Privileged mode; MD = 0: User mode
MD is set to 1 on generation of an exception or interrupt , and is initialized to 1 by a reset.
RB:
Register bank bit: Determines the bank of general registers R0–R7 used in processing mode.
RB = 1: R0_BANK1−R7_BANK1 and R8−R15 are general registers, and R0_BANK0−
R7_BANK0 can be accessed by LDC/STC instructions.
RB = 0: R0_BANK0−R7_BANK0 and R8−R15 are general registers, and R0_BANK1−
R7_BANK1 can be accessed by LDC/STC instructions.
RB is set to 1 on generation of an exception or interrupt , and is initialized to 1 by a reset.
BL:
Block bit
BL = 1: Exceptions and interrupts are suppressed. See section 4, Exception
Handling, for details.
BL = 0: Exceptions and interrupts are accepted.
BL is set to 1 on generation of an exception or interrupt , and is initialized to 1 by a reset.
CL:
Cache lock bit
M and Q bits:
I3−I0 bits:
Note:
When set to 1, the cache lock function can be used.
Used by the DIV0S/U and DIV1 instructions.
Interrupt mask bits: 4-bit field indicating the interrupt request mask level.
I3−I0 do not change to the interrupt acceptance level when an interrupt is generated.
Initialized to B'1111 by a reset.
S bit:
Used by the MAC instruction.
T bit:
Used by the MOVT, CMP/cond, TAS, TST, BT, BF, SETT, CLRT, and DT instructions to
indicate true (1) or false (0).
Used by the ADDV/C, SUBV/C, DIV0U/S, DIV1, NEGC, SHAR/L, SHLR/L, ROTR/L, and
ROTCR/L instructions to indicate a carry, borrow, overflow, or underflow.
0 bits:
These bits always read 0, and the write value should always be 0.
The M, Q, S, and T bits can be set or cleared by special instructions in user mode.
Their values are undefined after a reset. All other bits can be read or written in privileged mode.
Status
register
(SR)
Figure 2.5 Register Set Overview, Control Registers
Rev. 5.00, 09/03, page 24 of 760
2.2Data Formats
A
A
2.2.1Data Format in Registers
Register operands are always longwords (32 bits, figure 2.6). When a memory operand is only a
byte (8 bits) or a word (16 bits), it is sign-extended into a longword when loaded into a register.
310
Longword
Figure 2.6 Longword
2.2.2Data Format in Memory
Memory data formats are classified into bytes, words, and longwords. Memory can be accessed in
8-bit byte, 16-bit word, or 32-bit longword form. A memory operand less t han 32 bits in length is
sign-extended before being stored in a register.
A word operand must be accessed starting from a word boundary (even address of a 2-byte unit:
address 2n), and a longword operand starting from a longword boundary (even address of a 4-byte
unit: address 4n). An address error will result if this rule is not observed. A byte operand can be
accessed from any address.
Big-endian or little-endian byte order can be selected for the data format. The endian mode should
be set with the MD5 external pin in a power-on reset. Big-endian mode is selected when the MD5
pin is low, and little-endian when high. The endian mode cannot be changed dynamically. Bit
positions are numbered left to right from most-significant to least-significant. Thus, in a 32-bit
longword, the leftmost bit, bit 31, is the most significant bit and the rightmost bit, bit 0, is the least
significant bit.
The data format in memory is shown in figure 2.7.
Address A + 1 Address A + 3
Address A
Address A
ddress A + 4
ddress A + 8
237
31015
Byte0 Byte1 Byte2 Byte3
Word0
LongwordLongword
Big-endian mode
Word1
Figure 2.7 Data Format in Memory
Address A + 11
Address A + 10 Address A + 8
Address A + 9Address A + 2
237
31015
Byte3 Byte2 Byte1 Byte0
Word1
Little-endian mode
Word0
Rev. 5.00, 09/03, page 25 of 760
Address A + 8
Address A + 4
Address A
2.3Instruction Features
2.3.1Execution Environment
Data Length: The SH7709S instruction set is implemented with fixed-length 16-bit wide
instructions executed in a pipelined sequence with single-cycle execution for most instructions.
All operations are executed in 32-bit longword units. Memory can be accessed in 8-bit byte, 16-bit
word, or 32-bit longword units, with byte or word units sign-extended into 32-bit longwords.
Literals are sign-extended in arithmetic operations (MOV, ADD, and CMP/EQ instructions) and
zero-extended in logical operations (TST, AND, OR, and XOR instructions).
Load/Store Architecture: The SH7709S features a load-store architecture in which basic
operations are executed in registers. Operations requiring memory access are executed in registers
following register loading, except for bit-manipulation operatio ns such as logical AND functions,
which are executed directly in memory.
Delayed Branching: Unconditional branching is implemented as delayed branch operations.
Pipeline disrup tions due to branching are minimized by the execution of the ins tr uction following
the delayed branch instruct ion prio r to branching. Conditional branch instructions are of two
kinds, delayed and normal.
BRATRGET
ADDR1, R0;ADD is executed prior to branching to TRGET
Rev. 5.00, 09/03, page 26 of 760
T bit: The T bit in the status register (SR) is used to indicate the result of compare operations, and
is read as a TRUE/FALSE condition determining if a conditional branch is taken or not. To
improve processing speed, the T bit logic state is modified only by s p ecific operations. An
example of how the T bit may be used in a sequence of operations is shown below.
ADD#1, R0;T bit not modified by ADD operation
CMP/EQR1, R0;T bit set to 1 when R0 = 0
BTTRGET
;branch taken to TRGET when T bit = 1 (R0 = 0)
Literals: Byte-length literals are inserted directly into the instruction code as immediate data. To
maintain the 16-bit fixed-length instruction code, word or longword literals are stored in a table in
main memory rather than inserted directly into the instruction code. The memory table is accessed
by the MOV instruction using PC-relative addressing with displacement, as follows:
MOV.W@(disp, PC), R0
Absolute Addresses: As with word and longword literals, absolute addresses must also be stored
in a table in main memory. The value of the absolute address is transferred to a register and the
operand access is specified by indexed register-indirect addressing, with the absolute address
loaded (like word and longword immediate data) during instruction execution.
16-Bit and 32-Bit Displ acements: In the same way, 16-bit and 32-bit displacements also must be
stored in a table in main memory. Exactly like absolute addresses, the displacement value is
transferred to a register and the operand access is specified by indexed register-indirect addressing,
loading the displacement (like word and longword immediate data) during instruction execution.
Rev. 5.00, 09/03, page 27 of 760
2.3.2Addressing Mo des
Addressing modes and effective address calculation methods are shown in table 2.2.
Table 2.2Addressing Modes and Effective Addresses
Addressing
Mode
Register direct Rn
Register
indirect
Register
indirect with
post-increment
Register
indirect with
pre-decrement
Instruction
FormatEffective Address Calculation MethodCalculation Formula
@RnEffective address is register Rn contents.
@Rn+Effective address is register Rn contents. A
@–RnEffective address is register Rn contents,
Effective address is register Rn. (Operand is
register Rn contents.)
RnRn
constant is added to Rn after instruction
execution: 1 for a byte operand, 2 for a word
operand, 4 for a longword operand.
Rn
Rn + 1/2/4
1/2/4
decremented by a constant beforehand: 1 for
a byte operand, 2 for a word operand, 4 for a
longword operand.
Instruction
FormatEffective Address Calculation MethodCalculation Formula
@(disp:4,
Rn)
Effective address is register Rn contents with
4-bit displacement disp added. After disp is
zero-extended, it is multiplied by 1 (byte), 2
(word), or 4 (longword), according to the
operand size.
@(R0, Rn) Effective address is sum of register Rn and
R0 contents.
Rn
+
Rn + R0
R0
@(disp:8,
GBR)
Effective address is register GBR contents
with 8-bit displacement disp added. After
disp is zero-extended, it is multiplied by 1
(byte), 2 (word), or 4 (longword), according
to the operand size.
GBR
GBR
+ disp × 1/2/4
@(R0,
GBR)
disp
(zero-extended)
1/2/4
+
×
Effective address is sum of register GBR and
R0 contents.
Instruction
FormatEffective Address Calculation MethodCalculation Formula
@(disp:8,
PC)
Effective address is register PC contents
with 8-bit displacement disp added. After
disp is zero-extended, it is multiplied by 2
(word), or 4 (longword), according to the
operand size. With a longword operand, the
Word: PC + disp × 2
Longword:
PC & H'FFFF FFFC +
disp × 4
lower 2 bits of PC are masked.
PC
(for longword)
&
H'FFFFFFFC
+
disp
(zero-extended)
x
2/4
PC + disp × 2
or
PC&H'FFFFFFFC
+ disp × 4
PC-relativedisp:8Effective address is register PC contents
with 8-bit displacement disp added after
being sign-extended and mu ltiplied by 2.
PC
disp
+
PC + disp × 2
(sign-extended)
×
2
disp:12Effective address is register PC contents
with 12-bit displacement disp added after
being sign-extended and mu ltiplied by 2.
PC
disp
+
PC + disp × 2
(sign-extended)
×
PC + disp × 2
PC + disp × 2
Rev. 5.00, 09/03, page 30 of 760
2
Addressing
Mode
PC-relativeRnEffective address is sum of register PC and
Instruction
FormatEffective Address Calculation MethodCalculation Formula
Rn contents.
PC
PC + Rn
+
R0
Immediate#imm:88-bit immediate data imm of TST, AND, OR,
or XOR instruction is zero-extended.
#imm:88-bit immediate data imm of MOV, ADD, or
CMP/EQ instruction is sign-extended.
#imm:88-bit immediate data imm of TRAPA
instruction is zero-extended and multiplied by
4.
Note: For the addressing modes below that use a displacement (disp), the assembler descriptions
in this manual show the value before scaling (×1, ×2, or ×4) is performed according to the
operand size. This is done to clarify the operation of the IC. Refer to the relevant assembler
notation rules for the actual assembler descripti ons.
@ (disp:4, Rn) ; Register indirect with displacement
@ (disp:8, Rn) ; GBR indirect with displacement
@ (disp:8, PC) ; PC-relative with displacement
disp:8, disp:12; PC-relative
PC + R0
—
—
—
Rev. 5.00, 09/03, page 31 of 760
2.3.3Instruction Formats
Table 2.3 explains the meaning of instruction formats and source and destination operands. The
meaning of the operands depends on t he operation code. The following symbols are u s ed.
xxxx:Operation code
mmmm: Source register
nnnn:Destination register
iiii:Immediate data
dddd:Displacement
Table 2.3Instruction Formats
Instruction Format
0 format
n format
m format
150
xxxxxxxxxxxxxxxx
150
xxxxxxxxxxxxnnnn
150
xxxxxxxx
mmmm
xxxx
Source
Operand
——NOP
—nnnn: register
Control register or
system register
Control register or
system register
mmmm: register
direct
mmmm: register
indirect with postincrement
mmmm: register
indirect
mmmm: PCrelative using Rm
Destination
Operand
direct
nnnn: register
direct
nnnn: register
indirect with
pre-decrement
Control register
or system
register
Control register
or system
register
—JMP@Rm
—BRAFRm
Instruction
Example
MOVT Rn
STS
MACH,Rn
STC.L
SR,@–Rn
LDC
Rm,SR
LDC.L
@Rm+,SR
Rev. 5.00, 09/03, page 32 of 760
Instruction Format
nm format
150
xxxxxxxx
nnnn
mmmm
Source
Operand
mmmm: register
direct
Destination
Operand
nnnn: register
direct
Instruction
Example
ADDRm,Rn
md format
nd4 format
150
xxxxdddd
150
xxxx
xxxx
xxxx
mmmm
nnnn
dddd
mmmm: register
indirect
mmmm: register
indirect with postincrement
(multiply-andaccumulate
operation)
nnnn: * register
indirect with postincrement
(multiply-andaccumulate
operation)
Note: * In a multiply-and-accumulate instruction, nnnn is the source register.
Rev. 5.00, 09/03, page 34 of 760
2.4Instruction Set
2.4.1Instruction Set Classified by Function
The SH7709S instruction set includes 68 basic instruction types, as listed in table 2.4.
Table 2.4Classification of Instructions
Operation
Classification Types
Data transfer5MOVData transfer39
Arithmetic21ADDBinary addition33
operations
CodeFunction
MOVAEffective address transfer
MOVTT bit transfer
SWAPSwap of upper and lower bytes
XTRCTExtraction of middle of linked registers
ADDCBinary addition with carry
ADDVBinary addition with overflow check
CMP/condComparison
DIV1Division
DIV0SInitialization of signed divisi on
DIV0UIniti aliz at ion of unsi gned division
DMULSSigned double-precision multiplication
DMULUUnsigned double-precision multiplication
DTDecrement and test
EXTSSign extension
EXTUZero extension
MACMultiply-and-accumulate opera tion ,
bits)
MULSSigned multiplication ( 16 × 16 bits)
MULUUnsigned multiplication (16 × 16 bits)
NEGNegation
NEGCNegation with borrow
SUBBinary subtraction
SUBCBinary subtraction with borrow
SUBVBinary subtraction with underflow check
NOTBit inversion
ORLogical OR
TASMemory test and bit set
TSTLogical AND and T bit set
XORExclusive OR
ROTROne-bit right rotation
ROTCLOne-bit left rotation with T bit
ROTCROne-bit right rotation with T bit
SHALOne-bit arithmetic left shift
SHAROne-bit arithmetic right shift
SHLLOne-bit logical left shift
SHLLnn-bit logical left shift
SHLROne-bit logical right shift
SHLRnn-bit logical right shift
SHADDynamic arithmetic shift
SHLDDynamic logical shift
branch (T = 1)
BRAUnconditional branch
BRAFUnconditional branch
BSRBranch to subroutine procedure
BSRFBranch to subrouti ne procedure
JMPUnconditional branch
JSRBranch to subroutine procedure
RTSReturn from subroutine procedure
CLRTClear T bit
CLRSClear S bit
LDCLoad to control register
LDSLoad to system register
LDTLBLoad PTE to TLB
NOPNo operation
PREFPrefetch data to cache
RTEReturn from exception handling
SETSSet S bit
SETTSet T bit
SLEEPShift to power-down mode
STCStore from control register
STSStore from system register
TRAPATrap exception handling
No. of
Instructions
11
Rev. 5.00, 09/03, page 37 of 760
Table 2.5 lists the SH7709S instruction code formats.
Table 2.5Instruction Code Format
ItemFormatExplanation
Instruction
mnemonic
Instruction
code
Operation
summary
Privileged
mode
Execution
cycles
T bitValue of T bit after instruction is executed
Note: * Scaling (×1, ×2, ×4) is performed according to the instruct ion oper and siz e.
Direction of transfer
Memory operand
Flag bits in SR
Logical AND of each bit
Logical OR of each bit
Exclusive OR of each bit
Logical NOT of each bit
n-bit shift
Indicates whether privileged mode applies
Value when no wait states are inserted
The execution cycles listed in the table are minimums. The
actual number of cycles may be increased in cas es su ch as
the followsing:
1. When contention occurs between instruction fetches and
data access
2. When the destination register of the load instruction
(memory → register) and the register used by the next
instruction are the same
—: No change
*
Rev. 5.00, 09/03, page 38 of 760
Table 2.6 lists the SH7709S data transfer instructions
Notes: 1. The table shows the minimum number of execution cycles. The actual num ber of
instruction execution cycles will increase in cases such as the following:
• When there is contention between an instruction fetch and data access
• When the destination register in a load (memory-to-register) instruction is also used
by the next instruction
2. With the addressing modes using displacement (disp) listed below, the assembler
descriptions in this manual show the value before scaling (×1, ×2, or ×4) is performed.
This is done to clarify the operation of the c hip. For t he act ual assembler descriptions,
refer to the individual assembler notation rules.
@ (disp:4, Rn) ; Register-indirect with displacement
@ (disp:8, Rn) ; GBR-indirect with displacement
@ (disp:8, PC) ; PC-relative with displacement
1101 RndispMOV.L @(disp:8,PC),Rn
1110 RnimmMOV#imm:8,Rn
1111 ************
Note: See the SH-3/SH-3E/SH3-DSP Programming Manual for details.
Fx: 0000Fx: 0001Fx: 0010Fx: 0011 to 1111
MD: 00MD: 01MD: 10MD: 11
MOV.W
R0,@(disp:4,Rn)
@(disp:4,Rm),R0
R0,@(disp:8,GBR)
@(disp:8,GBR),R0
#imm:8,@(R0,GBR)
R0,@(disp:4,Rn)
MOV.W
@(disp:4,Rm),R0
MOV.W
R0,@(disp:8,GBR)
MOV.W
@(disp:8,GBR),R0
AND.B
#imm:8,@(R0,GBR)
MOV.L
R0,@(disp:8,GBR)
MOV.L
@(disp:8,GBR),R0
XOR.B
#imm:8,@(R0,GBR)
TRAPA #imm:8
MOVA
@(disp:8,PC),R0
OR.B
#imm:8,@(R0,GBR)
Rev. 5.00, 09/03, page 52 of 760
2.5Processor States and Processor Modes
2.5.1Processor States
The SH7709S has five processor states: the reset state, exception-handling state, bus-released
state, program execution state, and power-down state.
Reset State: In this state the CPU is reset. The CPU enters the power-on reset state if the RESETP
pin is low, or the manual reset state if the RESETM pin is low. See section 4, Exception Handling,
for more information on resets.
In the power-on reset state, the internal states of the CPU and the on-chip supporting module
registers are initialized. In the manual reset state, the internal states of the CPU and registers of onchip supporting modules other than the bus state controller (BSC) are initialized. Refer to the
register configurations in the relevant sections for further details.
Exception-Handling Stat e: This is a transient state during which the CPU’s processor state flow
is altered by a reset, general exception, or interrupt exception handling.
In the case of a reset, the CPU branches to address H'A0000000 and starts executing the usercoded exception handling program.
In the case of a general exception or interrupt, the program counter (PC) contents are saved in the
saved program counter (SPC) and the status register (SR ) contents are sa ved in the saved status
register (SSR). The CPU branches to the start address of the user-coded exception service routine
found from the sum of the contents of the vector base address and the vector offset. See section 4,
Exception Processing, for more information on resets, general exceptions, and interrupts.
Program Execution State: In this state the CPU executes program instructions in sequence.
Power-Down State: In the power-down state, CPU operation halts and power consumption is
reduced. There are two modes in the power-down state: sleep mode, and standby mode. See
section 8, Power-Down Modes, for more information.
Bus-Released State: In this state the CPU has released the bus to a device that requested it.
Transitions between the states are shown in figure 2.8.
Rev. 5.00, 09/03, page 53 of 760
From any state when
RESETP = 0
From any state but hardware standby
mode when RESETM = 0
Interrupt
Bus-released state
Bus
request
Sleep mode
CA = 1,RESETP=0
Power-on reset
Bus request
Bus
request
clearance
RESETP = 0
state
RESETP = 1RESETM = 1
Exception-handling state
Exception
Bus request clearance
Bus request
interrupt
Bus request
clearance
SLEEP
instruction
with STBY
bit cleared
Hardware standby mode*
Program execution state
End of exception
transition
processing
Manual reset
state
Reset state
Interrupt
SLEEP
instruction
with STBY
bit set
Standby mode
Power-down state
Note: * The hardware standby mode is entered when the CA pin goes low from any state.
Figure 2.8 Processor State Transitions
2.5.2Processor Modes
There are two processor modes: privileged mode and user mode. The processor mode is
determined by the processor mode bit (MD) in the status register (SR). User mode is selected
when the MD bit is 0, and priv ileged mod e when the M D bit is 1. When the reset state or
exception state is entered, the MD bit is set to 1. When exception handling ends, the MD bit is
cleared to 0 and user mode is entered. There are certain registers and bits which can only be
accessed in privileged mode.
Rev. 5.00, 09/03, page 54 of 760
Section 3 Memory Management Unit (MMU)
3.1Overview
3.1.1Features
The SH7709S has an on-chip memory management unit (MMU) that implements address
translation. The SH7709S features a resident translation look-aside buffer (TLB) that caches
information for user-created address translation tables located in external memory. It enables highspeed translation of virtual addresses into physical addresses. Address translation uses the paging
system and supports two page sizes (1 kbytes and 4 kbytes). The access right to virtual address
space can be set for privileged and user modes to provide memory protection.
3.1.2Role of MMU
The MMU is a feature designed to make efficient use of physical memory. As shown in figure 3.1,
if a process is smaller in size than the physical memory, the entire process can be mapped onto
physical memory. However, if the process increases in size to the extent that it no longer fits into
physical memory, it becomes necessary to partition the process and to map those parts requiring
execution onto memory as occasion demands ((1)). Havi ng the process itself consider this
mapping onto physical memory would impose a large burden on the process. To lighten this
burden, the idea of virtual memory was born as a means of performing en bloc mapping onto
physical memory ((2)). In a virtual memory system, substantially more virtual memory than
physical memory is provided, and the process is mapped onto th is virtual memory. Thus a p rocess
only has to consider operation in virtual memory. Mapping from virtual memory to physical
memory is handled by the MMU. The MMU is normally controlled by the operating system,
switching physical memory to allow the virtual memory required by a process to be mapped onto
physical memory in a smooth fashion. Switching of physi cal m em ory is carried ou t vi a secondar y
storage, etc.
The virtual memory system that came into being in this way is particularly effective in a timesharing system (TSS) in which a number of processes are running simultaneously ((3)). If
processes running in a TSS had to t a ke mapping onto vi rtual memory into consideration while
running, it would not be possible to increase efficiency. Virtual memory is thus used to reduce this
load on the individual processes and so improve efficiency ((4)). In the virtual memory system,
virtual memory is allocated to each process. The task of the MMU is to perform efficient mapping
of these virtual memory areas onto physical memory. It also has a memory protection feature that
prevents one process from inadvertently accessing another process’ s physical memory.
When address translation from virtual memory to physical memory is performed using the MMU,
it may occur that the relevant translation information is not recorded in the MMU, with the result
that one process may inadvertently access the virtual memory allocated to another process. In this
Rev. 5.00, 09/03, page 55 of 760
case, the MMU will generate an exception, change the physical memory mapping, and record the
new address translation information.
Although the functions of the MMU could also be implemented by software alone, the need for
translation to be performed by software each time a process accesses physical memory would
result in poor efficiency. For this reason, a buffer for address translation (translation look-aside
buffer: TLB) is provided in hardware to hold frequently used address translation information. The
TLB can be described as a cache for storing address translation information. Unlike cache
memory, however, if address translation fails, that is, if an exception is generated, switching of
address translation information is normally performed by software. This makes it possible for
memory management to be performed flexibly by software.
The MMU has two methods of mapping from virtual memory to physical memory: a paging
method using fixed-length address translation, and a segment method using variable-length
address translation. With the paging method, the unit of translation is a fixed-size address space
(usually of 1 to 64 kbytes) called a page. This LSI uses the paging method.
In the following text, the SH7709S address space in virtual memory is referred to as virtual
address space, and addres s space in physical memory as physical mem ory sp ace.
Rev. 5.00, 09/03, page 56 of 760
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.