Page 3
Please be sure to implement safety measures to guard against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas product, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other applicable measures.
Page 4
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 they 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.
Page 5
Configuration of This Manual This manual comprises the following items: 1. General Precautions on Handling of Product 2. Configuration of This 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.
Page 6
Preface This LSI is a RISC (Reduced Instruction Set Computer) microcomputer which includes a Renesas Technology-original RISC CPU as its core, and the peripheral functions required to configure a system. Target Users: This manual was written for users who will be using this LSI in the design of application systems.
Page 7
Abbreviations Arithmetic Logic Unit ASID Address Space Identifier Ball Grid Array Timer/Counter (Compare Match Timer) Clock Pulse Generator Central Processing Unit Double Data Rate DDRIF DDR-SDRAM Interface Direct Memory Access DMAC Direct Memory Access Controller FIFO First-In First-Out Floating-point Unit Audio Codec H-UDI User Debugging Interface...
Page 8
Most Significant Bit Program Counter Peripheral Component Interconnect PCIC PCI (local bus) Controller Pin Function Controller RISC Reduced Instruction Set Computer Realtime Clock SCIF Serial Communication Interface with FIFO SIOF Serial Interface with FIFO Serial Sound Interface Test Access Port Translation Lookaside Buffer Timer Unit UART...
Contents Section 1 Overview......................... 1 Features of the SH7763......................1 Block Diagram ........................13 Pin Arrangement ........................14 Section 2 Programming Model ................37 Data Formats........................37 Register Descriptions ......................38 2.2.1 Privileged Mode and Banks ..................38 2.2.2 General Registers....................42 2.2.3...
Page 11
6.5.4 Data TLB Multiple Hit Exception ................ 169 6.5.5 Data TLB Miss Exception ..................169 6.5.6 Data TLB Protection Violation Exception............170 6.5.7 Initial Page Write Exception................. 171 Memory-Mapped TLB Configuration................172 6.6.1 ITLB Address Array ..................... 173 6.6.2 ITLB Data Array....................174 6.6.3 UTLB Address Array....................
Page 12
7.6.1 IC Address Array....................206 7.6.2 IC Data Array ....................... 208 7.6.3 OC Address Array ....................209 7.6.4 OC Data Array...................... 210 Store Queues ........................212 7.7.1 SQ Configuration....................212 7.7.2 Writing to SQ......................212 7.7.3 Transfer to External Memory ................213 7.7.4 Determination of SQ Access Exception..............
Page 26
28.3.3 Transmit Shift Register (SCTSR) ............... 1127 28.3.4 Transmit FIFO Data Register (SCFTDR)............1127 28.3.5 Serial Mode Register (SCSMR)................1128 28.3.6 Serial Control Register (SCSCR)................ 1131 28.3.7 Serial Status Register (SCFSR) ................1135 28.3.8 Bit Rate Register (SCBRR) ................1141 28.3.9 FIFO Control Register (SCFCR) ................
Page 27
29.3.11 Transmit Data Assign Register (SITDAR) ............1213 29.3.12 Receive Data Assign Register (SIRDAR)............1214 29.3.13 Control Data Assign Register (SICDAR) ............1215 29.4 Operation ......................... 1217 29.4.1 Serial Clocks ....................... 1217 29.4.2 Serial Timing ...................... 1218 29.4.3 Transfer Data Format..................1220 29.4.4 Register Allocation of Transfer Data ..............
Page 28
Section 31 Multimedia Card Interface (MMCIF) ........... 1285 31.1 Features..........................1285 31.2 Input/Output Pins......................1287 31.3 Register Descriptions....................... 1288 31.3.1 Command Type Register (CMDTYR)..............1292 31.3.2 Response Type Register (RSPTYR)..............1293 31.3.3 Transfer Byte Number Count Register (TBCR) ..........1297 31.3.4 Transfer Block Number Counter (TBNCR)............
Page 29
32.3 Register Descriptions ....................... 1365 32.3.1 Area 6 Interface Status Register (PCC0ISR) ............1366 32.3.2 Area 6 General Control Register (PCC0GCR) ........... 1369 32.3.3 Area 6 Card Status Change Register (PCC0CSCR)..........1372 32.3.4 Area 6 Card Status Change Interrupt Enable Register (PCC0CSCIER)..... 1376 32.4 Operation .........................
Page 30
34.3.2 Status Register (SSISR) ..................1431 34.3.3 Transmit Data Register (SSITDR)..............1436 34.3.4 Receive Data Register (SSIRDR) ............... 1436 34.4 Operation ......................... 1437 34.4.1 Bus Format ......................1437 34.4.2 Non-Compressed Modes..................1438 34.4.3 Operation Modes ....................1448 34.4.4 Transmit Operation..................... 1449 34.4.5 Receive Operation ....................
Page 31
35.3.21 HcRhStatus Register (USBHRS) ................ 1484 35.3.22 HcRhPortStatus[2] Register (USBHRPS2)............1486 35.3.23 ConfigurationControl Register (USBHSC)............1489 35.4 Functional Description..................... 1491 35.4.1 General Functionality ..................1491 35.5 Connection Example of an External Circuit ..............1493 35.6 Usage Notes ........................1493 35.6.1 External memory that USBH accesses..............1493 35.6.2 Issuing USB Bus Reset ..................
Page 34
37.6.2 Notes on Using NMI Interrupt................1653 Section 38 A/D Converter ................1655 38.1 Features..........................1655 38.2 Input Pins ......................... 1657 38.3 Register Descriptions....................... 1658 38.3.1 A/D Data Registers A to D (ADDRA to ADDRD) ..........1658 38.3.2 A/D Control/Status Registers (ADCSR)............. 1660 38.4 Operation .........................
Page 35
40.2.8 Port H Control Register (PHCR) ................ 1705 40.2.9 Port I Control Register (PICR) ................1707 40.2.10 Port J Control Register (PJCR) ................1709 40.2.11 Port K Control Register (PKCR) ................ 1711 40.2.12 Port L Control Register (PLCR) ................. 1713 40.2.13 Port M Control Register (PMCR) ...............
Page 36
Section 41 User Break Controller (UBC)............1759 41.1 Features..........................1759 41.2 Register Descriptions....................... 1761 41.2.1 Match Condition Setting Registers 0 and 1 (CBR0 and CBR1) ......1763 41.2.2 Match Operation Setting Registers 0 and 1 (CRR0 and CRR1) ......1770 41.2.3 Match Address Setting Registers 0 and 1 (CAR0 and CAR1)......
Page 37
Section 43 Electrical Characteristics ...............1825 43.1 Absolute Maximum Ratings .................... 1825 43.2 Power-On and Power-Off Order ..................1826 43.2.1 Power-On Order....................1826 43.2.2 Power-Off Order ....................1826 43.2.3 Power-Off and Power-On Order in RTC Power-Supply Backup Mode (Hardware Standby).................... 1828 43.2.4 Power-Off and Power-On Order in DDR-SDRAM Power-Supply Backup Mode......................
Page 38
Appendix ....................... 1903 CPU Operation Mode Register (CPUOPM) ..............1903 Instruction Prefetching and Its Side Effects..............1905 Speculative Execution for Subroutine Return..............1906 List of Mode Control Pins and Schematic Diagram of External Cicuits ......1907 Notes on Board Design ....................1909 Package Dimensions ......................
Page 39
Figures Section 1 Overview Figure 1.1 SH7763 Block Diagram ....................13 Figure 1.2 Pin Arrangement......................15 Section 2 Programming Model Figure 2.1 Data Formats ....................... 37 Figure 2.2 CPU Register Configuration in Each Processing Mode ..........41 Figure 2.3 General Registers ......................42 Figure 2.4 Floating-Point Registers ....................
Page 40
Figure 6.9 Flowchart of Memory Access Using UTLB.............. 160 Figure 6.10 Flowchart of Memory Access Using ITLB ............. 161 Figure 6.11 Operation of LDTLB Instruction................164 Figure 6.12 Memory-Mapped ITLB Address Array..............173 Figure 6.13 Memory-Mapped ITLB Data Array ................ 174 Figure 6.14 Memory-Mapped UTLB Address Array ..............
Page 42
Section 12 DDR-SDRAM Interface (DDRIF) Figure 12.1 DDRIF Block Diagram ................... 410 Figure 12.2 Data Alignment in DDR-SDRAM and DDRIF............414 Figure 12.3 Relationship between Write Values in SDMR and Output Signals to Memory Pins ......................428 Figure 12.4 DDR-SDRAM Access..................... 430 Figure 12.5 Basic DDRIF Timing (1 Burst Read: 1, 2, 4, or 8 Bytes;...
Page 43
Figure 13.10 PCI Local Bus to SuperHyway Bus Address Translation (Local Address Space 0/1) ..................539 Figure 13.11 PCI Local Bus to SuperHyway Bus Address Translation (PCIC I/O Space) ..540 Figure 13.12 Endian Conversion from PCI Local Bus to SuperHyway bus (Non-Byte Swapping: TBS = 0)................
Page 44
Figure 14.14 Example of DREQ Input Detection in Cycle Steal Mode Level Detection... 610 Figure 14.15 Example of DREQ Input Detection in Burst Mode Edge Detection ..... 611 Figure 14.16 Example of DREQ Input Detection in Burst Mode Level Detection ....611 Figure 14.17 DMA Transfer End Signal (Cycle Steal Mode Level Detection) ......
Page 45
Section 19 Timer Unit (TMU) Figure 19.1 Block Diagram of TMU ..................688 Figure 19.2 Example of Count Operation Setting Procedure ............. 700 Figure 19.3 TCNT Auto-Reload Operation ................701 Figure 19.4 Count Timing when Operating on Internal Clock ........... 701 Figure 19.5 Count Timing when Operating on External Clock ..........
Page 46
Section 23 Gigabit Ethernet Controller (GETHER) Figure 23.1 Configuration of GETHER ..................784 Figure 23.2 GETHER Data Path and Various Settings .............. 938 Figure 23.3 Relationship between Transmit Descriptor and Transmit Buffer......940 Figure 23.4 Relationship between Receive Descriptor and Receive Buffer ....... 946 Figure 23.5 Relationship between Transmit Descriptor and Transmit Buffer......
Page 47
Figure 23.38 Data Subject to Checksum Calculation ..............993 Section 25 Stream Interface (STIF) Figure 25.1 Block Diagram of STIF ................... 998 Figure 25.2 Transmit/Receive Data Structure in External Memory (with 16-Byte Work Area) ..................1015 Figure 25.3 Clock Valid Reception Timing................1017 Figure 25.4 Strobe Reception Timing..................
Page 48
Figure 27.14 Sample Operation Using Modem Control (SCIF0_RTS) (Only in Channel 0) .................... 1104 Figure 27.15 Data Format in Clocked Synchronous Communication ........1104 Figure 27.16 Sample SCIF Initialization Flowchart ..............1106 Figure 27.17 Sample Serial Transmission Flowchart ............... 1107 Figure 27.18 Sample SCIF Transmission Operation in Clocked Synchronous Mode....
Page 49
Section 29 Serial I/O with FIFO (SIOF) Figure 29.1 Block Diagram of SIOF ..................1186 Figure 29.2 Serial Clock Supply....................1217 Figure 29.3 Serial Data Synchronization Timing ..............1219 Figure 29.4 SIOF Transmit/Receive Timing ................1220 Figure 29.5 Transmit/Receive Data Bit Alignment ..............1223 Figure 29.6 Control Data Bit Alignment ..................
Page 50
Figure 31.3 Example of Operational Flow for Commands Not Requiring Command Response....................1329 Figure 31.4 Example of Command Sequence for Commands without Data Transfer (No Data Busy State) .................... 1330 Figure 31.5 Example of Command Sequence for Commands without Data Transfer (with Data Busy State) ..................
Page 52
Figure 34.10 Inverted Clock ..................... 1445 Figure 34.11 Inverted Word Select................... 1445 Figure 34.12 Inverted Padding Polarity..................1445 Figure 34.13 Padding Bits First, Followed by Serial Data, with Delay........1446 Figure 34.14 Padding Bits First, Followed by Serial Data, without Delay....... 1446 Figure 34.15 Serial Data First, Followed by Padding Bits, without Delay.......
Page 53
Section 37 LCD Controller (LCDC) Figure 37.1 LCDC Block Diagram................... 1586 Figure 37.2 Valid Display and the Retrace Period..............1624 Figure 37.3 Color-Palette Data Format..................1628 Figure 37.4 Power-Supply Control Sequence and States of the LCD Module ......1634 Figure 37.5 Power-Supply Control Sequence and States of the LCD Module ......1634 Figure 37.6 Power-Supply Control Sequence and States of the LCD Module ......
Page 54
Section 39 D/A Converter (DAC) Figure 39.1 Block Diagram of D/A Converter ................. 1673 Figure 39.2 D/A Converter Operation Example ............... 1677 Section 41 User Break Controller (UBC) Figure 41.1 Block Diagram of UBC..................1760 Figure 41.2 Flowchart of User Break Debugging Support Function ........1790 Section 42 User Debugging Interface (H-UDI) Figure 42.1 H-UDI Block Diagram ..................
Page 55
Figure 43.23 MPX Basic Bus Cycle: Write................1853 Figure 43.24 MPX Bus Cycle: Burst Read................1854 Figure 43.25 MPX Bus Cycle: Burst Write ................1855 Figure 43.26 Byte Control SRAM Bus Cycle ................1856 Figure 43.27 Byte Control SRAM Bus Cycle: Basic Read Cycle (No Wait, No Address Setup/Hold Time Insertion, RDS = 1, RDH = 0) ..........
Page 56
Figure 43.61 SIOF Transmission/Reception Timing (Master Mode 1, Sampling at the Falling Edge) ..........1885 Figure 43.62 SIOF Transmission/Reception Timing (Master Mode 1, Sampling at the Rising Edge) ..........1885 Figure 43.63 SIOF Transmission/Reception Timing (Master Mode 2, Sampling at the Falling Edge) ..........1886 Figure 43.64 SIOF Transmission/Reception Timing (Master Mode 2, Sampling at the Rising Edge) ..........
Page 57
Tables Section 1 Overview Table 1.1 Features of the SH7763................... 80 Table 1.2 Pin Configuration....................94 Section 2 Programming Model Table 2.1 Initial Register Values..................... 40 Table 2.2 Bit Allocation for FPU Exception Handling............50 Section 3 Instruction Set Table 3.1 Execution Order of Delayed Branch Instructions ...........
Page 58
Section 7 Caches Table 7.1 Cache Features...................... 187 Table 7.2 Store Queue Features .................... 187 Table 7.3 Register Configuration..................190 Table 7.4 Register States in Each Processing State .............. 190 Section 8 L Memory Table 8.1 L Memory Addresses.................... 217 Table 8.2 Register Configuration..................
Page 59
Table 11.15 Relationship between Address and CE When Using PCMCIA Interface ..380 Section 12 DDR-SDRAM Interface (DDRIF) Table 12.1 Pin Configuration....................81 Table 12.2 Access and Data Alignment in Little Endian Mode (External Bus Width is 32 Bits) ................82 Table 12.3 Access and Data Alignment in Big Endian Mode (External Bus Width is 32 Bits) ................
Page 60
Table 15.4 Access and Data Alignment for Little Endian ............618 Table 15.5 Access and Data Alignment for Big Endian ............619 Section 16 Clock Pulse Generator (CPG) Table 16.1 Pin Configuration and Functions of CPG ............... 82 Table 16.2 Clock Operating Modes ..................
Page 61
Table 20.13 Up/Down-Count Conditions in Phase Counting Mode 4........731 Section 21 Compare Match Timer (CMT) Table 21.1 Register Configuration..................735 Table 21.2 Register State in Each Operating Mode ..............736 Section 22 Realtime Clock (RTC) Table 22.1 RTC Pins....................... 747 Table 22.2 Register Configuration..................
Page 62
Section 28 Serial Communication Interface with FIFO/IrDA Interface (SCIF/IrDA) Table 28.1 Pin Configuration....................1109 Table 28.2 Register Configuration..................1110 Table 28.3 Register States in each Operation Mode ............. 1111 Table 28.4 SCSMR Settings ....................1127 Table 28.5 Baud Rate (3.6864 MHz Clock) ................. 1134 Table 28.6 SCSMR Settings for Serial Transfer Format Selection........
Page 63
Table 31.6 Correspondence between Command Response Byte Number and RSPR... 1286 Table 31.7 List of Chattering Elimination Pulse Cycles............1311 Table 31.8 MMCIF Interrupt Sources................... 1343 Section 32 PC Card Controller (PCC) Table 32.1 Features of the PCMCIA Interface ..............1347 Table 32.2 PCC Pin Configuration ..................
Page 64
Table 37.3 Register State in Each Operating Mode..............83 Table 37.4 I/O Clock Frequency and Clock Division Ratio ............. 86 Table 37.5 Limits on the Resolution of Rotated Displays, Burst Length, and Connected Memory (32-bit SDRAM) ..................119 Table 37.6 Available Power-Supply Control-Sequence Periods at Typical Frame Rates..
Page 65
Table 43.3 DC Characteristics (1) [common] ................83 Table 43.4 DC Characteristics (2-a) [Except of USB Transceiver and I C Related Pins] ..84 Table 43.5 DC Characteristics (2-b) [I C Related Pins] ............85 Table 43.6 DC Characteristics (2-c) [USB Transceiver Related Pins] ........86 Table 43.7 Permissible Output Currents ...................
Section 1 Overview Features of the SH7763 This LSI is a single-chip multifunction CMOS microcomputer that integrates the Renesas Technology original RISC (reduced instruction set computer) CPU core with the peripheral functions required for a wide range of application systems such as high-speed Ethernet, display, and digital AV systems.
Section 1 Overview Table 1.1 Features of the SH7763 Item Features • Maximum operating 266 MHz frequency • Performance 478 MIPS (266 MHz), 1862 MFLOPS (266 MHz) • Renesas Technology original architecture • 32-bit internal data bus • General-register files: ...
Page 69
Section 1 Overview Item Features • On-chip floating-point coprocessor • Supports single-precision (32 bits) and double-precision (64 bits) • Supports IEEE754-compliant data types and exceptions • Two rounding modes: Round to Nearest and Round to Zero • Handling of denormalized numbers: Truncation to zero or interrupt generation for IEEE754 compliance •...
Page 70
Section 1 Overview Item Features • Memory 4 Gbytes of physical address space, 256 address spaces (identified by management an 8-bit ASID (address space identifier)) unit (MMU) • Supports single virtual memory mode and multiple virtual memory mode • Supports multiple page sizes: 1 kbyte, 4 kbytes, 64 kbytes, or 1 Mbytes •...
Page 71
Section 1 Overview Item Features • Clock pulse Selectable CPU clock: 8 times EXTAL generator (CPG) • Clock modes: CPU frequency: 266 MHz (max.) Local bus frequency: 1/4 times the CPU clock 66 MHz (max.) DDR-SDRAM I/F frequency: 1/2 times the CPU clock 133 MHz (max.) ...
Page 72
Section 1 Overview Item Features • Local bus state Physical address space divided into seven areas (areas 0 to 6), each controller (LBSC) comprising up to 64 Mbytes I/F configuration, bus width, and wait cycle insertion are settable for each area •...
Page 73
Section 1 Overview Item Features • DDR-SDRAM DDR-SDRAM interface: 32-bit data bus width controller (DDRIF) • Supports the DDR266 or DDR200 SDRAM • DDR-SDRAM refreshing Programmable refreshing intervals (auto-refresh mode) Self-refresh mode • Supports a burst length of 2 •...
Page 74
Section 1 Overview Item Features • Timer unit (TMU) 6-channel auto-reload 32-bit timer • Input-capture function (channels 2 and 5 only) • Choice of seven types of counter input clock for each channel External clock (TCLK), five peripheral clocks (Pck0/4, Pck0/16, Pck0/64, Pck0/256, Pck0/1024), and RTC clock •...
Page 75
Section 1 Overview Item Features • Serial sound Four channels (SSI0, SSI1, SSI2, SSI3) interface (SSI) • Supports various serial audio formats • Supports master/slave functions • Programmable word clock and bit clock generation • Multi-channel format • Supports 8/16/18/20/22/24/32-bit data formats •...
Page 76
Section 1 Overview Item Features • 8 bits ± 4LSB, two channels D/A converter • Conversion time: 10 µs (DAC) • Two data registers • Output range: 0 to Avcc (max. 3.6 V) • Display size: 16 × 1 pixels to 1024 × 1024 pixels LCD controller (LCDC) •...
Page 77
Section 1 Overview Item Features • Stream interface Parallel connection available when MPEG2 TS stream is input (STIF) Parallel stream connection Stream input: Master mode with clock-valid operation Byte transfer mode with strobe operation Stream output: Master mode with clock-valid operation Byte transfer mode with strobe operation •...
Page 78
Section 1 Overview Item Features • Security Encryption/decryption based on AES (Advanced Encryption Standard) accelerator* (Key length: 128, 192, and 256 bits) (SECURITY) • DES/Triple-DES encryption/decryption based on DES (Data Encryption Standard) • Hash function generation based on the MD5 (Message-Digest Algorithm) •...
SECURITY*: Security accelerator TPU: 16-bit pulse unit USBH: USB host controller LCDC: LCD controller Note: * SECURITY is incorporated only in the R5S77630, not in the R5S77631. Figure 1.1 SH7763 Block Diagram Rev. 1.00 Oct. 01, 2007 Page 13 of 1956 REJ09B0256-0100...
Page 84
Section 1 Overview Power Pin No. Pin Name Function Supply PTI3/ST0M_VALIDI/IIC0_SDA/ I/I/IO/I/I Port/ST data valid (mirror pin)/IIC VCCQ SIOF1_MCLK/USB_CLK serial data/ SIOF master clock/USB clock input PTK7/ST1_D7/GET0_ERXD7/ IO/IO/I/I/O Port/ST data /ETHER receive VCCQ SIOF2_MCLK/LCD_VCPWC data/SIOF master clock/LCD power supply control PTI5/MD10/ST1_VALID/ IO/I /IO/O Port/mode control (external CPU...
Page 85
Section 1 Overview Power Pin No. Pin Name Function Supply M_A12 DDR-SDRAM address bus VCCQ_ M_A11 DDR-SDRAM address bus VCCQ_ M_A9 DDR-SDRAM address bus VCCQ_ M_A8 DDR-SDRAM address bus VCCQ_ M_A7 DDR-SDRAM address bus VCCQ_ M_A6 DDR-SDRAM address bus VCCQ_ M_A5 DDR-SDRAM address bus VCCQ_...
Page 86
Section 1 Overview Power Pin No. Pin Name Function Supply VSSQ I/O GND BS/EX_BS Bus cycle start VCCQ PTM2/D26/EX_AD26/ST0_D2/ IO/IO/IO/IO/O/I/I Port/data bus/address-and-data VCCQ ET0_WOL/RMII0_CRS_DV/ bus/ST data/ETHER wake on PINT2 run/RMII carrier detection/port interrupt input PTM1/D25/EX_AD25/ST0_D1/ IO/IO/IO/IO/I/I/I Port/data bus/address-and-data VCCQ ET0_TX-CLK/RMII0_RX_ER/ bus/ST data/ETHER transmit...
Page 88
Section 1 Overview Power Pin No. Pin Name Function Supply VSSQ I/O GND Internal GND VCCQ I/O VCC PTK3/ST1_D3/GET0_ETXD7/ IO/IO/O/IO/O Port/ST data/ETHER transmit VCCQ SIOF2_SYNC/LCD_D5 data/SIOF frame sync/LCD data PTK2/ST1_D2/GET0_ETXD6/ IO/IO/O/IO/O Port/ST data/ETHER transmit VCCQ SIOF1_SCK/LCD_D4 data/SIOF serial clock/LCD data...
Page 89
Section 1 Overview Power Pin No. Pin Name Function Supply M_D21 DDR-SDRAM data bus VCCQ_ M_D22 DDR-SDRAM data bus VCCQ_ VCCQ-DDR DDR-SDRAM I/O VCC VCCQ-DDR DDR-SDRAM I/O VCC Internal VDD PTL3/D19/EX_AD19/IRQ7/ IO/IO/IO/I/I/IO/I/ Port/data bus/address-and-data VCCQ IRL7/ET0_MDIO/INTC/ bus/external interrupt input/ETHER...
Page 90
Section 1 Overview Power Pin No. Pin Name Function Supply M_D7 DDR-SDRAM data bus VCCQ_ M_D6 DDR-SDRAM data bus VCCQ_ M_DQM2 DDR-SDRAM data mask VCCQ_ VSSQ-DDR DDR-SDRAM I/O GND VSSQ-DDR DDR-SDRAM I/O GND Internal GND D7/EX_AD7 IO/IO Data bus/address-and-data bus...
Page 91
Section 1 Overview Power Pin No. Pin Name Function Supply M_DQS1 DDR-SDRAM data strobe VCCQ_ M_DQM1 DDR-SDRAM data mask VCCQ_ M_DQM3 DDR-SDRAM data mask VCCQ_ VSS-DLL1 DLL1 GND VSS-DLL2 DLL2 GND Internal GND ...
Page 92
Section 1 Overview Power Pin No. Pin Name Function Supply Internal GND Internal GND Internal GND D1/EX_AD1 IO/IO Data bus/address-and-data bus VCCQ D0/EX_AD0 IO/IO Data bus/address-and-data bus VCCQ WE1/WE Data enable/PCMCIA WE VCCQ CLKOUT System clock output VCCQ M_D9...
Section 2 Programming Model Section 2 Programming Model The programming model of this LSI is explained in this section. This LSI has registers and data formats as shown below. Data Formats The data formats supported in this LSI are shown in figure 2.1. Byte (8 bits) Word (16 bits) Longword (32 bits)
Section 2 Programming Model Register Descriptions 2.2.1 Privileged Mode and Banks Processing Modes This LSI has two processing modes, user mode and privileged mode. This LSI normally operates in user mode, and switches to privileged mode when an exception occurs or an interrupt is accepted.
Page 105
Section 2 Programming Model Control Registers Control registers comprise the global base register (GBR) and status register (SR), which can be accessed in both processing modes, and the saved status register (SSR), saved program counter (SPC), vector base register (VBR), saved general register 15 (SGR), and debug base register (DBR), which can only be accessed in privileged mode.
Section 2 Programming Model 2.2.2 General Registers Figure 2.3 shows the relationship between the processing modes and general registers. This LSI has twenty-four 32-bit general registers (R0_BANK0 to R7_BANK0, R0_BANK1 to R7_BANK1, and R8 to R15). However, only 16 of these can be accessed as general registers R0 to R15 in one processing mode.
Section 2 Programming Model Note on Programming: As the user's R0 to R7 are assigned to R0_BANK0 to R7_BANK0, and after an exception or interrupt R0 to R7 are assigned to R0_BANK1 to R7_BANK1, it is not necessary for the interrupt handler to save and restore the user's R0 to R7 (R0_BANK0 to R7_BANK0).
Section 2 Programming Model 2.2.4 Control Registers Status Register (SR) BIt: Initial value: R/W: BIt: IMASK Initial value: R/W: Initial Bit Name Value Description — Reserved For details on reading/writing this bit, see General Precautions on Handling of Product. Processing Mode Selects the processing mode.
Page 112
Section 2 Programming Model Initial Bit Name Value Description 27 to 16 — All 0 Reserved For details on reading/writing this bit, see General Precautions on Handling of Product. FPU Disable Bit When this bit is set to 1 and an FPU instruction is not in a delay slot, a general FPU disable exception occurs.
Section 2 Programming Model Saved Status Register (SSR) (32 bits, Privileged Mode, Initial Value = Undefined) The contents of SR are saved to SSR in the event of an exception or interrupt. Saved Program Counter (SPC) (32 bits, Privileged Mode, Initial Value = Undefined) The address of an instruction at which an interrupt or exception occurs is saved to SPC.
Page 114
Section 2 Programming Model Floating-Point Status/Control Register (FPSCR) BIt: Cause Initial value: R/W: BIt: Cause Enable (EN) Flag Initial value: R/W: Initial Bit Name Value Description 31 to 22 — All 0 Reserved For details on reading/writing this bit, see General Precautions on Handling of Product.
Page 115
Section 2 Programming Model Initial Bit Name Value Description 17 to 12 Cause All 0 FPU Exception Cause Field FPU Exception Enable Field 11 to 7 Enable (EN) All 0 FPU Exception Flag Field 6 to 2 Flag All 0 Each time an FPU operation instruction is executed, the FPU exception cause field is cleared to 0.
Section 2 Programming Model Memory-Mapped Registers Some control registers are mapped to the following memory areas. Each of the mapped registers has two addresses. H'1C00 0000 to H'1FFF FFFF H'FC00 0000 to H'FFFF FFFF These two areas are used as follows. •...
Section 2 Programming Model Data Formats in Registers Register operands are always longwords (32 bits). 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. Figure 2.6 Formats of Byte Data and Word Data in Register Data Formats in Memory Memory data formats are classified into bytes, words, and longwords.
Section 2 Programming Model A + 1 A + 2 A + 3 A + 11 A + 10 A + 9 A + 8 Address A Address A + 8 Byte 0 Byte 1 Byte 2 Byte 3 Byte 3 Byte 2 Byte 1 Byte 0 0 15 Address A + 4...
Section 2 Programming Model From any state when reset/manual reset input Reset state Reset/manual reset clearance Reset/manual Reset/manual reset input reset input Sleep instruction execution Instruction execution state Power-down state Interrupt occurence Figure 2.8 Processing State Transitions Rev. 1.00 Oct. 01, 2007 Page 54 of 1956 REJ09B0256-0100...
Section 2 Programming Model Usage Note 2.7.1 Notes on Self-Modified Codes* This LSI prefetches instructions more drastically than conventional SH-4 to accelerate the processing speed. Therefore if the instruction in the memory is modified and it is executed immediately, then the pre-modified code that is prefetched are likely to be executed. In order to execute the modified code definitely, one of the following sequences should be executed between the execution of modifying codes and modified codes.
Page 122
Section 2 Programming Model Rev. 1.00 Oct. 01, 2007 Page 56 of 1956 REJ09B0256-0100...
Section 3 Instruction Set Section 3 Instruction Set This LSI's instruction set is implemented with 16-bit fixed-length instructions. This LSI can use byte (8-bit), word (16-bit), longword (32-bit), and quadword (64-bit) data sizes for memory access. Single-precision floating-point data (32 bits) can be moved to and from memory using longword or quadword size.
Page 124
Section 3 Instruction Set T Bit: The T bit in SR is used to show the result of a compare operation, and is referenced by a conditional branch instruction. An example of the use of a conditional branch instruction is shown below.
Section 3 Instruction Set Addressing Modes Addressing modes and effective address calculation methods are shown in table 3.2. When a location in virtual memory space is accessed (AT in MMUCR = 1), the effective address is translated into a physical memory address. If multiple virtual memory space systems are selected (SV in MMUCR = 0), the least significant bit of PTEH is also referenced as the access ASID.
Page 126
Section 3 Instruction Set Addressing Instruction Calculation Mode Format Effective Address Calculation Method Formula Register @–Rn Effective address is register Rn contents, Byte: Rn – 1 → Rn indirect decremented by a constant beforehand: with pre- 1 for a byte operand, 2 for a word operand, Word: decrement 4 for a longword operand, 8 for a quadword...
Page 127
Section 3 Instruction Set Addressing Instruction Calculation Mode Format Effective Address Calculation Method Formula GBR indirect @(disp:8, Effective address is register GBR contents with Byte: GBR + disp → EA with GBR) 8-bit displacement disp added. After disp is displacement zero-extended, it is multiplied by 1 (byte), 2 Word: GBR + (word), or 4 (longword), according to the operand...
Page 128
Section 3 Instruction Set Addressing Instruction Calculation Mode Format Effective Address Calculation Method Formula PC + 4 + disp × PC-relative disp:8 Effective address is PC + 4 with 8-bit 2 → Branch- displacement disp added after being sign-extended and multiplied by 2. Target PC + 4 + disp ×...
Page 129
Section 3 Instruction Set Addressing Instruction Calculation Mode Format Effective Address Calculation Method Formula Immediate #imm:8 8-bit immediate data imm of TST, AND, OR, or — XOR instruction is zero-extended. #imm:8 8-bit immediate data imm of MOV, ADD, or — CMP/EQ instruction is sign-extended.
Section 3 Instruction Set Instruction Set Table 3.3 shows the notation used in the SH instruction lists shown in tables 3.4 to 3.13. Table 3.3 Notation Used in Instruction List Item Format Description Instruction OP.Sz SRC, DEST Operation code mnemonic Size SRC: Source operand...
Page 131
Section 3 Instruction Set Item Format Description Privileged mode "Privileged" means the instruction can only be executed in privileged mode. T bit Value of T bit after —: No change instruction execution "New" means the instruction which is newly added in this LSI.
Page 132
Section 3 Instruction Set Table 3.4 Fixed-Point Transfer Instructions Instruction Operation Instruction Code Privileged T Bit New imm → sign extension → Rn #imm,Rn 1110nnnniiiiiiii — — — (disp × 2 + PC + 4) → sign 1001nnnndddddddd — — —...
Page 133
Rm:Rn middle 32 bits → Rn XTRCT Rm,Rn — — — 0010nnnnmmmm1101 The assembler of Renesas uses the value after scaling (×1, ×2, or ×4) as the Note: displacement (disp). Rev. 1.00 Oct. 01, 2007 Page 67 of 1956 REJ09B0256-0100...
Section 3 Instruction Set Table 3.8 Branch Instructions Instruction Operation Instruction Code Privileged T Bit When T = 0, disp × 2 + PC + label 10001011dddddddd — — — 4 → PC When T = 1, nop BF/S label Delayed branch;...
Section 4 Pipelining Section 4 Pipelining This LSI is a 2-ILP (instruction-level-parallelism) superscalar pipelining microprocessor. Instruction execution is pipelined, and two instructions can be executed in parallel. Pipelines Figure 4.1 shows the basic pipelines. Normally, a pipeline consists of seven stages: instruction fetch (I1/I2), decode and register read (ID), execution (E1/E2/E3), and write-back (WB).
Section 4 Pipelining Figure 4.2 shows the instruction execution patterns. Representations in figure 4.2 and their descriptions are listed in table 4.1. Table 4.1 Representations of Instruction Execution Patterns Representation Description CPU EX pipe is occupied CPU LS pipe is occupied (with memory access) CPU LS pipe is occupied (without memory access) Either CPU EX pipe or CPU LS pipe is occupied E1/S1...
Section 4 Pipelining 1 issue cycle + 0 to 2 branch cycles (1-1) BF, BF/S, BT, BT/S, BRA, BSR: In branch instructions that are categorized Note: E1/S1 E2/s2 E3/s3 as (1-1), the number of branch cycles may be reduced by prefetching. (I1) (I2) (ID)
Section 4 Pipelining Parallel-Executability Instructions are categorized into six groups according to the internal function blocks used, as shown in table 4.2. Table 4.3 shows the parallel-executability of pairs of instructions in terms of groups. For example, ADD in the EX group and BRA in the BR group can be executed in parallel. Table 4.2 Instruction Groups Instruction...
Page 158
Section 4 Pipelining The parallel execution of two instructions can be carried out under following conditions. 1. Both addr (preceding instruction) and addr+2 (following instruction) are specified within the minimum page size (1 Kbyte). 2. The execution of these two instructions is supported in table 4.3, Combination of Preceding and Following Instructions.
Section 4 Pipelining Table 4.3 Combination of Preceding and Following Instructions Preceding Instruction (addr) Following Instruction (addr+2) Note: The following table shows the parallel-executability of pairs of instructions in this LSI. It is different from table 4.3. Preceding Instruction (addr) FLSR FLSM Following...
Section 4 Pipelining Issue Rates and Execution Cycles Instruction execution cycles are summarized in table 4.4. Instruction Group in the table 4.4 corresponds to the category in the table 4.2. Penalty cycles due to a pipeline stall are not considered in the issue rates and execution cycles in this section. 1.
Section 5 Exception Handling Section 5 Exception Handling Summary of Exception Handling Exception handling processing is handled by a special routine which is executed by a reset, general exception handling, or interrupt. For example, if the executing instruction ends abnormally, appropriate action must be taken in order to return to the original program sequence, or report the abnormality before terminating the processing.
Section 5 Exception Handling 5.2.1 TRAPA Exception Register (TRA) The TRAPA exception register (TRA) consists of 8-bit immediate data (imm) for the TRAPA instruction. TRA is set automatically by hardware when a TRAPA instruction is executed. TRA can also be modified by software. Bit: Initial value: R/W:...
Section 5 Exception Handling 5.2.2 Exception Event Register (EXPEVT) The exception event register (EXPEVT) consists of a 12-bit exception code. The exception code set in EXPEVT is that for a reset or general exception event. The exception code is set automatically by hardware when an exception occurs.
Section 5 Exception Handling 5.2.3 Interrupt Event Register (INTEVT) The interrupt event register (INTEVT) consists of a 14-bit exception code. The exception code is set automatically by hardware when an exception occurs. INTEVT can also be modified by software. Bit: Initial value: R/W: Bit:...
Section 5 Exception Handling Exception Handling Functions 5.3.1 Exception Handling Flow In exception handling, the contents of the program counter (PC), status register (SR), and R15 are saved in the saved program counter (SPC), saved status register (SSR), and saved general register15 (SGR), and the CPU starts execution of the appropriate exception handling routine according to the vector address.
Section 5 Exception Handling Exception Flow 5.5.1 Exception Flow Figure 5.1 shows an outline flowchart of the basic operations in instruction execution and exception handling. For the sake of clarity, the following description assumes that instructions are executed sequentially, one by one. Figure 5.1 shows the relative priority order of the different kinds of exceptions (reset, general exception, and interrupt).
Section 5 Exception Handling 5.5.2 Exception Source Acceptance A priority ranking is provided for all exceptions for use in determining which of two or more simultaneously generated exceptions should be accepted. Five of the general exceptions—general illegal instruction exception, slot illegal instruction exception, general FPU disable exception, slot FPU disable exception, and unconditional trap exception—are detected in the process of instruction decoding, and do not occur simultaneously in the instruction pipeline.
Section 5 Exception Handling 5.5.3 Exception Requests and BL Bit When the BL bit in SR is 0, exceptions and interrupts are accepted. When the BL bit in SR is 1 and an exception other than a user break is generated, the CPU's internal registers and the registers of the other modules are set to their states following a manual reset, and the CPU branches to the same address as in a reset (H'A0000000).
Section 5 Exception Handling Description of Exceptions The various exception handling operations explained here are exception sources, transition address on the occurrence of exception, and processor operation when a transition is made. 5.6.1 Resets Power-On Reset • Condition: Power-on reset request •...
Page 183
Section 5 Exception Handling Instruction TLB Multiple-Hit Exception • Source: Multiple ITLB address matches • Transition address: H'A0000000 • Transition operations: The virtual address (32 bits) at which this exception occurred is set in TEA, and the corresponding virtual page number (22 bits) is set in PTEH [31:10]. ASID in PTEH indicates the ASID when this exception occurred.
Section 5 Exception Handling 5.6.2 General Exceptions Data TLB Miss Exception • Source: Address mismatch in UTLB address comparison • Transition address: VBR + H'00000400 • Transition operations: The virtual address (32 bits) at which this exception occurred is set in TEA, and the corresponding virtual page number (22 bits) is set in PTEH [31:10].
Page 185
Section 5 Exception Handling Instruction TLB Miss Exception • Source: Address mismatch in ITLB address comparison • Transition address: VBR + H'00000400 • Transition operations: The virtual address (32 bits) at which this exception occurred is set in TEA, and the corresponding virtual page number (22 bits) is set in PTEH [31:10].
Page 186
Section 5 Exception Handling Initial Page Write Exception • Source: TLB is hit in a store access, but dirty bit D = 0 • Transition address: VBR + H'00000100 • Transition operations: The virtual address (32 bits) at which this exception occurred is set in TEA, and the corresponding virtual page number (22 bits) is set in PTEH [31:10].
Page 187
Section 5 Exception Handling Data TLB Protection Violation Exception • Source: The access does not accord with the UTLB protection information (PR bits) shown below. Privileged Mode User Mode Only read access possible Access not possible Read/write access possible Access not possible Only read access possible Only read access possible Read/write access possible...
Page 188
Section 5 Exception Handling Instruction TLB Protection Violation Exception • Source: The access does not accord with the ITLB protection information (PR bits) shown below. Privileged Mode User Mode Access possible Access not possible Access possible Access possible • Transition address: VBR + H'00000100 •...
Page 189
Section 5 Exception Handling Data Address Error • Sources: Word data access from other than a word boundary (2n +1) Longword data access from other than a longword data boundary (4n +1, 4n + 2, or 4n +3) ...
Page 190
Section 5 Exception Handling Instruction Address Error • Sources: Instruction fetch from other than a word boundary (2n +1) Instruction fetch from area H'80000000 to H'FFFFFFFF in user mode Area H'E5000000 to H'E5FFFFFF can be accessed in user mode. For details, see section 8, L Memory.
Page 191
Section 5 Exception Handling Unconditional Trap • Source: Execution of TRAPA instruction • Transition address: VBR + H'00000100 • Transition operations: As this is a processing-completion-type exception, the PC contents for the instruction following the TRAPA instruction are saved in SPC. The value of SR and R15 when the TRAPA instruction is executed are saved in SSR and SGR.
Page 192
Section 5 Exception Handling General Illegal Instruction Exception • Sources: Decoding of an undefined instruction not in a delay slot Delayed branch instructions: JMP, JSR, BRA, BRAF, BSR, BSRF, RTS, RTE, BT/S, BF/S Undefined instruction: H'FFFD Decoding in user mode of a privileged instruction not in a delay slot Privileged instructions: LDC, STC, RTE, LDTLB, SLEEP, but excluding LDC/STC instructions that access GBR •...
Page 193
Section 5 Exception Handling (10) Slot Illegal Instruction Exception • Sources: Decoding of an undefined instruction in a delay slot Delayed branch instructions: JMP, JSR, BRA, BRAF, BSR, BSRF, RTS, RTE, BT/S, BF/S Undefined instruction: H'FFFD Decoding of an instruction that modifies PC in a delay slot Instructions that modify PC: JMP, JSR, BRA, BRAF, BSR, BSRF, RTS, RTE, BT, BF, BT/S, BF/S, TRAPA, LDC Rm,SR, LDC.L @Rm+,SR, ICBI, PREFI ...
Page 194
Section 5 Exception Handling (11) General FPU Disable Exception • Source: Decoding of an FPU instruction* not in a delay slot with SR.FD = 1 • Transition address: VBR + H'00000100 • Transition operations: The PC and SR contents for the instruction at which this exception occurred are saved in SPC and SSR.
Page 195
Section 5 Exception Handling (12) Slot FPU Disable Exception • Source: Decoding of an FPU instruction in a delay slot with SR.FD =1 • Transition address: VBR + H'00000100 • Transition operations: The PC contents for the preceding delayed branch instruction are saved in SPC. The SR and R15 contents when this exception occurred are saved in SSR and SGR.
Page 196
Section 5 Exception Handling (13) Pre-Execution User Break/Post-Execution User Break • Source: Fulfilling of a break condition set in the user break controller • Transition address: VBR + H'00000100, or DBR • Transition operations: In the case of a post-execution break, the PC contents for the instruction following the instruction at which the breakpoint is set are set in SPC.
Page 197
Section 5 Exception Handling (14) FPU Exception • Source: Exception due to execution of a floating-point operation • Transition address: VBR + H'00000100 • Transition operations: The PC and SR contents for the instruction at which this exception occurred are saved in SPC and SSR .
Section 5 Exception Handling 5.6.3 Interrupts NMI (Nonmaskable Interrupt) • Source: NMI pin edge detection • Transition address: VBR + H'00000600 • Transition operations: The PC and SR contents for the instruction immediately after this exception is accepted are saved in SPC and SSR. The R15 contents at this time are saved in SGR. Exception code H'1C0 is set in INTEVT.
Section 5 Exception Handling General Interrupt Request • Source: The interrupt mask level bits setting in SR is smaller than the interrupt level of interrupt request, and the BL bit in SR is 0 (accepted at instruction boundary). • Transition address: VBR + H'00000600 •...
Page 200
Section 5 Exception Handling With MAC instructions, memory-to-memory arithmetic/logic instructions, TAS instructions, and MOVUA instructions, two data transfers are performed by a single instruction, and an exception will be detected for each of these data transfers. In these cases, therefore, the following order is used to determine priority.
Section 5 Exception Handling Usage Notes Return from exception handling 1. Check the BL bit in SR with software. If SPC and SSR have been saved to memory, set the BL bit in SR to 1 before restoring them. 2. Issue an RTE instruction. When RTE is executed, the SPC contents are saved in PC, the SSR contents are saved in SR, and branch is made to the SPC address to return from the exception handling routine.
Page 202
Section 5 Exception Handling bit. The completion type exception is accepted before branching to the destination of RTE instruction. However, if the re-execution type exception is occurred, the operation cannot be guaranteed. 2. The user break is not accepted by the instruction in the delay slot of the RTE instruction. Changing the SR register value and accepting exception 1.
Section 6 Memory Management Unit (MMU) Section 6 Memory Management Unit (MMU) This LSI supports an 8-bit address space identifier, a 32-bit virtual address space, and a 29-bit physical address space. Address translation from virtual addresses to physical addresses is enabled by the memory management unit (MMU) in this LSI.
Page 204
Section 6 Memory Management Unit (MMU) When address translation from virtual memory to physical memory is performed using the MMU, it may happen that the translation information has not been recorded in the MMU, or the virtual memory of a different process is accessed by mistake. In such cases, the MMU will generate an exception, change the physical memory mapping, and record the new address translation information.
Section 6 Memory Management Unit (MMU) Virtual Memory Physical Process 1 Physical Memory Physical Process 1 Memory Memory Process 1 Virtual Physical Process 1 Process 1 Memory Memory Physical Memory Process 2 Process 2 Process 3 Process 3 Figure 6.1 Role of MMU Rev.
Section 6 Memory Management Unit (MMU) 6.1.1 Address Spaces Virtual Address Space: This LSI supports a 32-bit virtual address space, and can access a 4- Gbyte address space. The virtual address space is divided into a number of areas, as shown in figures 6.2 and 6.3.
Section 6 Memory Management Unit (MMU) Physical address space H'0000 0000 H'0000 0000 Area 0 Area 1 Area 2 Area 3 P0 area U0 area Cacheable Area 4 Cacheable Address translation possible Area 5 Address translation possible Area 6 Area 7 H'8000 0000 H'8000 0000 P1 area...
Page 208
Section 6 Memory Management Unit (MMU) • P0, P3, and U0 Areas: The P0, P3, and U0 areas allow address translation using the TLB and access using the cache. When the MMU is disabled, replacing the upper 3 bits of an address with 0s gives the corresponding physical address.
Section 6 Memory Management Unit (MMU) The area from H'F400 0000 to H'F4FF FFFF is used for direct access to the operand cache address array. For details, see section 7.6.3, OC Address Array. The area from H'F500 0000 to H'F5FF FFFF is used for direct access to the operand cache data array.
Page 211
Section 6 Memory Management Unit (MMU) Address Translation: When the MMU is used, the virtual address space is divided into units called pages, and translation to physical addresses is carried out in these page units. The address translation table in external memory contains the physical addresses corresponding to virtual addresses and additional information such as memory protection codes.
Section 6 Memory Management Unit (MMU) 6.2.1 Page Table Entry High Register (PTEH) PTEH consists of the virtual page number (VPN) and address space identifier (ASID). When an MMU exception or address error exception occurs, the VPN of the virtual address at which the exception occurred is set in the VPN bit by hardware.
Section 6 Memory Management Unit (MMU) 6.2.2 Page Table Entry Low Register (PTEL) PTEL is used to hold the physical page number and page management information to be recorded in the UTLB by means of the LDTLB instruction. The contents of this register are not changed unless a software directive is issued.
Section 6 Memory Management Unit (MMU) 6.2.3 Translation Table Base Register (TTB) TTB is used to store the base address of the currently used page table, and so on. The contents of TTB are not changed unless a software directive is issued. This register can be used freely by software.
Page 216
Section 6 Memory Management Unit (MMU) Note that the method 3 may not be guaranteed in the future SuperH Series. Therefore, it is recommended that the method 1 or 2 should be used for being compatible with the future SuperH Series.
Page 217
Section 6 Memory Management Unit (MMU) Initial Bit Name Value Description 25, 24 All 0 Reserved For details on reading from or writing to these bits, see description in General Precautions on Handling of Product. 23 to 18 All 0 UTLB Replace Boundary These bits indicate the UTLB entry boundary at which replacement is to be performed.
Section 6 Memory Management Unit (MMU) Initial Bit Name Value Description TLB Invalidate Bit Writing 1 to this bit invalidates (clears to 0) all valid UTLB/ITLB bits. This bit is always read as 0. Reserved For details on reading from or writing to this bit, see description in General Precautions on Handling of Product.
Section 6 Memory Management Unit (MMU) Initial Bit Name Value Description 7 to 0 All 0 Buffered Write Control for Each Area (64 Mbytes) When writing is performed without using the cache or in the cache write-through mode, these bits specify whether the next bus access from the CPU waits for the end of writing for each area.
Page 220
Section 6 Memory Management Unit (MMU) Bit: Initial value: R/W: Bit: Initial value: R/W: Initial Bit Name Value Description 31 to 5 All 0 Reserved For details on reading from or writing to these bits, see description in General Precautions on Handling of Product.
Page 221
Section 6 Memory Management Unit (MMU) Initial Bit Name Value Description Re-Fetch Inhibit after Writing Memory-Mapped IC This bit controls whether re-fetch is performed for the next instruction after writing memory-mapped IC while the ICE bit in CCR is set to 1. 0: Re-fetch is performed 1: Re-fetch is not performed Rev.
Section 6 Memory Management Unit (MMU) TLB Functions 6.3.1 Unified TLB (UTLB) Configuration The UTLB is used for the following two purposes: 1. To translate a virtual address to a physical address in a data access 2. As a table of address translation information to be recorded in the ITLB in the event of an ITLB miss The UTLB is so called because of its use for the above two purposes.
Page 223
Section 6 Memory Management Unit (MMU) • SH: Share status bit When 0, pages are not shared by processes. When 1, pages are shared by processes. • SZ[1:0]: Page size bits Specify the page size. 00: 1-Kbyte page 01: 4-Kbyte page 10: 64-Kbyte page 11: 1-Mbyte page •...
Section 6 Memory Management Unit (MMU) • C: Cacheability bit Indicates whether a page is cacheable. 0: Not cacheable 1: Cacheable When the control register area is mapped, this bit must be cleared to 0. • D: Dirty bit Indicates whether a write has been performed to a page. 0: Write has not been performed 1: Write has been performed •...
Section 6 Memory Management Unit (MMU) 6.3.2 Instruction TLB (ITLB) Configuration The ITLB is used to translate a virtual address to a physical address in an instruction access. Information in the address translation table located in the UTLB is cached into the ITLB. Figure 6.8 shows the ITLB configuration.
Section 6 Memory Management Unit (MMU) 6.3.3 Address Translation Method Figure 6.9 shows a flowchart of a memory access using the UTLB. Data access to virtual address (VA) VA is VA is VA is VA is in P0, U0, in P4 area in P2 area in P1 area or P3 area...
Section 6 Memory Management Unit (MMU) Figure 6.10 shows a flowchart of a memory access using the ITLB. Instruction access to virtual address (VA) VA is in P0, U0, VA is VA is VA is or P3 area in P1 area in P4 area in P2 area MMUCR.AT = 1...
Section 6 Memory Management Unit (MMU) MMU Functions 6.4.1 MMU Hardware Management This LSI supports the following MMU functions. 1. The MMU decodes the virtual address to be accessed by software, and performs address translation by controlling the UTLB/ITLB in accordance with the MMUCR settings. 2.
Section 6 Memory Management Unit (MMU) 6.4.3 MMU Instruction (LDTLB) A TLB load instruction (LDTLB) is provided for recording UTLB entries. When an LDTLB instruction is issued, this LSI copies the contents of PTEH and PTEL to the UTLB entry indicated by the URC bit in MMUCR.
Section 6 Memory Management Unit (MMU) 6.4.5 Avoiding Synonym Problems When 1- or 4-Kbyte pages are recorded in TLB entries, a synonym problem may arise. The problem is that, when a number of virtual addresses are mapped onto a single physical address, the same physical address data is recorded in a number of cache entries, and it becomes impossible to guarantee data integrity.
Section 6 Memory Management Unit (MMU) MMU Exceptions There are seven MMU exceptions: instruction TLB multiple hit exception, instruction TLB miss exception, instruction TLB protection violation exception, data TLB multiple hit exception, data TLB miss exception, data TLB protection violation exception, and initial page write exception. Refer to figures 6.9 and 6.10 for the conditions under which each of these exceptions occurs.
Section 6 Memory Management Unit (MMU) 6.5.2 Instruction TLB Miss Exception An instruction TLB miss exception occurs when address translation information for the virtual address to which an instruction access is made is not found in the UTLB entries by the hardware ITLB miss handling routine.
Section 6 Memory Management Unit (MMU) 6.5.3 Instruction TLB Protection Violation Exception An instruction TLB protection violation exception occurs when, even though an ITLB entry contains address translation information matching the virtual address to which an instruction access is made, the actual access type is not permitted by the access right specified by the PR bit. The instruction TLB protection violation exception processing carried out by hardware and software is shown below.
Section 6 Memory Management Unit (MMU) 6.5.4 Data TLB Multiple Hit Exception A data TLB multiple hit exception occurs when more than one UTLB entry matches the virtual address to which a data access has been made. When a data TLB multiple hit exception occurs, a reset is executed, and cache coherency is not guaranteed.
Section 6 Memory Management Unit (MMU) 9. Branches to the address obtained by adding offset H'0000 0400 to the contents of VBR, and starts the data TLB miss exception handling routine. Software Processing (Data TLB Miss Exception Handling Routine): Software is responsible for searching the external memory page table and assigning the necessary page table entry.
Section 6 Memory Management Unit (MMU) 8. Sets the RB bit in SR to 1. 9. Branches to the address obtained by adding offset H'0000 0100 to the contents of VBR, and starts the data TLB protection violation exception handling routine. Software Processing (Data TLB Protection Violation Exception Handling Routine): Resolve the data TLB protection violation, execute the exception handling return instruction (RTE), terminate the exception handling routine, and return control to the normal flow.
Section 6 Memory Management Unit (MMU) 3. Write to PTEL the values of the PPN, PR, SZ, C, D, WT, SH, and V bits in the page table entry recorded in external memory. 4. When the entry to be replaced in entry replacement is specified by software, write that value to the URC bits in MMUCR.
Section 6 Memory Management Unit (MMU) 6.6.1 ITLB Address Array The ITLB address array is allocated to addresses H'F200 0000 to H'F2FF FFFF in the P4 area. An address array access requires a 32-bit address field specification (when reading or writing) and a 32-bit data field specification (when writing).
Section 6 Memory Management Unit (MMU) 6.6.2 ITLB Data Array The ITLB data array is allocated to addresses H'F300 0000 to H'F37F FFFF in the P4 area. A data array access requires a 32-bit address field specification (when reading or writing) and a 32-bit data field specification (when writing).
Section 6 Memory Management Unit (MMU) 6.6.3 UTLB Address Array The UTLB address array is allocated to addresses H'F600 0000 to H'F60F FFFF in the P4 area. An address array access requires a 32-bit address field specification (when reading or writing) and a 32-bit data field specification (when writing).
Section 6 Memory Management Unit (MMU) 6.7.1 Overview of 32-Bit Address Extended Mode In 32-bit address extended mode, the privileged space mapping buffer (PMB) is introduced. The PMB maps virtual addresses in the P1 or P2 area which are not translated in 29-bit address mode to the 32-bit physical address space.
Section 6 Memory Management Unit (MMU) 6.7.3 Privileged Space Mapping Buffer (PMB) Configuration In 32-bit address extended mode, virtual addresses in the P1 or P2 area are translated according to the PMB mapping information. The PMB has 16 entries and configuration of each entry is as follows.
Page 246
Section 6 Memory Management Unit (MMU) • PPN: Physical page number Upper 8 bits of the physical address of the physical page number. With a 16-Mbyte page, PPN[31:24] are valid. With a 64-Mbyte page, PPN[31:26] are valid. With a 128-Mbyte page, PPN[31:27] are valid. With a 512-Mbyte page, PPN[31:29] are valid.
Section 6 Memory Management Unit (MMU) 6.7.4 PMB Function This LSI supports the following PMB functions. 1. Only memory-mapped write can be used for writing to the PMB. The LDTLB instruction cannot be used to write to the PMB. 2. Software must ensure that every accessed P1 or P2 address has a corresponding PMB entry before the access occurs.
Section 6 Memory Management Unit (MMU) 6.7.5 Memory-Mapped PMB Configuration To enable the PMB to be managed by software, its contents are allowed to be read from and written to by a P1 or P2 area program with a MOV instruction in privileged mode. The PMB address array is allocated to addresses H'F610 0000 to H'F61F FFFF in the P4 area and the PMB data array to addresses H'F710 0000 to H'F71F FFFF in the P4 area.
Section 6 Memory Management Unit (MMU) 12 11 Address field 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Data field VPN: Physical page number : Reserved bits (write value should be 0 Validity bit and read value is undefined )
Section 6 Memory Management Unit (MMU) 6.7.6 Notes on Using 32-Bit Address Extended Mode When using 32-bit address extended mode, note that the items described in this section are extended or changed as follows. PASCR: The SE bit is added in bit 31 in the control register (PASCR). The bits 6 to 0 of the UB in the PASCR are invalid (Note that the bit 7 of the UB is still valid).
Page 251
Section 6 Memory Management Unit (MMU) • UB: Buffered write bit Specifies whether a buffered write is performed. 0: Buffered write (Subsequent processing proceeds without waiting for the write to complete.) 1: Unbuffered write (Subsequent processing is stalled until the write has completed.) In a memory-mapped TLB access, the UB bit can be read from or written to by bit 9 in the data array.
Section 6 Memory Management Unit (MMU) Usage Notes When using an LDTLB instruction instead of software to a value to the MMUCR. URC, execute 1 or 2 below. 1. In 29-bit address mode, follow A. and B. below. In 32-bit address mode, follow A. through B. below.
Section 7 Caches Section 7 Caches This LSI has an on-chip 32-Kbyte instruction cache (IC) for instructions and an on-chip 32-Kbyte operand cache (OC) for data. Features The features of the cache are given in table 7.1. This LSI supports two 32-byte store queues (SQs) to perform high-speed writes to external memory.
Section 7 Caches The operand cache of this LSI uses the 4-way set-associative, each way comprising 256 cache lines. Figure 7.1 shows the configuration of the operand cache. The instruction cache is 4-way set-associative, each way is comprising 256 cache lines. Figure 7.2 shows the configuration of the instruction cache.
Section 7 Caches • Data array The data field holds 32 bytes (256 bits) of data per cache line. The data array is not initialized by a power-on or manual reset. • LRU In a 4-way set-associative method, up to 4 items of data can be registered in the cache at each entry address.
Section 7 Caches 7.2.1 Cache Control Register (CCR) CCR controls the cache operating mode, the cache write mode, and invalidation of all cache entries. CCR modifications must only be made by a program in the non-cacheable P2 area. After CCR has been updated, execute one of the following three methods before an access (including an instruction fetch) to the cacheable area is performed.
Page 258
Section 7 Caches Initial Bit Name Value Description 10, 9 All 0 Reserved For details on reading from or writing to these bits, see description in General Precautions on Handling of Product. IC Enable Bit Selects whether the IC is used. Note however when address translation is performed, the IC cannot be used unless the C bit in the page management information is also 1.
Section 7 Caches Initial Bit Name Value Description OC Enable Bit Selects whether the OC is used. Note however when address translation is performed, the OC cannot be used unless the C bit in the page management information is also 1. 0: OC not used 1: OC used 7.2.2...
Section 7 Caches 7.2.3 Queue Address Control Register 1 (QACR1) QACR1 specifies the area onto which store queue 1 (SQ1) is mapped when the MMU is disabled. Bit: Initial value: R/W: Bit: AREA1 Initial value: R/W: Initial Bit Name Value Description ...
Section 7 Caches 7.2.4 On-Chip Memory Control Register (RAMCR) RAMCR controls the number of ways in the IC and OC. RAMCR modifications must only be made by a program in the non-cacheable P2 area. After RAMCR has been updated, execute one of the following three methods before an access (including an instruction fetch) to the cacheable area or the L memory area is performed.
Page 262
Section 7 Caches Initial Bit Name Value Description On-Chip Memory Protection Enable Bit For details, see section 8.4, L Memory Protective Functions. IC2W IC Two-Way Mode bit 0: IC is a four-way operation 1: IC is a two-way operation For details, see section 7.4.3, IC Two-Way Mode. OC2W OC Two-Way Mode bit 0: OC is a four-way operation...
Section 7 Caches Operand Cache Operation 7.3.1 Read Operation When the Operand Cache (OC) is enabled (OCE = 1 in CCR) and data is read from a cacheable area, the cache operates as follows: 1. The tag, V bit, U bit, and LRU bits on each way are read from the cache line indexed by virtual address bits [12:5].
Section 7 Caches 5. Cache miss (with write-back) The tag and data field of the cache line on the way which is selected to replace are saved in the write-back buffer. Then data is read into the cache line on the way which is selected to replace from the physical address space corresponding to the virtual address.
Section 7 Caches 5. Cache miss (with write-back) The tag and data field of the cache line on the way which is selected to replace are saved in the write-back buffer. Then data is read into the cache line on the way which is selected to replace from the physical address space corresponding to the virtual address.
Page 266
Section 7 Caches 5. Cache miss (copy-back, no write-back) A data write in accordance with the access size is performed for the data of the data field on the hit way which is indexed by virtual address bits [4:0]. Then, the data, excluding the cache- missed data which is written already, is read into the cache line on the way which is selected to replace from the physical address space corresponding to the virtual address.
Section 7 Caches 7.3.4 Write-Back Buffer In order to give priority to data reads to the cache and improve performance, this LSI has a write- back buffer which holds the relevant cache entry when it becomes necessary to purge a dirty cache entry into external memory as the result of a cache miss.
Section 7 Caches Instruction Cache Operation 7.4.1 Read Operation When the IC is enabled (ICE = 1 in CCR) and instruction fetches are performed from a cacheable area, the instruction cache operates as follows: 1. The tag, V bit, U bit and LRU bits on each way are read from the cache line indexed by virtual address bits [12:5].
Section 7 Caches 7.4.2 Prefetch Operation When the IC is enabled (ICE = 1 in CCR) and instruction prefetches are performed from a cacheable area, the instruction cache operates as follows: 1. The tag, V bit, Ubit and LRU bits on each way are read from the cache line indexed by virtual address bits [12:5].
Section 7 Caches Cache Operation Instruction 7.5.1 Coherency between Cache and External Memory Coherency between cache and external memory should be assured by software. In this LSI, the following six instructions are supported for cache operations. Details of these instructions are given in the Programming Manual.
Section 7 Caches PURGE transaction: When the operand cache is enabled, the PURGE transaction checks the operand cache and invalidates the hit entry. If the invalidated entry is dirty, the data is written back to the external memory. If the transaction is not hit to the cache, it is no-operation. FLUSH transaction: When the operand cache is enabled, the FLUSH transaction checks the operand cache and if the hit line is dirty, then the data is written back to the external memory.
Section 7 Caches Memory-Mapped Cache Configuration To enable the IC and OC to be managed by software, the IC contents can be read from or written to by a program in the P2 area by means of a MOV instruction in privileged mode. Operation is not guaranteed if access is made from a program in another area.
Section 7 Caches In the data field, the tag is indicated by bits [31:10], and the V bit by bit [0]. As the IC address array tag is 19 bits in length, data field bits [31:29] are not used in the case of a write in which association is not performed.
Section 7 Caches 7.6.2 IC Data Array The IC data array is allocated to addresses H'F100 0000 to H'F1FF FFFF in the P4 area. A data array access requires a 32-bit address field specification (when reading or writing) and a 32-bit data field specification.
Section 7 Caches 7.6.3 OC Address Array The OC address array is allocated to addresses H'F400 0000 to H'F4FF FFFF in the P4 area. An address array access requires a 32-bit address field specification (when reading or writing) and a 32-bit data field specification.
Section 7 Caches 3. OC address array write (associative) When a write is performed with the A bit in the address field set to 1, the tag in each way stored in the entry specified in the address field is compared with the tag specified in the data field.
Section 7 Caches The data field is used for the longword data specification. The following two kinds of operation can be used on the OC data array: 1. OC data array read Longword data is read into the data field from the data specified by the longword specification bits in the address field in the OC entry corresponding to the way and entry set in the address field.
Section 7 Caches Store Queues This LSI supports two 32-byte store queues (SQs) to perform high-speed writes to external memory. 7.7.1 SQ Configuration There are two 32-byte store queues, SQ0 and SQ1, as shown in figure 7.9. These two store queues can be set independently.
Section 7 Caches 7.7.3 Transfer to External Memory Transfer from the SQs to external memory can be performed with a prefetch instruction (PREF). Issuing a PREF instruction for addresses H'E000 0000 to H'E3FF FFFC in the P4 area starts a transfer from the SQs to external memory.
Section 7 Caches Physical address bits [4:0] are always fixed at 0 since burst transfer starts at a 32-byte boundary. 7.7.4 Determination of SQ Access Exception Determination of an exception in a write to an SQ or transfer to external memory (PREF instruction) is performed as follows according to whether the MMU is enabled or disabled.
Section 7 Caches Notes on Using 32-Bit Address Extended Mode In 32-bit address extended mode, the items described in this section are extended as follows. 1. The tag bits [28:10] (19 bits) in the IC and OC are extended to bits [31:10] (22 bits). 2.
Section 8 L Memory Section 8 L Memory This LSI includes on-chip L-memory which stores instructions or data. Features • Capacity Total L memory capacity is 16 Kbytes. • Page The L memory is divided into two pages (pages 0 and 1). •...
Section 8 L Memory Register Descriptions The following registers are related to L memory. Table 8.2 Register Configuration Area 7 Name Abbreviation P4 Address* Address* Access Size On-chip memory control RAMCR H'FF000074 H'1F000074 register L memory transfer source LSA0 H'FF000050 H'1F000050 address register 0 L memory transfer source...
Section 8 L Memory Table 8.3 Register Status in Each Processing State Power-On Name Abbreviation Reset Manual Reset Sleep Standby On-chip memory control RAMCR H'00000000 H'00000000 Retained Retained register L memory transfer LSA0 Undefined Undefined Retained Retained source address register L memory transfer LSA1 Undefined...
Section 8 L Memory 8.2.1 On-Chip Memory Control Register (RAMCR) RAMCR controls the protective functions in the L memory. Bit : Initial value : R/W: Bit : IC2W OC2W Initial value : R/W: Initial Bit Name Value Description 31to10 — All 0 Reserved For read/write in these bits, refer to General...
Section 8 L Memory Initial Bit Name Value Description 5 to 0 — All 0 Reserved For read/write in these bits, refer to General Precautions on Handling of Product. 8.2.2 L Memory Transfer Source Address Register 0 (LSA0) When MMUCR.AT = 0 or RAMCR.RP = 0, the LSA0 specifies the transfer source physical address for block transfer to page 0 of the L memory.
Page 288
Section 8 L Memory Initial Bit Name Value Description 5 to 0 L0SSZ Undefined R/W L Memory Page 0 Block Transfer Source Address Select When MMUCR.AT = 0 or RAMCR.RP = 0, these bits select whether the operand addresses or L0SADR values are used as bits 15 to 10 of the transfer source physical address for block transfer to the L memory.
Section 8 L Memory 8.2.3 L Memory Transfer Source Address Register 1 (LSA1) When MMUCR.AT = 0 or RAMCR.RP = 0, the LSA1 specifies the transfer source physical address for block transfer to page 1 in the L memory. Bit : L1SADR Initial value : R/W:...
Page 290
Section 8 L Memory Initial Bit Name Value Description 5 to 0 L1SSZ Undefined R/W L Memory Page 1 Block Transfer Source Address Select When MMUCR.AT = 0 or RAMCR.RP = 0, these bits select whether the operand addresses or L1SADR values are used as bits 15 to 10 of the transfer source physical address for block transfer to page 1 in the L memory.
Section 8 L Memory 8.2.4 L Memory Transfer Destination Address Register 0 (LDA0) When MMUCR.AT = 0 or RAMCR.RP = 0, LDA0 specifies the transfer destination physical address for block transfer to page 0 of the L memory. Bit : L0DADR Initial value : R/W:...
Page 292
Section 8 L Memory Initial Bit Name Value Description 5 to 0 L0DSZ Undefined R/W L Memory Page 0 Block Transfer Destination Address Select When MMUCR.AT = 0 or RAMCR.RP = 0, these bits select whether the operand addresses or L0DADR values are used as bits 15 to 10 of the transfer destination physical address for block transfer to page 0 in the L memory.
Section 8 L Memory 8.2.5 L Memory Transfer Destination Address Register 1 (LDA1) When MMUCR.AT = 0 or RAMCR.RP = 0, LDA1 specifies the transfer destination physical address for block transfer to page 1 in the L memory. Bit : L0SADR Initial value : R/W:...
Page 294
Section 8 L Memory Initial Bit Name Value Description 5 to 0 L1DSZ Undefined R/W L Memory Page 1 Block Transfer Destination Address Select When MMUCR.AT = 0 or RAMCR.RP = 0, these bits select whether the operand addresses or L1DADR values are used as bits 15 to 10 of the transfer destination physical address for block transfer to page 1 in the L memory.
Section 8 L Memory Operation 8.3.1 Access from the CPU and FPU L memory access from the CPU and FPU is direct via the instruction bus and operand bus by means of the virtual address. As long as there is no conflict on the page, the L memory is accessed in one cycle.
Page 296
Section 8 L Memory of the OCBWB instruction) to the PPN field. The ASID, V, SZ, SH, PR, and D bits have the same meaning as normal address conversion; however, the C and WT bits have no meaning in this page. When the PREF instruction is issued to the L memory area, address conversion is performed in order to generate the physical address bits [28:10] in accordance with the SZ bit specification.
Section 8 L Memory When the OCBWB instruction is issued to the L memory area, the physical address bits [28:10] are generated in accordance with the LDA0 or LDA1 specification. The physical address bits [9:5] are generated from the virtual address. The physical address bits [4:0] are fixed to 0. Block transfer is performed from the L memory to the external memory specified by these physical addresses.
Section 8 L Memory Usage Notes 8.5.1 Page Conflict In the event of simultaneous access to the same page from different buses, page conflict occurs. Although each access is completed correctly, this kind of conflict tends to lower L memory accessibility.
Section 9 Interrupt Controller (INTC) Section 9 Interrupt Controller (INTC) The interrupt controller (INTC) determines the priority of interrupt sources and controls interrupt requests to the CPU (SH-4A). The INTC has a register that sets the priority of each interrupt and interrupt requests are processed according to the priority set in this register by the user.
Section 9 Interrupt Controller (INTC) 9.1.1 Interrupt Method The basic exception handling flow for the interrupt is as follows. In interrupt exception handling, the contents of the program counter (PC), status register (SR), and R15 are saved in the saved program counter (SPC), saved status register (SSR), and saved general register15 (SGR), and the CPU starts execution of the appropriate interrupt exception handling routine according to the vector address.
The external interrupts is the interrupt input from external pins, NMI, IRL, and IRQ. The IRQ and IRL are assigned to the same pin in the SH7763. The pin function is selected according to the system.
Page 303
Section 9 Interrupt Controller (INTC) Number of Sources Source Priority INTEVT Remarks (Max.) IRL[7:4] pin = H'9 External Inversion values of input H'320 High interrupts pin values (because of interrupt* IRL[3:0] pin = H'9 negative pins) IRL[7:4] pin = H'A H'340 For example IRL[7:4] pin = H'0 means...
Page 304
Section 9 Interrupt Controller (INTC) Number of Sources Source Priority INTEVT Remarks (Max.) LCDC Setting value of INT2PRI0 H'620 LCDCI On-chip to INT2PRI13 module DMAC 7(5/7) H'640 DMTE0 interrupts* H'660 DMTE1 H'680 DMTE2 H'6A0 DMTE3 H'6C0 DMAE SCIF0 H'700 ERI0 H'720 RXI0 H'740...
Page 305
Section 9 Interrupt Controller (INTC) Number of Sources Source Priority INTEVT Remarks (Max.) SCIF1 Setting value of INT2PRI0 H'B80 ERI1 On-chip to INT2PRI13 module H'BA0 RXI1 interrupts* H'BC0 BRI1 H'BE0 TXI1 SIOF0 H'C00 SIOFI0 SIOF1 H'C20 SIOFI1 SIOF2 H'C40 SIOFI2 USBH H'C60 USBHI...
Section 9 Interrupt Controller (INTC) Number of Sources Source Priority INTEVT Remarks (Max.) GPIO Setting value of INT2PRI0 H'F80 On-chip to INT2PRI13 module H'FA0 interrupts* H'FC0 H'FE0 Notes: 1. Since the IRL interrupt request by IRL[3:0] (IRQ3/IRL3 to IRQ0/IRL0 pins) and IRL interrupt request by IRL[7:4] (IRQ7/IRL7 to IRQ4/IRL4 pins) have the same INTEVT codes, it is impossible to distinguish the former from the latter.
Section 9 Interrupt Controller (INTC) 9.3.1 Interrupt Control Register 0 (ICR0) ICR0 is a 32-bit readable and partially writable register that sets the input signal detection mode of the external interrupt input pins (IRQ7/IRL7 to IRQ0/IRL0) and NMI pin, and indicates the input level to the NMI pin.
Page 313
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Description NMIB NMI Block Mode Selects whether an NMI interrupt is held until the BL bit in SR is cleared to 0 or detected immediately when the BL bit in SR of the CPU is set to 1. 0: An NMI interrupt is held when the BL bit in SR is set to 1 (initial value) 1: An NMI interrupt is not held when the BL bit in SR is...
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Description IRLM1 IRL Pin Mode 1 Selects whether IRQ7/IRL7 to IRQ4/IRL4 are used as the 4-bit encoded interrupt requests or as four independent interrupts. 0: IRQ7/IRL7 to IRQ4/IRL4 are used as the 4-bit level- encoded interrupt requests (IRL [7:4] interrupt;...
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Description 31, 30 IRQ0S IRQn Sense Select (n = 0 to 7) 29, 28 IRQ1S Selects whether interrupt signals to the IRQ7/IRL7 to IRQ0/IRL0 pins are detected at the rising edge, falling 27, 26 IRQ2S edge, high level, or low level.
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Description 31 to 28 IP0 Set priority of an independent interrupt request of IRQ0. 27 to 24 IP1 Set priority of an independent interrupt request of IRQ1. 23 to 20 IP2 Set priority of an independent interrupt request of IRQ2.
Section 9 Interrupt Controller (INTC) Description At Edge Detection At Level Detection Initial (IRQnS = 00 or 01, (IRQnS = 10 or 11, Bit Name Value n = 0 to 7) n = 0 to 7) [When reading] [When reading] 0: A corresponding IRQ 0: A corresponding IRQ interrupt request is not...
Section 9 Interrupt Controller (INTC) 9.3.6 Interrupt mask register 1 (INTMSK1) INTMSK1 is 32-bit readable and writable with conditions registers that control mask settings for each interrupt request. To clear the mask settings for interrupts, write 1 to the corresponding bits in INTMSKCLR1.
Section 9 Interrupt Controller (INTC) 9.3.7 Interrupt mask register 2 (INTMSK2) INTMSK2 is 32-bit readable and writable with conditions registers that control mask settings for each interrupt request. To clear the mask settings for interrupts, write 1 to the corresponding bits in INTMSKCLR2.
Page 321
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Description IM009 Sets masking of an [When reading] interrupt request when 0: Interrupts are accepted IRL [3:0] = LHHL (H'6). 1: Interrupts are masked IM008 Sets masking of an [When writing] interrupt request when IRL [3:0] = LHHH (H'7).
Page 322
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Description IM115 Sets masking of an [When reading] interrupt request when 0: Interrupts are accepted IRL [7:4] = LLLL (H'0). 1: Interrupts are masked IM114 Sets masking of an [When writing] interrupt request when IRL [7:4] = LLLH (H'1).
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Description IM103 Sets masking of an [When reading] interrupt request when 0: Interrupts are accepted IRL [7:4] = HHLL (H'C). 1: Interrupts are masked IM102 Sets masking of an [When writing] interrupt request when IRL [7:4] = HHLH (H'D).
Page 324
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Description IC00 Clears masking of an [When reading] independent interrupt An undefined value is request of IRQ0. read. IC01 Clears masking of an [When writing] independent interrupt 0: Invalid request of IRQ1. 1: Clears the IC02 Clears masking of an...
Section 9 Interrupt Controller (INTC) 9.3.10 Interrupt mask clear register 2 (INTMSKCLR2) INTMSKCLR2 is 32-bit write-only registers that clear the mask settings for IRL interrupt requests. An undefined value is read. Bit: − IC015 IC014 IC009 IC008 IC007 IC006 IC013 IC012 IC011 IC010...
Page 327
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Description IC007 Clears masking of an [When reading] interrupt request when An undefined value is IRL[3:0] = HLLL (H'8). read. IC006 Clears masking of an [When writing] interrupt request when IRL[3:0] = HLLH (H'9). 0: Invalid 1: Clears the IC005...
Page 328
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Description IC111 Clears masking of an [When reading] interrupt request when An undefined value is IRL[7:4] = LHLL (H'4). read. IC110 Clears masking of an [When writing] interrupt request when IRL[7:4] = LHLH (H'5). 0: Invalid 1: Clears the IC109...
Section 9 Interrupt Controller (INTC) 9.3.11 NMI Flag Control Register (NMIFCR) NMIFCR is a 32-bit readable and partially writable with conditions register that has an NMI flag (NMIFL bit) that can be read or cleared by software. The NMIFL bit is automatically set to 1 by hardware when an NMI interrupt is detected by the INTC.
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Description NMIFL NMI Interrupt Request Signal Detection Indicates whether an NMI interrupt request signal has been detected. This bit is automatically set to 1 when the INTC detects an NMI interrupt request. Write 0 to clear the bit.
Page 331
Section 9 Interrupt Controller (INTC) To prevent incorrect writing, this register can only be written to with bits 31 to 24 set to H'A5. Bit: − − − − − − − − − − − − − − − −...
Section 9 Interrupt Controller (INTC) UIMASK level are held disabled, and correct operation may not be performed (for example, the OS cannot switch tasks). An example of the usage procedure is shown below. 1. Classify interrupts to A and B as described below and set the A priority higher than the B priority.
Page 333
Section 9 Interrupt Controller (INTC) Table 9.5 shows the correspondence between interrupt request sources and bits in INT2PRI0 to INT2PRI13. Table 9.5 Interrupt Request Sources and INT2PRI0 to INT2PRI13 Register 28 to 24 20 to 16 12 to 8 4 to 0 INT2PRI0 TMU0 (TUNI0) TMU0 (TUNI1)
Section 9 Interrupt Controller (INTC) 9.3.14 Interrupt Source Register 0 (Mask State is not affected) (INT2A0) INT2A0 (mask state is not affected) is a 32-bit read-only register that indicates interrupt source modules. Even if interrupt masking is set in the interrupt mask register, INT2A0 indicates a source module in a corresponding bit (the corresponding interrupt is not generated).
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Function Description Indicates CMT interrupt source Indicates interrupt sources for each 11 to 9 — All 0 This bit is always read as 0. The peripheral module write value should always be 0. (INT2A0 is not DMAC Indicates DMAC interrupt source...
Page 336
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Function Description 31 to 26 — All 0 This bit is always read as 0. Indicates interrupt The write value should sources for each always be 0. peripheral module (INT2A01 is not affected SCIF2 Indicates SCIF2 interrupt by the state of the...
Page 337
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Function Description SIOF2 Indicates SIOF2 interrupt Indicates interrupt source sources for each peripheral module SIOF1 Indicates SIOF1 interrupt (INT2A01 is not affected source by the state of the LCDC Indicates LCDC interrupt interrupt mask register).
Section 9 Interrupt Controller (INTC) 9.3.16 Interrupt Source Register (Mask State is affected) (INT2A1) INT2A1 (mask state is affected) is a 32-bit read-only register that indicates interrupt source modules. Note that if interrupt masking is set in the interrupt mask register, INT2A1 does not indicate a source module in a corresponding bit.
Page 339
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Function Description PCIC3 Indicates PCIC3 interrupt source Indicates interrupt sources for each PCIC2 Indicates PCIC2 interrupt source peripheral module PCIC1 Indicates PCIC1 interrupt source (INT2A1 is affected by the state of the PCIC0 Indicates PCIC0 interrupt source interrupt mask...
Section 9 Interrupt Controller (INTC) 9.3.17 Interrupt Source Register 11 (Mask State is affected) (INT2A11) INT2A11 (mask state is affected) is a 32-bit read-only register that indicates interrupt source modules. Note that if interrupt masking is set in the interrupt mask register, INT2A11 does not indicate a source module in a corresponding bit.
Page 341
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Function Description USBH Indicates USBH interrupt Indicates interrupt source sources for each peripheral module GETHER Indicates GETHER interrupt (INT2A11 is affected source by the state of the Indicates PCC interrupt source interrupt mask register).
Section 9 Interrupt Controller (INTC) 9.3.18 Interrupt Mask Register (INT2MSKR) INT2MSKR is a 32-bit readable/writable register that sets masking for each source indicated in the interrupt source register. Interrupts whose corresponding bits in INT2MSKRG are set to 1 are not notified to the CPU. INT2MSKR is initialized to H'FFFF FFFF (mask state) by a reset.
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Function Description Masks HAC interrupts Masks interrupts for each peripheral Masks CMT interrupts module. 11 to 9 — All 1 These bits are always read as 1. [When writing] The write value should always be 0: Invalid 1: Interrupts are DMAC...
Page 344
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Function Description 31 to 26 — All 1 These bits are always read as 1. Masks interrupts for The write value should always each peripheral be 1. module. [When writing] SCIF2 Masks SCIF2 interrupts 0: Invalid USBF...
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Function Description SSI2 Masks SSI2 interrupts Masks interrupts for each peripheral SSI1 Masks SSI1 interrupts module. Masks SECURITY interrupts SECURITY* [When writing] 0: Invalid 1: Interrupts are masked [When reading] 0: No mask setting 1: Mask setting Note: This bit is reserved in the R5S77631.
Page 346
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Function Description 31 to 26 — All 0 These bits are always read as Clears interrupt 0. The write value should masking for each always be 0 peripheral module. [When writing] GPIO Clears GPIO interrupt masking...
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Function Description H-UDI Clears H-UDI interrupt Clears interrupt masking masking for each peripheral module. — This bit is always read as 0. [When writing] The write value should always be 0 0: Invalid Clears WDT interrupt masking 1: Interrupt mask is...
Page 348
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Function Description 31 to 26 — All 0 These bits are always read as Clears interrupt 0. The write value should masking for each always be 0 peripheral module. [When writing] SCIF2 Clears SCIF2 interrupt masking 0: Invalid...
Section 9 Interrupt Controller (INTC) Initial Bit Name Value Function Description SSI1 Clears SSI1 interrupt masking Clears interrupt masking for each peripheral Clears SECURITY interrupt SECURITY* module. masking [When writing] 0: Invalid 1: Interrupt mask is cleared [When reading] Always 0 Note: This bit is reserved in the R5S77631.
Page 350
Section 9 Interrupt Controller (INTC) INT2B0: Indicates detailed interrupt sources for the TMU. Module Source Function Description 31 to 7 — These bits are always read as 0. The Indicates TMU interrupt write value should always be 0. sources. This register indicates the TMU TUNI5 TMU channel 5 underflow interrupt...
Page 351
Section 9 Interrupt Controller (INTC) Module Source Function Description SCIF0 TXI0 SCIF channel 0 transmit FIFO data Indicates SCIF interrupt empty interrupt sources. This register indicates the SCIF BRI0 SCIF channel 0 break interrupt or interrupt sources even if overrun error interrupt mask setting is made in RXI0 SCIF channel 0 receive FIFO data full...
Page 352
Section 9 Interrupt Controller (INTC) INT2B4: Indicates detailed interrupt sources for the PCIC. Module Source Function Description PCIC 31 to 10 — These bits are always read as 0. The Indicates PCIC interrupt write value should always be 0. sources. This register indicates the PCIC PWD0 PCIC power state D0 state interrupt...
Page 353
Section 9 Interrupt Controller (INTC) INT2B6: Indicates detailed interrupt sources for the SCIF2. Module Source Function Description SCIF2 31 to 4 — These bits are always read as 0. The Indicates SCIF2 write value should always be 0. interrupt sources. This register indicates the TXI2 SCIF channel 2 transmit FIFO data...
Page 354
Section 9 Interrupt Controller (INTC) Module Source Function Description GPIO PINT6I GPIO interrupt from PINT6 pin Indicates GPIO interrupt sources. This register PINT5I GPIO interrupt from PINT5 pin indicates GPIO interrupt PINT4I GPIO interrupt from PINT4 pin sources even if mask setting is made in the 7 to 4 —...
Section 9 Interrupt Controller (INTC) INT2B11: Indicates detailed interrupt sources for the SIM. Module Source Function Description 31 to 4 — These bits are always read as 0. The Indicates SIM interrupt write value should always be 0. sources. This register indicates the SIM TEND Transmit end interrupt...
Page 356
Section 9 Interrupt Controller (INTC) Initial Bit Name Value R/W Function Description 31 to 28 — All 0 Reserved Enables a GPIO interrupt request for These bits are always read as 0. each pin. The write value should always be 0. 0: Disables an interrupt request PINT15E...
Page 357
Section 9 Interrupt Controller (INTC) Initial Bit Name Value R/W Function Description PINT7E R/W Enables a GPIO interrupt Enables a GPIO request from PINT7 pin interrupt request for each pin. PINT6E R/W Enables a GPIO interrupt 0: Disables an interrupt request from PINT6 pin request PINT5E...
Section 9 Interrupt Controller (INTC) Interrupt Sources There are four types of interrupt sources: NMI, IRQ, IRL, and on-chip modules. Each interrupt has a priority level (16 to 0), with level 16 as the highest and level 1 as the lowest. When level 0 is set, the interrupt is masked and interrupt requests are ignored.
(interrupt priority level 15), and all high level indicates no interrupt request (interrupt priority level 0). Figure 9.2 shows an example of IRL interrupt connection, and table 9.6 shows the correspondence between the IRL pins and interrupt levels. SH7763 Interrupt Priprity IRQ3/IRL3 to...
Section 9 Interrupt Controller (INTC) 9.4.4 On-chip Module Interrupts On-chip module interrupts are interrupts generated by on-chip modules. Not every interrupt source is assigned a different interrupt vector, but sources are reflected in the interrupt event register (INTEVT), so it is easy to identify sources by using the INTEVT value as a branch offset in the exception handling routine.
Section 9 Interrupt Controller (INTC) and determines the priorities of individual interrupt sources. The lowest one bit is then rounded off, the data is converted to 4-bit data, and the priority levels are notified. For example, two interrupt sources whose priority levels are set to H'1A and H'1B are both output as 4-bit priority level H'D.
Section 9 Interrupt Controller (INTC) The priority order of the on-chip modules is specified as desired by setting priority levels from 31 to 0 in INT2PRI0 to INT2PRI14. The priority order of the on-chip modules is set to 0 by a reset. When the priorities for multiple interrupt sources are set to the same level and such interrupts are generated simultaneously, they are handled according to the default priority order shown in table 9.7.
Section 9 Interrupt Controller (INTC) Operation 9.5.1 Interrupt Sequence The sequence of interrupt operations is described below. Figure 9.4 is the flowchart of the operations. 1. The interrupt request sources send interrupt request signals to the INTC. 2. The INTC selects the highest-priority interrupt from the interrupt requests sent, following the priority levels set in INTPRI and INT2PRI0 to INT2PRI14.
Section 9 Interrupt Controller (INTC) 9.5.2 Multiple Interrupts When handling multiple interrupts, an interrupt handling routine should include the following procedures: 1. To identify the interrupt source, branch to a specific interrupt handling routine for the interrupt source by using the INTEVT code as an offset. 2.
Section 9 Interrupt Controller (INTC) Interrupt Response Time Table 9.8 shows the interrupt response time, which is the interval from when an interrupt request occurs until the interrupt exception handling is started and the start instruction of the exception handling routine is fetched. Table 9.8 Interrupt Response Time Number of States...
Section 9 Interrupt Controller (INTC) Usage Notes 9.7.1 Example of Interrupt Handling Routine for Level-Encoded IRL and Level-Sensed If an interrupt request is accepted when level-sensed IRQ or level-encoded IRL interrupt request is selected, the held request must be cleared in the interrupt handling routine. Figure 9.5 shows an example of clearing the interrupt request held in the detection circuit.
Section 9 Interrupt Controller (INTC) INTMSK0/INTMSK1 and INTMSKCLR0/INTMSKCLR1 and reading from INTMSK0/INTMSK1 should be consecutively executed. 9.7.2 Notes on Setting IRQ7/IRL7 to IRQ0/IRL0 Pin Function When switching the IRQ7/IRL7 to IRQ0/IRL0 pin function, it is possible that the INTC may hold an interrupt by mistake.
Page 377
Section 9 Interrupt Controller (INTC) • To clear IRQ edge-detection interrupt requests To clear an IRQ edge-detection interrupt request from the IRQ7/IRL7 to IRQ0/IRL0 pins, write 0 after reading 1 in the corresponding IRn (n = 0 to 7) bit in INTREQ. The IRQ interrupt requests detected by the INTC is not cleared even if 1 is written to a corresponding bit in INTMSK0.
Section 10 SuperHyway Bus Bridge (SBR) Section 10 SuperHyway Bus Bridge (SBR) The SuperHyway bus bridge (SBR) performs access protocol conversion between the SuperHyway (Shwy) bus and the SuperHyway bridge bus. At the same time, it also arbitrates between the accesses to the SuperHyway bus by the three peripheral modules (SECURITY, GETHER, and USBH) connected to the SuperHyway bridge bus.
Section 10 SuperHyway Bus Bridge (SBR) 10.2 Register Descriptions Table 10.1 shows the SBR register configuration. Table 10.2 shows the register state in each operating mode. Table 10.1 Register Configuration Area P4 Area 7 Access Register Name Abbreviation R/W Address* Address* Size Bus arbitration priority level...
Section 10 SuperHyway Bus Bridge (SBR) 10.2.1 Bus Arbitration Priority Level Setting Register (SBRIVCLV) SBRIVCLV sets the priority levels used when SuperHyway bus access requests from the SECURITY, GETHER, and USBH coincide. Bit: — — — — — — — —...
Section 10 SuperHyway Bus Bridge (SBR) 10.2.2 SuperHyway Bus Priority Control Resister (PRPRICR) PRPRICR controls the SuperHyway bus access priority given to the CPU and the other function modules. Bit: − − − − − − − − − − −...
Section 10 SuperHyway Bus Bridge (SBR) 10.3 Operation 10.3.1 SuperHyway Bus Interface The SuperHyway bus bridge (SBR) performs access protocol conversion between the SuperHyway bus and the SuperHyway bridge bus. 10.3.2 Bus Arbitration The SBR performs arbitration for the access requests from the four ports of the three modules (SECURITY, GETHER, and USBH) connected to the SuperHyway bridge bus.
Page 384
Section 10 SuperHyway Bus Bridge (SBR) The priority level of access requests from SECURITY, GETHER1, GETHER0, and USBH can be set to level 2 or level 3 through the SBRIVCLV register. Note that, in the USBH module, round- robin arbitration is first performed between read and write requests, then inter-module arbitration is performed using the result.
Section 11 Local Bus State Controller (LBSC) Section 11 Local Bus State Controller (LBSC) The local bus state controller (LBSC) divides the external memory space and outputs control signals corresponding to the specifications of various types of memory and bus interfaces. The LBSC enables the connection of SRAM or ROM, etc., to this LSI.
Page 386
Section 11 Local Bus State Controller (LBSC) • MPX interface Address/data multiplexing Connectable areas: 0 to 2 and 4 to 6 Settable bus width: 32 bits • Byte control SRAM interface SRAM interface with byte control Connectable areas: 1 and 4 Settable bus widths: 32 and 16 bits •...
Section 11 Local Bus State Controller (LBSC) Figure 11.1 shows a block diagram of the LBSC. interface Wait CSnWCR control unit CS0 to CS2 Area CSnBCR CS4 to CS6 control CE2A, CE2B unit CE1A, CE1B A0 to A25 RD/FRAME Memory RDWR control WE3/IOWR...
Section 11 Local Bus State Controller (LBSC) 11.2 Input/Output Pins Table 11.1 shows the LBSC pin configuration. Table 11.1 Pin Configuration Pin Name Function Description A25 to A0 Address Bus Output Address output D31 to D0 Data Bus Data input/output Bus Cycle Start Output Signal that indicates the start of a bus cycle.
Page 389
Section 11 Local Bus State Controller (LBSC) Pin Name Function Description BREQ Bus Release Input Bus release request signal Request BACK Bus Request Output Bus release acknowledge signal Acknowledge CE2A* PCMCIA Card Output When setting PCMCIA, corresponds to PCMCIA CE2B* Select card select signal D15 to D8.
Section 11 Local Bus State Controller (LBSC) 2. Can be selectable the polarity (initial state is low active). For details, see section 14, Direct Memory Access Controller (DMAC). 11.3 Area Overview 11.3.1 Space Divisions The architecture of this LSI provides a 32-bit virtual address space. The virtual address space is divided into five areas according to the upper address value.
Section 11 Local Bus State Controller (LBSC) H'0000 0000 Area 0 (CS0) H'0000 0000 Area 1 (CS1) H'0400 0000 H'0800 0000 Area 2 (CS2) P0 and P0 and U0 areas H'0C00 0000 Area 3 U0 areas H'1000 0000 Area 4 (CS4) H'1400 0000 Area 5 (CS5) H'8000 0000...
Page 392
Section 11 Local Bus State Controller (LBSC) External Specifiable Area addresses Size Connectable Memory Bus Width Access Size* H'0800 0000 to 64 Mbytes SRAM 8, 16, 32* 8/16/32 bits H'0BFF FFFF and 32 bytes Burst ROM 8, 16, 32* (DDR-SDRAM* H'0C00 0000 to 64 Mbytes (DDR-SDRAM)
Section 11 Local Bus State Controller (LBSC) Area 0: H'00000000 SRAM/burst ROM/MPX Area 0: H'04000000 SRAM/burst ROM/MPX/byte control SRAM Area 0: H'08000000 SRAM/burst ROM/MPX/DDR-SDRAM Area 0: H'0C000000 DDR-SDRAM Area 0: H'10000000 SRAM/burst ROM/MPX/byte control SRAM/ DDR-SDRAM/PCI Area 0: H'14000000 SRAM/burst ROM/MPX/PCMCIA /DDR-SDRAM The PCMCIA interface is for memory and I/O card use.
Section 11 Local Bus State Controller (LBSC) 11.3.2 Memory Bus Width The memory bus width of the LBSC can be set independently for each area. For area 0, a bus width of 8, 16, or 32 bits is set according to the external pin settings at a power-on reset by the PRESET pin.
Section 11 Local Bus State Controller (LBSC) 11.3.3 Data Alignment This LSI supports big endian and little endian as data alignment. Data alignment is determined by the level of the external pin (MD5) at a power-on reset. Table 11.4 Correspondence between External Pin (MD5) and Endian Data Alignment Big endian High...
Section 11 Local Bus State Controller (LBSC) Table 11.6 PCMCIA Support Interface IC Memory Card Interface I/O Card Interface Signal Signal Corresponding Name* I/O* Function Name* I/O* Function Pin of this LSI Ground Ground Data Data Data Data Data Data Data Data...
Page 397
Section 11 Local Bus State Controller (LBSC) IC Memory Card Interface I/O Card Interface Signal Signal Corresponding Name* I/O* Function Name* I/O* Function Pin of this LSI Data Data Data Data Data Data IOIS16 IOIS16 Write protect 16-bit I/O port ...
Page 398
Section 11 Local Bus State Controller (LBSC) IC Memory Card Interface I/O Card Interface Signal Signal Corresponding Name* I/O* Function Name* I/O* Function Pin of this LSI INPACK Input acknowledge RSRVD Reserved Attribute Attribute memory memory space space select select SPKR BVD2...
Section 11 Local Bus State Controller (LBSC) 11.4 Register Descriptions The LBSC has 16 registers as shown in table 11.7 and 11.8. The following registers control memory interfaces, wait cycles, etc. Table 11.7 Register Configuration Area 7 Access Register Name Abbrev.
Section 11 Local Bus State Controller (LBSC) Power-On Manual Register Name Abbreviation Reset Reset Sleep Standby CS2 Bus Control Register CS2BCR H'7777 7770 H'7777 7770 Retained Retained CS4 Bus Control Register CS4BCR H'7777 7770 H'7777 7770 Retained Retained CS5 Bus Control Register CS5BCR H'7777 7770 H'7777 7770...
Page 401
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description 31 to 16 All 0 Reserved Set these bits to H'A5A5 only when writing to AREASEL bits in this register. These bits are always read as 0. ...
Section 11 Local Bus State Controller (LBSC) Example: ----------------------------------------------------------------------- MOV.L #H'FE600020, R0 MOV.L #MMSELR_DATA, R1 ; MMSELR_DATA=Writing value of MMSELR SYNCO (upper word=H'A5A5) MOV.L R1, @R0 ; Writing to MMSELR MOV.L @R0, R2 MOV.L @R0, R2 SYNCO ----------------------------------------------------------------------- Modify executing instruction of MMSELR should allocate non-cacheable P2 area and the address that should not be affected by address map change.
Page 403
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description ENDIAN Undefined R Endian Flag The value of the external pin (MD5) designating the endian mode is sampled at a power-on reset by the PRESET pin. This bit determines the endian mode of all spaces.
Page 404
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description OPUP Control Output Pin Pull-Up Resistor Control Specifies the pull-up resistor state (A25 to A0, BS, CS0 to CS2, CS4, CS5/CE1A, CS6/CE1B, RD, WEn, RDWR, CE2A, and CE2B) when the control output pins are high-impedance.
Page 405
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description DMABST DMAC Burst Mode Transfer Priority Setting Specifies the priority of burst mode transfers by the DMAC. When this bit is cleared to 0, the priority is as follows: bus release, DMAC, CPU.
Section 11 Local Bus State Controller (LBSC) 11.4.3 CSn Bus Control Register (CSnBCR) CSnBCR is a 32-bit readable/writable register that specifies the bus width for area n (n = 0 to 2 and 4 to 6), numbers of wait, setup, and hold cycles to be inserted, burst length, and memory types.
Page 407
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description Reserved This bit is always read as 0. The write value should always be 0. 30 to 28 IWW Idle Cycles between Write-Read/Write-Write Specify the number of idle cycles to be inserted after an access to a memory connected to the space is completed.
Page 408
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description Reserved This bit is always read as 0. The write value should always be 0. 22 to 20 IWRWS Idle Cycles between Read-Write to Same Space Specify the number of idle cycles to be inserted after an access to a memory connected to the space is completed.
Page 409
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description Reserved This bit is always read as 0. The write value should always be 0. 14 to 12 IWRRS Idle Cycles between Read-Read to Same Space Specify the number of idle cycles to be inserted after an access to a memory connected to the space is completed.
Page 410
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description 9, 8 R/W* Bus Width Specify the bus width. In CS0BCR, the external pins (MD3 and MD4) are sampled at a power-on reset. Set to 11 for the MPX interface, and set to 10 or 11 for the byte control SRAM interface.
Page 411
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description R/W* MPX Interface Setting Selects the type of MPX interface 0: SRAM/byte-control SRAM interface selected 1: MPX interface selected Note: * The MPX bit in CS0BCR is read-only. 2 to 0 TYPE Memory Type Setting...
Section 11 Local Bus State Controller (LBSC) 11.4.4 CSn Wait Control Register (CSnWCR) The CSn wait control register (CSnWCR) is a 32-bit readable/writable register that specifies the number of wait cycles to be inserted, the pitch of data access for burst memory accesses, and the number of cycles to be inserted for the address setup time to the read/write strobe assertion or for the data hold time from the write strobe negation.
Page 413
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description Reserved This bit is always read as 0. The write value should always be 0. 26 to 24 ADH Address Hold Cycle Specify the number of cycles to be inserted to ensure the address hold time to the CSn negation.
Page 414
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description Reserved This bit is always read as 0. The write value should always be 0. RD Hold Cycle (RD Negate–CSn Negate Delay Cycle) 18 to 16 RDH Specify the number of cycles to be inserted to ensure the RD hold time to the T2.
Page 415
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description Reserved This bit is always read as 0. The write value should always be 0. WEn Hold Cycle (WEn Negate–CSn Negate Delay 10 to 8 Cycle) Specify the number of cycles to be inserted to ensure the WEn hold time to the T2.
Page 416
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description 3 to 0 IW[3:0] 1111 Insert Wait Cycle Specify the number of wait cycles to be inserted. (Available only when the SRAM interface, byte control SRAM interface, or burst ROM interface is selected.) 0000: No cycle inserted 0001: 1 cycle inserted 0010: 2 cycles inserted...
Section 11 Local Bus State Controller (LBSC) 11.4.5 CSn PCMCIA Control Register (CSnPCR) CSnPCR is a 32-bit readable/writable register that specifies the timing for the PCMCIA interface connected to area n (n = 5 and 6), the space property, and the assert/negate timing for the OE and WE signals.
Page 418
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description 26 to 24 SAB Space Property B Specify the space property of PCMCIA connected to second half of area 5 or 6. 000: ATA complement mode 001: Dynamic I/O bus sizing 010: 8-bit I/O space 011: 16-bit I/O space 100: 8-bit common memory...
Page 419
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description 19 to 16 PCIW 0000 PCMCIA Insert Wait Cycle B Specify the number of wait cycles to be inserted. These bits are valid, when the access area of PCMCIA interface is second half of area 5 or 6, 0000: No cycle inserted 0001: 1 cycle inserted...
Page 420
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description OE/WE Assert Delay A 14 to 12 TEDA These bits set the delay time from address output to OE/WE assertion for the access of first half area of PCMCIA interface.
Page 421
Section 11 Local Bus State Controller (LBSC) Initial Bit Name Value Description OE/WE Negate-Address Delay A 6 to 4 TEHA These bits set the delay time from OE/WE negation to address hold for the access of first half area of PCMCIA interface.
Section 11 Local Bus State Controller (LBSC) 11.5 Operation 11.5.1 Endian/Access Size and Data Alignment This LSI supports both big-endian mode, in which the upper byte (MSByte) in a string of byte data is at address 0, and little-endian mode, in which the lower byte (LSByte) in a string of byte data is at address 0.
Section 11 Local Bus State Controller (LBSC) Table 11.9 32-Bit External Device/Big-Endian Access and Data Alignment Operation Data Bus Strobe Signals Access D31 to D23 to D15 to D7 to Size Address No. Byte Data Assert 7 to 0 ...
Section 11 Local Bus State Controller (LBSC) Table 11.11 8-Bit External Device/Big-Endian Access and Data Alignment Operation Data Bus Strobe Signals Access D31 to D23 to D15 to D7 to Size Address No. Byte Data Assert 7 to 0 ...
Section 11 Local Bus State Controller (LBSC) Table 11.12 32-Bit External Device/Little-Endian Access and Data Alignment Operation Data Bus Strobe Signals Access D31 to D23 to D15 to D7 to Size Address No. Byte Data Assert 7 to 0 ...
Section 11 Local Bus State Controller (LBSC) Table 11.14 8-Bit External Device/Little-Endian Access and Data Alignment Operation Data Bus Strobe Signals Access D31 to D23 to D15 to D7 to Size Address No. Byte Data Assert 7 to 0 ...
Section 11 Local Bus State Controller (LBSC) 11.5.2 Areas Area 0 For area 0, external address bits A28 to A26 are 000. The interfaces that can be set for this area are the SRAM, MPX, and burst ROM interfaces. A bus width of 8, 16, or 32 bits is selectable with external pins MD4 and MD3 at a power-on reset. For details, see section 11.3.2, Memory Bus Width.
Page 428
Section 11 Local Bus State Controller (LBSC) As regards the number of bus cycles, 0 to 25 wait cycles inserted by CS1WCR can be selected. When the burst ROM interface is used, a burst pitch number in the range of 0 to 7 is selectable with bits BW[2:0] in CS1BCR.
Page 429
Section 11 Local Bus State Controller (LBSC) For details, see section 12, DDR-SDRAM Interface (DDRIF). Area 4 For area 4, physical address bits A28 to A26 are 100. The interfaces that can be set for this area are the SRAM, MPX, burst ROM, byte control SRAM, DDR-SDRAM and PCI interfaces.
Page 430
Section 11 Local Bus State Controller (LBSC) While the PCMCIA interface is used, the CE1A/CS5 and CE2A signals, the RD signal, (which can be used as OE), the WE0, WE1, WE2, and WE3 signals, (which can be used as, PCC_REG, WE, IORD, and IOWR, respectively) are asserted.
Section 11 Local Bus State Controller (LBSC) Any number of wait cycles can be inserted in each bus cycle through the external wait pin (RDY). (When the insert number is 0, the RDY signal is ignored.) The setup time and hold time (cycle number) of the address and CS6 signals to the read and write strobe signals can be set within a range of 0 to 7 cycles by CS6WCR.
Section 11 Local Bus State Controller (LBSC) CLKOUT A25 to A0 RDWR D31 to D0 (read) D31 to D0 (Write) DACKn (DA) DA: Dual address DMA Figure 11.4 Basic Timing of SRAM Interface Rev. 1.00 Oct. 01, 2007 Page 366 of 1956 REJ09B0256-0100...
Section 11 Local Bus State Controller (LBSC) Figures 11.5 to 11.7 show examples of the connection to SRAM with data width of 32, 16, and 8 bits. 128 K × 8-bit This LSI SRAM I/O7 I/O0 I/O7 I/O0 I/O7 I/O0 I/O7 I/O0 Figure 11.5 Example of 32-Bit Data-Width SRAM Connection...
Section 11 Local Bus State Controller (LBSC) 128 K × 8-bit This LSI SRAM I/O7 I/O0 I/O7 I/O0 Figure 11.6 Example of 16-Bit Data-Width SRAM Connection 128K × 8-bit This LSI SRAM I/O7 I/O0 Figure 11.7 Example of 8-Bit Data-Width SRAM Connection Rev.
Section 11 Local Bus State Controller (LBSC) Wait Cycle Control Wait cycle insertion for the SRAM interface can be controlled by CSnWCR. If the IW bits for each area in CSnWCR is not 0, a software wait is inserted in accordance with the wait-control bits. For details, see section 11.4.4, CSn Wait Control Register (CSnWCR).
Section 11 Local Bus State Controller (LBSC) When software wait insertion is specified by CSnWCR, the external wait input signal (RDY) is also sampled. The RDY signal sampling timing is shown in figure 11.9, where a single wait cycle is specified as a software wait. The RDY signal is sampled at the transition from the Tw state to the T2 state.
Page 437
Section 11 Local Bus State Controller (LBSC) Read-Strobe Negate Timing When the SRAM interface is used, the negation timing of the strobe signal during a read operation can be specified through the RDH bit in CSnWCR. Rev. 1.00 Oct. 01, 2007 Page 371 of 1956 REJ09B0256-0100...
Section 11 Local Bus State Controller (LBSC) 11.5.4 Burst ROM Interface Setting the TYPE bit in CSnBCR(n=0 to 2 and 4 to 6) to 010 allows a burst ROM to be connected to areas 0 to 2 and 4 to 6. The burst ROM interface provides high-speed access to ROM that has a burst access function.
Section 11 Local Bus State Controller (LBSC) CLKOUT A25 to A5 A4 to A0 RDWR D31 to D0 (read) Figure 11.11 Burst ROM Basic Access Timing CLKOUT A25 to A5 A4 to A0 RDWR D31 to D0 (read) Figure 11.12 Burst ROM Wait Access Timing Rev.
Section 11 Local Bus State Controller (LBSC) CLKOUT A25 to A5 A4 to A0 RDWR D31 to D0 (read) DACK Note: * When CSnBCR RDSPL is set to 1. Figure 11.13 Burst ROM Wait Access Timing 11.5.5 PCMCIA Interface Areas 5 and 6 can be set to the IC memory card interface or I/O card interface, which is stipulated in JEIDA specification version 4.2 (PCMCIA 2.1), by setting bits TYPE[2:0] in CS5BCR and CS6BCR.
Page 442
Section 11 Local Bus State Controller (LBSC) When the first half area is accessed, bits IW[3:0] in CSnWCR (n=5 or 6) and bits PCWA[1:0], TEDA[2:0], and TEHA[2:0] in CSnPCR (n=5 or 6) are selected. When the second half area is accessed, bits IW[3:0] in CSnWCR (n=5 or 6) and bits PCWB[1:0], TEDB[2:0], and TEHB[2:0] in CSnPCR (n=5 or 6) are selected.
Section 11 Local Bus State Controller (LBSC) Specify the number of wait cycles between accesses to be 0 for the DACK assertion area, when setting the size of DMA transfer is 16-byte. After the DMA burst transfer has finished, that DACKBST was enabled, set the DACKBST bit to 1 again before starting the next DMA transfer.
Section 11 Local Bus State Controller (LBSC) Table 11.15 Relationship between Address and CE When Using PCMCIA Interface Access Read/ Size Odd/ IOIS16 Bus (Bits) Write (bits)* Even Access D15 to D8 D7 to D0 × Read Even Invalid Read data ×...
Page 445
Section 11 Local Bus State Controller (LBSC) Access Read/ Size Odd/ IOIS16 Bus (Bits) Write (bits)* Even Access D15 to D8 D7 to D0 Dynamic Write Even Invalid Write data Bus Sizing* First Invalid Write data Second Invalid Write data Even First Upper write data Lower write data...
Section 11 Local Bus State Controller (LBSC) A25 to A0 A25∼A0 A25 to A0 D15 to D0 RDWR D7 to D0 CE1B/(CS6) D15 to D0 D15∼D0 CE1A/(CS5) CE2B CE2A D15 to D8 PC card PCカード (memory I/O) (メモリ/IO) This LSI WE/PGM IORD) IORD...
Section 11 Local Bus State Controller (LBSC) Memory Card Interface Basic Timing Figure 11.16 shows the basic timing for the PCMCIA memory card interface, and figure 11.17 shows the wait timing for the PCMCIA memory card interface. pcm1 pcm2 CLKOUT A25 to A0 CExx PCC_REG...
Section 11 Local Bus State Controller (LBSC) I/O Card Interface Timing Figures 11.18 and 11.19 show the timing for the PCMCIA I/O card interface. When accessing a PCMCIA card via the I/O card interface, it is possible to perform dynamic sizing of the I/O bus width using the IOIS16 pin.
Section 11 Local Bus State Controller (LBSC) 11.5.6 MPX Interface When both the MODE4 and MODE3 pins are set to 0 at a power-on reset by the PRESET pin, the MPX interface is selected for area 0. The MPX interface is selected for areas 1, 2, and 4 to 6 by the MPX bit in CS1BCR, CS2BCR, and CS4BCR to CS6BCR.
Section 11 Local Bus State Controller (LBSC) This LSI MPX device CLKOUT FRAME RDWR D31 to D0 I/O31 to I/O0 Figure 11.21 Example of 32-Bit Data Width MPX Connection The MPX interface timing is shown below. When the MPX interface is used for areas 1, 2, and 4 to 6, a bus size of 32 bits should be specified by CSnBCR.
Section 11 Local Bus State Controller (LBSC) 11.5.7 Byte Control SRAM Interface The byte control SRAM interface is a memory interface that outputs a byte-select strobe (WEn) in both read and write bus cycles. This interface has 16-bit data pins and can be connected to SRAM having an upper byte select strobe and lower select strobe functions, such as UB and LB.
Section 11 Local Bus State Controller (LBSC) 11.5.8 Wait Cycles between Accesses A problem associated with higher operating frequencies for external memory buses is that the data buffer turn-off after completion of a read from a low-speed device may be too slow, causing a collision with the data in the next access, and resulting in lower reliability or malfunctions.
Section 11 Local Bus State Controller (LBSC) wait wait CLKOUT A25 to A0 RDWR D31 to D0 Area m space read Area n space read Area n space Write Area m inter-access wait specificaton Area n inter-access wait specification Figure 11.38 Wait Cycles between Access Cycles Rev.
Section 11 Local Bus State Controller (LBSC) 11.5.9 Bus Arbitration This LSI is provided with a bus arbitration function that grants the bus to an external device when it makes a bus request. This bus arbitration supports master mode. In master mode the bus is held on a constant basis, and is released to another device in response to a bus request.
Section 11 Local Bus State Controller (LBSC) CLKOUT BREQ Asserted for Negated least 2 cycles within 2 cycles BACK A25 to A0 RDWR D31 to D0 (Write) Master access Slave access Master access (a) Master mode device access CLKOUT Must be asserted for Must be negated at least 2 cycles within 2 cycles...
Section 11 Local Bus State Controller (LBSC) 11.5.10 Master Mode The master mode processor holds the bus itself unless it receives a bus request. On receiving an assertion (low level) of the bus request signal (BREQ) from off-chip, the master mode processor releases the bus and asserts (drives low) the bus use permission signal (BACK) as soon as the currently executing bus cycle ends.
Section 11 Local Bus State Controller (LBSC) 11.5.11 Cooperation between Master and Slave To enable system resources to be controlled in a harmonious fashion by master and slave, their respective roles must be clearly defined. When designing an application system that includes this LSI, all control, including initialization, and low power consumption control, are supposed to be carried out by this LSI.
Section 12 DDR-SDRAM Interface (DDRIF) Section 12 DDR-SDRAM Interface (DDRIF) The memory controller is a module that arbitrates accesses from the CPU and modules and outputs control signals for the DDR-SDRAM. This module allows direct connection with the DDR- SDRAM. This module is provided with two interface modules (SHIF: SuperHyway bus interface and LCDIF: LCD interface) and one DDR-SDRAM controller (DDRC), and an arbiter (ARBT) that arbitrates accesses from interface modules to the DDRC.
Section 12 DDR-SDRAM Interface (DDRIF) 12.2 Input/Output Pins Table 12.1 shows the DDRIF pin configuration. For details on connection with the DDR-SDRAM, see the LSI pin information section. Note that clock-related signals will be determined later. Table 12.1 Pin Configuration Pin Name Function Description...
Section 12 DDR-SDRAM Interface (DDRIF) 12.3 Data Conversion 12.3.1 Data Alignment Data Alignment in DDR-SDRAM: The DDRIF supports both big endian mode where an address of the upper byte is 0 and little endian mode where an address of the lower byte is 0. These modes can be switched by using external pins at a power-on reset.
Section 12 DDR-SDRAM Interface (DDRIF) Table 12.3 Access and Data Alignment in Big Endian Mode (External Bus Width is 32 Bits) M_D31 to M_D24 M_D23 to M_D16 M_D15 to M_D8 M_D7 to M_D0 Byte access at address 0 Data 7 to 0 Byte access at address 1 Data 7 to 0 Byte access at address 2...
Section 12 DDR-SDRAM Interface (DDRIF) 12.3.2 Data Alignment in Peripheral Modules The endian mode in the DDRIF matches that in the CPU, and both big endian and little endian are available. Bit 31 Bit 0 Example of memory address A[3:0] = (0000) DDR-SDRAM (Address A + 0) Other than the above, the DDRC wraps around the data...
Section 12 DDR-SDRAM Interface (DDRIF) 12.4 Register Descriptions Table 12.4 shows the DDRIF registers. These registers should be set when access is not made to the DDR-SDRAM from peripheral modules. When the access is not made and the DCE bit (DDR-SDRAM control enable) in the memory interface mode register is cleared to 0 or the SELFS bit (self-refresh status) in that register is set to 1, set other registers.
Section 12 DDR-SDRAM Interface (DDRIF) 12.4.1 Memory Interface Mode Register (MIM) Bit: Initial value: R/W: Bit: BOMODE MODE Initial value: R/W: Bit: DRI[12:0] Initial value: R/W: Bit: LOCK DLLEN Initial value: R/W: Note: * Depends on the setting of external pins (MD5). Initial Bit Name Value...
Page 484
Section 12 DDR-SDRAM Interface (DDRIF) Initial Bit Name Value Description Reserved This bit is always read as 0. The write value should always be 0. PCKE Power Down When the DDR-SDRAM is not accessed (in the idle state or bank active state), this bit sets the CKE pin low and the power-down mode is entered.
Page 485
Section 12 DDR-SDRAM Interface (DDRIF) Initial Bit Name Value Description 28 to 16 DRI H'0C34 DRAM Refresh Interval When refreshing is valid (the DRE bit in MIM is set to 1), these bits specify the maximum refresh interval (auto refresh). One count is the same as the cycle of the memory clock.
Page 486
Section 12 DDR-SDRAM Interface (DDRIF) Initial Bit Name Value Description ENDIAN Undefined R Endian Identification Indicates whether the big endian mode or little endian mode is set to the external data bus. 1: Big endian mode 0: Little endian mode ...
Page 488
Section 12 DDR-SDRAM Interface (DDRIF) Initial Bit Name Value Description 63 to 3 All 0 Reserved These bits are always read as 0. The write value should always be 0. 2 to 0 SDRAM Mode Select These bits initialize the DDR-SDRAM at a power-on or after release of a reset.
Section 12 DDR-SDRAM Interface (DDRIF) 12.4.3 DDR-SDRAM Timing Register (STR) STR specifies the DDR-SDRAM timing. (Details on the number range depend on the parameters used by each memory manufacturer. Bit: Initial value: R/W: Bit: Initial value: R/W: Bit: Initial value: R/W: Bit: SRFC...
Page 490
Section 12 DDR-SDRAM Interface (DDRIF) Initial Bit Name Value Description 17, 16 Minimum Number of Cycles from Read command to Write Commands These bits specify the minimum number of cycles for the WRITE command issuance after the READ command is issued for the DDR-SDRAM. 00: 3 cycles 01: 4 cycles 10: 5 cycles...
Page 491
Section 12 DDR-SDRAM Interface (DDRIF) Initial Bit Name Value Description 10 to 8 SRAS Minimum Number of Cycles between ACT and PRE Commands These bits specify the minimum number of cycles from ACT command issuance to PRE command issuance in the same bank (Tras).
Section 12 DDR-SDRAM Interface (DDRIF) Initial Bit Name Value Description SRCD Number of Cycles between RAS and CAS Commands Specifies the number of cycles from RAS (ACT) command issuance to CAS (READ/READA, WRITE/WRITEA) command issuance (Trcd). 0: 3 cycles 1: 4 cycles Number of Cycles between PRE and ACT Commands Specifies the number of cycles from PRE command issuance to ACT command issuance (Trp).
Section 12 DDR-SDRAM Interface (DDRIF) Initial Bit Name Value Description 63 to 12 All 0 Reserved These bits are always read as 0. The write value should always be 0. 11 to 8 SPLIT 0001 DDR-SDRAM Memory Configuration These bits specify the DDR-SDRAM row/column configuration.
Section 12 DDR-SDRAM Interface (DDRIF) Figure 12.3 shows the relationship between write values in SDMR and output signals to the memory pins. SDRAM address DDR-SDRAM MA10 MA11 MA12 MA13 M_CS M_RAS M_CAS L: Low level M_WE H: High level Figure 12.3 Relationship between Write Values in SDMR and Output Signals to Memory Pins For example, when the DLL reset release, CAS latency of 2.5 cycles, sequential burst sequence, and burst length of 2 are set to the mode register in the DDR-SDRAM, the following signals must...
Section 12 DDR-SDRAM Interface (DDRIF) 12.5 Operation 12.5.1 DDR-SDRAM Access The DDR-SDRAM is accessed with a burst length of 2. Read or write commands that hit the page are issued continuously and read data continuously. Write command Write data read command read data Figure 12.4 DDR-SDRAM Access 12.5.2...
Page 497
Section 12 DDR-SDRAM Interface (DDRIF) 9. Use SDMR to issue the MRS command and reset the DLL. Also set the burst length, CAS latency, and so on. 10. After the PREALL command is issued, use the SMS field in SCR to issue the REF command twice.
Section 12 DDR-SDRAM Interface (DDRIF) 12.5.4 DDR-SDRAM Access Mode The DDRIF supports the following two DDR-SDRAM access modes. Each mode can be set using the BOMODE bits in MIM. Bank Open Mode: The DDR-SDRAM is accessed without the PRE command immediately after memory read or memory write, meaning that the bank is always open.
Section 12 DDR-SDRAM Interface (DDRIF) 5. Whether the DDR-SDRAM enters the self-refresh mode can be checked by reading the SELFS bit in MIM. [Recovery from self-refresh state] 1. Clear the RMODE and DRE bits in MIM to 0 to clear the self-refresh state. 2.
Section 12 DDR-SDRAM Interface (DDRIF) 12.5.7 Operating Frequency The DDRIF is supported only when the clock ratio between the SuperHyway bus clock and the external memory clock is 1:1 (DDR266 or DDR200). The maximum operating frequency for the SuperHyway bus is 133 MHz. The minimum operating frequency depends on the DDR-SDRAM clock frequency.
Section 12 DDR-SDRAM Interface (DDRIF) 12.5.11 Note on Setting Auto-Refresh Interval The auto-refresh interval is specified by the DRI bits in MIM. If the DRE bit is set to 1 at the same time as the DRI bits are set, the time until the first auto-refresh is that selected by the value of the DRI bits before the new setting was made.
Section 12 DDR-SDRAM Interface (DDRIF) At level 0, DDR-SDRAM controls such as DDR-SDRAM refresh and page management have the highest priority. The memory is refreshed according to the memory refresh intervals specified separately. At level 1, access is rotated between access from the SHway bus and access from the LCDC (in round-robin method).
Section 12 DDR-SDRAM Interface (DDRIF) 12.6 DDRIF Basic Timing Figures 12.5 to 12.14 show examples of basic DDRIF timing. In every figure, the DDR-SDRAM is idle at T0. The various timings should be set in the STR register within the range specified by the DDR- SDRAM used.
Section 12 DDR-SDRAM Interface (DDRIF) (MCLK) MCLK Command REFS REFSX Command XSNR XSRD MA9-0 MA13-11 MA10 BA1-0 MRAS MCAS Self-refresh Notes: 1. This timing should satisfy the conditions specified by the DDR-SDRAM used when driving CKE high. 2. This timing should satisfy the conditions specified by the DDR-SDRAM used. is for a non-READ command and t is for a READ command;...
Section 13 PCI Controller (PCIC) Section 13 PCI Controller (PCIC) The PCI controller (PCIC) controls the PCI bus for data transfers between memory connected to an external bus and a PCI device connected to the PCI bus. The ability to connect PCI devices facilitates the design of systems using the PCI bus and enables more compact systems capable of faster data transfer.
Page 516
Section 13 PCI Controller (PCIC) • Exclusive access (target only) Once locked, only accessible from the device that accessed the LOCK signal The SuperHyway bus in not locked during lock transfer • Can support cache coherency between a device connected to the PCI bus and system memory (PCI target) although device performance may become suboptimal •...
Section 13 PCI Controller (PCIC) Figure 13.1 is a block diagram of the PCIC. PCIRESET PCICLK (PCI bus clock) PCI local bus PCI standard signal PCIC SuperHyway bus PCI bus Interface MODE6 Interface (PCI bus access control) Host/normal SuperHyway bus Data FIFO Target control 32-Byte ×...
Section 13 PCI Controller (PCIC) 13.2 Input/Output Pins Table 13.1 shows the pin configuration of the PCIC. Table 13.1 Input/Output Pins PCI standard Pin Name signal name Description AD31 to AD0 AD[31:0] PCI Address/Data Bus (TRI) Address and data buses are multiplexed. Each bus transaction consists of an address phase followed by one or more data phases.
Page 519
Section 13 PCI Controller (PCIC) PCI standard Pin Name signal name Description IDSEL IDSEL Input PCI Configuration Device Select This signal is input to the PCI device to select configuration cycles (only for normal mode). DEVSEL DEVSEL PCI Device Select (STRI) Indicates the device driving this signal has decoded its address as the target.
Page 520
Section 13 PCI Controller (PCIC) [Legend] TRI: Tri-state STRI: Sustained tri-state O/D: Open Drain Note: Clear the PCIC-related interrupt masks only after the PCIC-related pins are selected as the PCIC. Rev. 1.00 Oct. 01, 2007 Page 454 of 1956 REJ09B0256-0100...
Section 13 PCI Controller (PCIC) 13.3 Register Descriptions Table 13.2 shows the PCIC register configuration. Table 13.3 shows the register states in each operating mode. The PCI configuration register address and its offset are used for little endian operation. Table 13.2 List of PCIC Registers PCI* Access Name...
Page 522
Section 13 PCI Controller (PCIC) PCI* Access Name Abbreviation P4 address Area 7 address Size* PCI minimum grant register PCIMINGNT H'FE04 003E H'1E04 003E PCI maximum latency register PCIMAXLAT H'FE04 003F H'1E04 003F PCI capability ID register PCICID H'FE04 0040 H'1E04 0040 PCI next item pointer register PCINIP...
Page 523
Section 13 PCI Controller (PCIC) PCI* Access Name Abbreviation P4 address Area 7 address Size* PCI memory bank register 0 PCIMBR0 — H'FE04 01E0 H'1E04 01E0 PCI memory bank mask register 0 PCIMBMR0 — H'FE04 01E4 H'1E04 01E4 PCI memory bank register 1 PCIMBR1 —...
PCI Vender ID PCI: R Indicates the PCI device manufacture identifier (vender ID) that is allocated by PCI-SIG. Renesas Technology’s vendor ID is H'1912. PCI Device ID Register (PCIDID) This register uniquely identifies this LSI amongst PCI devices manufactured by the vendor.
Page 528
Section 13 PCI Controller (PCIC) PCI Command Register (PCICMD) The PCI command register provides coarse control over a device's ability to generate and respond to PCI cycles. When 0 is written to this register, the device is logically disconnected from the PCI bus for all accesses except configuration accesses.
Page 529
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description SH: R/W Parity Error PCI: R/W Controls the device's response when the PCIC detects a parity error or receives a parity error. When this bit is set to 1, the PERR signal is asserted. 0: No response parity error 1: Response parity error VGAPS...
Page 530
Section 13 PCI Controller (PCIC) PCI Status Register (PCISTATUS) This status register is used to record status information for PCI bus related events. The definition of each of the bits is given in the table below. A device may not need to implement all the bits, depending on device functionality.
Page 531
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description SH: R/WC Master Abort Receive Status PCI: R/WC Indicates that the PCIC has terminated a transaction with a master abort when the PCIC is a master. 0: PCIC has not terminated a transaction with a master abort 1: PCIC has terminated a transaction with a master abort...
Page 532
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description FBBC SH: R Fast Back-to-Back Status PCI: R Indicates whether or not the PCIC is capable of accepting fast back-to-back transactions when the transactions are not to the same agent if the PCIC functions as a target.
Page 533
Section 13 PCI Controller (PCIC) PCI Revision ID Register (PCIRID) This register specifies a device specific revision identifier. Bit: Initial value: SH R/W: PCI R/W: Initial Bit Name Value Description 7 to 0 H'00 SH: R Revision ID PCI: R Indicates the PCIC revision.The initial value is H'00.RID value varies according to the logic version of the PCIC and it may be changed in the future.
Page 534
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description 6 to 4 All 0 SH: R Reserved PCI: R These bits are always read as 0. The write value should always be 0. SH: R/W PCI Programmable Indicator (Secondary) PCI: R When the CFINIT bit in PCICR is 0, this bit is writable.
Page 535
Section 13 PCI Controller (PCIC) PCI Sub Class Code Register (PCISUB) This register identifies the sub class code. For details of the class code, refer to “PCI Local Bus Specification Revision 2.2 Appendix D.” Bit: Initial value: SH R/W: PCI R/W: Initial Bit Name Value...
Page 536
Section 13 PCI Controller (PCIC) PCI Cacheline Size Register (PCICLS) Bit: Initial value: SH R/W: PCI R/W: Initial Bit Name Value Description 7 to 0 H'20 SH: R Cache Line Size: Not supported PCI: R A memory target does not support a cache. SDON and SBO are ignored.
Page 537
Section 13 PCI Controller (PCIC) (11) PCI Header Type Register (PCIHDR) Bit: Initial value: SH R/W: PCI R/W: Initial Bit Name Value Description SH: R Multiple Function Enable PCI: R 0: Single function 1: Multiple (from two to eight) functions (not supported) 6 to 0 H'00...
Page 538
Section 13 PCI Controller (PCIC) (13) PCI I/O Base Address Register (PCIIBAR) This register packages the I/O space base address register of the PCI configuration register that is prescribed with PCI local bus specification. Refer to Section 13.4.4 (1), Accessing This LSI Address Space. Bit: IOB (upper) Initial value:...
Page 539
Section 13 PCI Controller (PCIC) (14) PCI Memory Base Address Register 0 (PCIMBAR0) This register packages the memory space base address register of the PCI configuration register that is prescribed with PCI local bus specification. Refer to Section 13.4.4 (1), Accessing This LSI Address Space. Bit: MBA (upper) MBA (lower)
Page 540
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description 2, 1 SH: R Memory Type PCI: R Indicates the memory type of local address space 0. 00: 32-bit base address and 32-bit space 01: 32-bit base address and 1-Mbyte space (Not supported) 10: 64-bit base address (Not supported) 11: Reserved...
Page 541
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description 31 to 20 MBA H'000 SH: R/W PCI Memory Space 1 Base Address (upper 12 bits) (upper) PCI: R/W Specifies the upper 12 bits of PCI memory base address that corresponds the base address of local address space 1 (SuperHyway bus address space of this LSI).
Page 542
Section 13 PCI Controller (PCIC) (16) PCI Subsystem vender ID Register (PCISVID) Refer to miscellaneous registers section of PCI local bus specification Revision 2.2. Bit: SVID Initial value: SH R/W: PCI R/W: Initial Bit Name Value Description 15 to 0 SVID H'0000 SH: R/W Subsystem Vendor ID...
Page 543
Section 13 PCI Controller (PCIC) (18) PCI Capability Pointer Register (PCICP) This register is the expansion function pointer register of the PCI configuration register that is prescribed in the PCI power management specification. Bit: Initial value: SH R/W: PCI R/W: Initial Bit Name Value...
Page 544
Section 13 PCI Controller (PCIC) (20) PCI Interrupt Pin Register (PCIINTPIN) Bit: INTPIN Initial value: SH R/W: PCI R/W: Initial Bit Name Value Description 7 to 0 INTPIN H'01 SH: R/W Interrupt Pin Select PCI: R Specifies which interrupt pin is used for connection when the PCIC outputs interrupt request.
Page 545
Section 13 PCI Controller (PCIC) (22) PCI Maximum Latency Register (PCIMAXLAT) This register is not programmable. Bit: MAXLAT Initial value: SH R/W: PCI R/W: Initial Bit Name Value Description 7 to 0 MAXLAT H'00 SH: R Maximum Latency PCI: R Specify the worst time from the bus request by the PCI master device to the bus acquisition (not supported).
Page 546
Section 13 PCI Controller (PCIC) (24) PCI Next Item Pointer Register (PCINIP) PCINIP gives the location of the next item in the function's capability list. Bit: Initial value: SH R/W: PCI R/W: Initial Bit Name Value Description 7 to 0 H'00 SH: R Next Item Pointer...
Page 547
Section 13 PCI Controller (PCIC) (25) PCI Power Management Capability Register (PCIPMC) PCIPMCS is a 16-bit register that provides information on the capabilities of the power management related functions. For details, refer to “PCI Bus Power Management Interface Specification Revision 1.1 Chapter 3 PCI Power Management Interface”. This register must be set during initializing the PCIC registers (PCICR.CFINIT = 0).
Page 548
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description 8 to 6 All 0 SH: R Reserved PCI: R These bits are always read as 0. The write value should always be 0. SH: R PCI: R Specifies whether or not the device requires the specific initialization.
Page 549
Section 13 PCI Controller (PCIC) (26) PCI Power Management Control/Status Register (PCIPMCSR) This 16-bit register is used to manage the PCI function's power management status as well as to enable/monitor PMEs. For details, refer to “PCI Bus Power Management Interface Specification Revision 1.1 Chapter 3 PCI Power Management Interface”.
Page 550
Section 13 PCI Controller (PCIC) (27) PCIPMCSR Bridge Support Extension Register (PCIPMCSRBSE) This register supports PCI bridge specific functionality and is required for all PCI-to-PCI bridges. Bit: — — — — — — B2B3N Initial value: SH R/W: PCI R/W: Initial Bit Name Value...
Page 551
Section 13 PCI Controller (PCIC) (28) PCI Power Consumption/Radiation Register (PCIPCDD) The data register is an 8-bit register that provides a mechanism for the function to report state dependent operating data such as power consumed or heat dissipation. For details, refer to “PCI Bus Power Management Interface Specification Revision 1.1 Chapter 3 PCI Power Management Interface”.
Section 13 PCI Controller (PCIC) 13.3.3 Local Register PCI Control Register (PCICR) PCICR is a 32-bit register which specifies the operation of the PCIC. The register is write protected; only writes in which the upper eight bits (that is, bits 31 to 24) have the value H'A5 are performed.
Page 553
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description SH: R/W Byte Swap PCI: R Specifies whether or not byte data is swapped when accessing to the PCI local bus. 0: No swap 1: Byte data is swapped For details, see section 13.4.3 (5), Endian or section 13.4.4 (6), Endian.
Page 554
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description PCIRESET Output RSTCTL SH: R/W Controls the PCIRESET output by software. This bit is PCI: R valid when the PCIC operates in host bus bridge mode. 0: Negates PCIRESET output (high level output) 1: Asserts PCIRESET output (low level output) Note: The PCIRESET is also asserted during power- on reset.
Page 555
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description 31 to 29 All 0 SH: R Reserved PCI: R These bits are always read as 0. The write value should always be 0. 28 to 20 LSR 0 0000 SH: R/W Size of Local Address Space 0 (9 bits) 0000...
Page 556
Section 13 PCI Controller (PCIC) PCI Local Space Register 1 (PCILSR1) Refer to Section 13.4.4 (1), Accessing This LSI Address Space. Bit: — — — — — — — Initial value: SH R/W: PCI R/W: Bit: — — — — —...
Page 557
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description MBARE SH: R/W PCI Memory Base Address Register 1 Enable PCI: R The local address space 1 can be accessed by setting this bit to 1. 0: PCIMBAR1 disabled 1: PCIMBAR1 enabled PCI Local Address Register 0 (PCILAR0) Refer to Section 13.4.4 (1), Accessing This LSI Address Space.
Page 559
Section 13 PCI Controller (PCIC) PCI Interrupt Register (PCIIR) PCIIR records the source of an interrupt. When multiple interrupts occur, only the first source is registered. When an interrupt is disabled, the source is registered in corresponding bit (set to 1) in this register, however, no interrupt occurs.
Page 560
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description 13 to 10 All 0 SH: R Reserved PCI: R These bits are always read as 0. The write value should always be 0. TMTOI SH: R/WC Target Memory Read Retry Timeout Interrupt PCI: R When the PCIC functions as a target, the master did not attempt a retry within the prescribed number of...
Page 561
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description APEDI SH: R/WC Address Parity Error Detection Interrupt PCI: R Indicates an address parity error has been detected. When both the PER and SERRE bits in the PCI command register are set to 1, an address parity error is detected.
Page 562
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description Data Parity Error Interrupt for Target PERR PEDITR SH: R/WC Indicates that the PERR signal has been received PCI: R during a target read access (only detected when PCICMD.PER is set to 1) when the PCIC functions as a target.
Page 563
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description Master Write PERR Detection Interrupt MWPDI SH: R/WC Indicates that the PERR signal has been received PCI: R during a master write access (only detected when PCICMD.PER is set to 1) when the PCIC functions as a master.
Page 564
Section 13 PCI Controller (PCIC) PCI Interrupt Mask Register (PCIIMR) This register is the mask register for PCIIR. Bit: — — — — — — — — — — — — — — — — Initial value: SH R/W: PCI R/W: Bit: DPEI DPEI...
Page 565
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description SERR Detection Interrupt Mask SEDIM SH: R/W PCI: R 0: PCIIR.SEDI disabled (masked) 1: PCIIR.SEDI enabled (not masked) DPEITWM 0 SH: R/W Data Parity Error Interrupt Mask for Target Write PCI: R 0: PCIIR.DPEITW disabled (masked) 1: PCIIR.DPEITW enabled (not masked)
Page 566
Section 13 PCI Controller (PCIC) PCI Error Address Information Register (PCIAIR) This register records PCI address information when an error is detected. Bit: Initial value: — — — — — — — — — — — — — — — —...
Page 567
Section 13 PCI Controller (PCIC) PCI Error Command Information Register (PCICIR) This register records the PCI command information when an error is detected. Bit: MTEM — — — — — — — — — — — — — — Initial value: —...
Page 568
Section 13 PCI Controller (PCIC) (10) PCI Arbiter Interrupt Register (PCIAINT) In host bus bridge mode, this register records source of an interrupt. When multiple interrupts occur, only the first source is registered. When an interrupt is disabled, source is registered in corresponding bit (set to 1) in this register, however, no interrupt occurs.
Page 569
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description TBTOI SH: R/WC Target Bus Time-Out Interrupt An interrupt is detected when the TRDY or STOP PCI: R signal is not asserted within 16 clock cycles on the first data transfer. An interrupt is detected when the TRDY or STOP signal is not asserted within eight clock cycles during the data transfer subsequent to the 2nd.
Page 570
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description SH: R/WC Target-Abort Interrupt PCI: R Indicates that a transaction is terminated with a target-abort when a device other than the PCIC functions as a bus master. 0: Target-abort interrupt does not occur [Clear condition] Write 1 to this bit (write clear).
Page 571
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description WDPEI SH: R/WC Write Parity Error Interrupt The PERR assertion is detected during a data write PCI: R when a device other than the PCIC functions as a bus master. 0: Write parity error interrupt does not occur [Clear condition] Write 1 to this bit (write clear).
Page 572
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description MBIM SH: R/WC Master-Broken Interrupt Mask PCI: R 0: PCIAINT.MBI disabled (masked) 1: PCIAINT.MBI enabled (not masked) TBTOIM SH: R/WC Target Bus Time-Out Interrupt Mask PCI: R 0: PCIAINT.TBTOI disabled (masked) 1: PCIAINT.TBTOI enabled (not masked) MBTOIM SH: R/WC...
Page 573
Section 13 PCI Controller (PCIC) (12) PCI Arbiter Bus Master Information Register (PCIBMIR) In host bridge mode, this register records when the interrupt is invoked by PCIAINT. When multiple interrupts occur, only the first source is registered. When an interrupt is masked, the source is registered in corresponding bit (set to 1), however, an interrupt occurs.
Page 574
Section 13 PCI Controller (PCIC) (13) PCI PIO Address Register (PCIPAR) This register is configuration address register. Refer to Section 13.4.5 (2), Configuration Space Access. Bit: CCIE — — — — — — — Initial value: — — — — —...
Page 575
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description 15 to 11 DN Undefined SH: R/W Device Number PCI: Specify the device number for a configuration access. Device numbers ranging from 0 to 31 are represented in five bits. A single bit of bits 31 to 16 of the AD signals is driven to high level instead of the IDSEL assertion.
Page 576
Section 13 PCI Controller (PCIC) (14) PCI Power Management Interrupt Register (PCIPINT) This register controls the power management interrupt. Bit: — — — — — — — — — — — — — — — — Initial value: SH R/W: PCI R/W: —...
Page 577
Section 13 PCI Controller (PCIC) (15) PCI Power Management Interrupt Mask Register (PCIPINTM) This is the mask register for PCIPINT. Bit: — — — — — — — — — — — — — — — — Initial value: SH R/W: PCI R/W: —...
Page 578
Section 13 PCI Controller (PCIC) (16) PCI Memory Bank Register 0 (PCIMBR0) This register specifies the upper 14-bit address of the PCI memory space 0 (address bits 31 to 18). Refer to Section 13.4.3 (2), Accessing PCI Memory Space. Bit: PMSBA0 —...
Page 579
Section 13 PCI Controller (PCIC) (17) PCI Memory Bank Mask Register 0 (PCIMBMR0) This register specifies the size of the PCI memory space 0. Refer to Section 13.4.3 (2), Accessing PCI Memory Space. Bit: — — — — — — —...
Page 580
Section 13 PCI Controller (PCIC) (18) PCI Memory Bank Register 1 (PCIMBR1) This register specifies the upper 14-bit address of the PCI memory space 1 (address bits 31 to 18). Refer to Section 13.4.3 (2), Accessing PCI Memory Space. Bit: PMSBA1 —...
Page 581
Section 13 PCI Controller (PCIC) (19) PCI Memory Bank Mask Register 1 (PCIMBMR1) This register specifies the size of the PCI memory space 1. Refer to Section 13.4.3 (2), Accessing PCI Memory Space. Bit: — — — — — — MSBAM1 —...
Page 582
Section 13 PCI Controller (PCIC) (20) PCI Memory Bank Register 2 (PCIMBR2) This register specifies the upper 14-bit address of the PCI memory space 2 (address bits 31 to 18). Refer to Section 13.4.3 (2), Accessing PCI Memory Space. Bit: PMSBA2 —...
Page 583
Section 13 PCI Controller (PCIC) (21) PCI Memory Bank Mask Register 2 (PCIMBMR2) This register specifies the size of the PCI memory space 2. Refer to Section 13.4.3 (2), Accessing PCI Memory Space. Bit: — — — MSBAM2 — — Initial value: SH R/W: PCI R/W:...
Page 584
Section 13 PCI Controller (PCIC) (22) PCI I/O Bank Register (PCIIOBR) This register specifies the upper 14-bit address of the PCI I/O space (address bits 31 to 18). Refer to Section 13.4.3 (3), Accessing PCI I/O Space. Bit: PIOSBA — —...
Page 585
Section 13 PCI Controller (PCIC) (23) PCI I/O Bank Mask Register (PCIIOBMR) This register specifies the size of the PCI I/O space. Refer to Section 13.4.3 (2), Accessing PCI Memory Space. Bit: — — — — — — — — —...
Page 586
Section 13 PCI Controller (PCIC) (24) PCI Cache Snoop Control Register 0 (PCICSCR0) An external device can access local memory of this LSI via the PCIC. When an external PCI device accesses cacheable areas of this LSI, the PCIC can support cache snoop function to the on- chip caches.
Page 587
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description 1, 0 SNPMD All 0 SH: R/W Snoop Mode for PCICSAR0 PCI: — Specify if PCICSAR0 is compared with address requested by an external device. Also, specify how snoop function is executed when PCICSAR0 is compared.
Page 588
Section 13 PCI Controller (PCIC) (25) PCI Cache Snoop Control Register 1 (PCICSCR1) An external device can access local memory of this LSI via the PCIC. When an external PCI device accesses cacheable areas of this LSI, the PCIC can support cache snoop function to the on- chip caches.
Page 589
Section 13 PCI Controller (PCIC) Initial Bit Name Value Description 1, 0 SNPMD All 0 SH: R/W Snoop Mode for PCICSAR1 PCI: — Specify if PCICSAR1 is compared with address requested by an external device. Also, specify how snoop function is executed when PCICSAR1 is compared.
Page 590
Section 13 PCI Controller (PCIC) (26) PCI Cache Snoop Address Register 0 (PCICSAR0) PCICSAR0 specifies the address to be compared with the PCI address requested by an external device. Refer to section 13.4.4 (7), Cache Coherency. Bit: CADR Initial value: SH R/W: PCI R/W: —...
Page 591
Section 13 PCI Controller (PCIC) (27) PCI Cache Snoop Address Register 1 (PCICSAR1) PCICSAR1 specifies the address to be compared with the PCI address requested by an external device. Refer to section 13.4.4 (7), Cache Coherency. Bit: CADR Initial value: SH R/W: PCI R/W: —...
Page 592
Section 13 PCI Controller (PCIC) (28) PCI PIO Data Register (PCIPDR) When accessed, this register will cause the generation of a configuration cycle on the PCI bus. Refer to section 13.4.5 (2), Configuration Space Access. Bit: Initial value: — — —...
Section 13 PCI Controller (PCIC) 13.4.2 PCIC Initialization After a power-on reset, the PCIC enable bit (ENBL) of the PCIC enable control register (PCIECR) and the internal register initialization bit (CFINIT) of the PCI control register (PCICR) is cleared. At this point, if the PCIC is operating as the PCI bus host (host bus bridge mode), the bus privileges are permanently granted to the PCIC, and no device arbitration is performed on the PCI bus.
Section 13 PCI Controller (PCIC) 13.4.3 Master Access This section describes how the PCIC is accessed by software in this LSI and the restrictions on usage, such as buffering and synchronization with other devices, when the PCIC is used in both the host bus bridge and normal modes.
Section 13 PCI Controller (PCIC) Accessing PCI Memory Space Figure 13.2 shows the method for accessing the PCI bus allocated to the PCI memory space from the SuperHyway bus. SuperHyway bus PCI local bus address space (4GB) address space (4GB) H'0000 0000 16 Mbytes H'1000 0000...
Section 13 PCI Controller (PCIC) For PCI memory space 0 accesses, bits 23 to 18 of a SuperHyway bus address are controlled by PCI memory bank mask register 0 (PCIMBMR0). Note: In the following items and figures, “SH” means the SuperHyway bus of this LSI and “PCI”...
Section 13 PCI Controller (PCIC) 26 25 18 17 26 25 18 17 SH address PCI address mask 26 25 18 17 26 25 18 17 PCIMBMR1 PCIMBR1 MSBAM1 PMSBA1 Figure 13.4 SuperHyway Bus to PCI Local Bus Address Translation (PCI Memory Space 1) For PCI memory space 2 accesses, bits 28 to 18 of a SuperHyway address are controlled by the PCI memory bank mask register 2 (PCIMBMR2).
Section 13 PCI Controller (PCIC) Accessing PCI I/O Space Access within the size of 4-byte. Burst I/O transfers are not supported. The PCI I/O address space is allocated from H'FD20 0000 to H'FE3F FFFF (2 Mbytes). Address translation from SuperHyway bus to PCI local bus The lower 15 bits ([17:3]) of a SuperHyway bus address are sent without translation.
Page 600
Section 13 PCI Controller (PCIC) Accessing Internal Registers of this LSI All internal registers, that is, PCIECR, PCI configuration registers, and PCI local registers are accessible from the CPU. 4-byte, 2-byte, and byte transmission are supported. Endian The PCIC of this LSI supports both the big endian and little endian formats. Since PCI local bus is inherently little endian, the PCIC supports both byte swapping and non-byte swapping.
Section 13 PCI Controller (PCIC) 1. Little Endian MSByte LSByte SH data C' D' A Buffer data C' D' A PCI Address[2] = 1 PCI Address[2] = 0 PCI data 2. Big Endian MSByte LSByte SH data C' D' Buffer data C' D' PCI Address[2] = 0 PCI Address[2] = 1...
Section 13 PCI Controller (PCIC) 1. Little Endian MSByte LSByte SH data C' D' A Buffer data C' D' A PCI Address[2] = 1 PCI Address[2] = 0 PCI data 2. Big Endian MSByte LSByte SH data D' C' B' Buffer data C' D' PCI Address[2] = 1...
Section 13 PCI Controller (PCIC) 13.4.4 Target Access This section describes how the PCIC of this LSI is accessed by an external PCI local bus master when the PCIC is used in both the host bus bridge and normal modes. Accessing This LSI Address Space Accesses to the address space of this LSI by an external PCI bus master are described here.
Page 604
Section 13 PCI Controller (PCIC) To access the address space of this LSI, use the PCI memory base address register (PCIMBAR0/1), PCI local space register (PCILSR0/1), and PCI local address register (PCILAR0/1). The address spaces are mapped by software. The PCIC includes two memory mapping registers.
Section 13 PCI Controller (PCIC) 2928 20 19 2928 2019 SH address PCI address compare 29 28 2019 2928 2019 PCIMBAR0/1 PCILAR0/1 MBA (upper) 2928 2019 PCILSR0/1 0 0 0 0 0 1 1 0 0 Figure 13.10 PCI Local Bus to SuperHyway Bus Address Translation (Local Address Space 0/1) When all the MBARE bits in PCILSR0/1 are 0, the PCI local bus address is sent to the SuperHyway bus without translation.
Section 13 PCI Controller (PCIC) SH address H'FE04 01 PCI Address compare IOB (upper) PCIIBAR Figure 13.11 PCI Local Bus to SuperHyway Bus Address Translation (PCIC I/O Space) Accessing PCIC Registers Configuration Registers: Access the configuration registers using an offset from the PCI configuration register space base address with the configuration read or write command.
Page 607
Section 13 PCI Controller (PCIC) Exclusive Access The lock access on the PCI bus is supported. When the PCI local bus is locked, the PCIC is accessible from the device that activates the LOCK signal. SuperHyway bus resource lock does not occur. (Another on-chip module can access the PCIC during a lock transfer.) Endian This LSI supports both the big and little endian formats.
Section 13 PCI Controller (PCIC) 1. Little Endian PCI data PCI Address[2] = 0 PCI Address[2] = 1 Buffer data C' D' A MSByte LSByte SH data C' D' A 2. Big Endian PCI data PCI Address[2] = 1 PCI Address[2] = 0 Buffer data C' D' MSByte...
Section 13 PCI Controller (PCIC) 1. Little Endian PCI data PCI Address[2] = 0 PCI Address[2] = 1 Buffer data C' D' D MSByte LSByte SH data C' D' A 2. Big Endian PCI data PCI Address[2] = 1 PCI Address[2] = 0 Buffer data D' C' B' MSByte...
Page 610
Section 13 PCI Controller (PCIC) Cache Coherency The PCIC supports cache snoop function. When the PCIC functions as a target device, cache coherency is guaranteed for accesses from a master device connected to a PCI bus in both the host bus bridge mode and normal mode. When accessing this LSI cacheable area, set the cache snoop registers: the PCI cache snoop control registers (PCICSCR0 and PCICSCR1) and PCI cache snoop address register (PCICSAR0 and PCICSAR1).
Section 13 PCI Controller (PCIC) PCI address Cache snoop control register SuperHyway address Cache snoop address register compare No hit issue the flush/purge Issue the read/write issue the read/write Figure 13.14 Cache Flush/Purge Execution Flow for PCI local Bus to SuperHyway Bus Rev.
Section 13 PCI Controller (PCIC) 13.4.5 Host Bus Bridge Mode PCI Host bus bridge Mode Operation The PCIC supports a subset of the PCI Local Bus Specification Revision 2.2 and can be connected to a device with a PCI bus interface. While the PCIC is set in host bus bridge mode, or while set in normal mode, operation differs according to whether or not bus parking is performed, and whether or not the PCI bus arbiter function is enabled or not.
Section 13 PCI Controller (PCIC) 31 30 24 23 16 15 11 10 Configuration Reserved address register (PCIPAR) CCIE PCI local bus Only one '1' 00000 address (AD31 to AD0) 16 15 11 10 Figure 13.15 Address Generation for Type 0 Configuration Access In configuration accesses, a PCI master abort (no device connected) will not cause an interrupt.
Section 13 PCI Controller (PCIC) After device 1 has claimed and granted the bus, and transferred data, the priority is as follows: PCIC > device 0 > device 2 > device 3 > device 1 Then, after the PCIC has claimed and granted the bus, and transferred data, the priority is changed Device 0 >...
Section 13 PCI Controller (PCIC) The PCIC can store the error information on the PCI bus. If an error occurs, the error address is stored in the PCI error address information register (PCIAIR), the types of transfer and command information are stored in the PCI error command information register. And then if the PCIC operates host bus bridge mode, the bus master information is stored in the PCI error bus master information register.
Section 13 PCI Controller (PCIC) (normal) (clock stop) (bus idle) (power down) Figure 13.16 PCI Local Bus Power Down State Transition The PCIC detects when the power state (PS) bit of the PCI power management control/status register changes (when it is written to from an external PCI device), and issues a power management interrupt.
Section 13 PCI Controller (PCIC) Master Read/Write Cycle Timing Figures13.17 is an example of a single-write cycle in host bus bridge mode. Figure 13.18 is an example of a single read cycle in host bus bridge mode. Figure 13.19 is an example of a burst write cycle in normal mode.
Section 13 PCI Controller (PCIC) PCICLK AD[31:0] Addr DPn-1 CBE[3:0] (C/BE[3:0]) PCIFRAME IRDY DEVSEL TRDY LOCK IDSEL [Legend] Addr: PCI space address nth data Address parity DPn: nth data parity Com: Command BEn: nth data byte enable Figure 13.20 Master Read Cycle in Normal Mode (Burst) Rev.
Page 621
Section 13 PCI Controller (PCIC) Target Read/Write Cycle Timing The PCIC responds to target memory burst read accesses from an external master by retries until 8 longword (32-bit) data are prepared in the PCIC's internal FIFO. That is, it always responds to the first target burst read with a retry.
Section 13 PCI Controller (PCIC) Address/Data Stepping Timing By writing 1 to the SC bit in PCICMD, a wait (stepping) of one clock can be inserted when the PCIC is driving the AD bus. As a result, the PCIC drives the AD bus over 2 clocks. This function can be used when there is a heavy load on the PCI bus and the AD bus does not achieve the stipulated logic level in one clock.
Section 13 PCI Controller (PCIC) 13.5 Usage Notes 13.5.1 Notes on PCIC Target Reading When the PCIC is used in target mode and all the three conditions below are satisfied, data may be lost during a PCIC target read. 1. PFCS bit in PCICR = 1 (32-byte pre-fetch enabled) 2.
Page 629
Section 13 PCI Controller (PCIC) To prevent a device that does not execute REQ negation and FRAME assertion simultaneously (figure 13.27) from being a bus master, preventive measure 1 or 2 below should be taken. 1. Use pseudo-round-robin mode. Pseudo-round-robin mode should be set (BMAM bit in PCICR = 1) as the PCI bus arbitration scheme.
Section 14 Direct Memory Access Controller (DMAC) Section 14 Direct Memory Access Controller (DMAC) This LSI includes the direct memory access controller (DMAC). The DMAC can be used in place of the CPU to perform high-speed transfers between external devices that have DACK (transfer request acknowledge signal), external memory, on-chip memory, memory-mapped external devices, and on-chip peripheral modules.
Section 14 Direct Memory Access Controller (DMAC) • Active levels for both the DMA transfer request acceptance signal (DACKn) and DMA transfer end signal (TENDn) can be set. (n = 0 to 3) Figure 14.1 shows the block diagram of the DMAC. DMAC channels 0 to 5 SARm On-chip memory...
Section 14 Direct Memory Access Controller (DMAC) 14.2 Input/Output Pins The external pins for the DMAC are described below. Table 14.1 lists the configuration of the pins that are connected to external device. The DMAC has pins for four channels (channel 0 to 3) for external bus use.
Page 634
Section 14 Direct Memory Access Controller (DMAC) Channel Pin Name Function Description DREQ2* DMA transfer request Input DMA transfer request input from external device to channel 2 DACK2* DMA transfer request Output Strobe output from channel 2 to acknowledge external device which has output, regarding DMA transfer request TEND2* DMA transfer end...
Section 14 Direct Memory Access Controller (DMAC) 14.3 Register Descriptions Table 14.2 shows the configuration of registers of the DMAC. Table 14.3 shows the state of registers in each processing mode. Table 14.2 Register Configuration of DMAC Channel Name Abbrev. P4 Address Area 7 Address Access Size*...
Section 14 Direct Memory Access Controller (DMAC) 14.3.2 DMA Source Address Registers (SARB0 to SARB3) SARB is 32-bit readable/writable registers that specify the source address of a DMA transfer that is set in SAR again in repeat/reload mode. Data to be written from the CPU to SAR is also written to SARB.
Section 14 Direct Memory Access Controller (DMAC) 14.3.4 DMA Destination Address Registers (DARB0 to DARB3) DARB is 32-bit readable/writable registers that specify the destination address of a DMA transfer that is set in DAR again in repeat/reload mode. Data to be written from the CPU to DAR is also written to DARB.
Section 14 Direct Memory Access Controller (DMAC) 14.3.6 DMA Transfer Count Registers (TCRB0 to TCRB3) TCRB is 32-bit readable/writable registers. Data to be written from the CPU to TCR is also written to TCRB. While the HE function is used, TCRB are used as the initial value hold registers to detect HE.
Section 14 Direct Memory Access Controller (DMAC) 14.3.7 DMA Channel Control Registers (CHCR0 to CHCR5) CHCR is 32-bit readable/writable registers that control the DMA transfer mode. Bit: LCKN RPT[2:0] DVMD TS[2] Initial value: R/W: R/W R/(W)* R/W Bit: DM[1:0] SM[1:0] RS[3:0] TS[1:0] Initial value:...
Page 643
Section 14 Direct Memory Access Controller (DMAC) Initial Bit Name Value Descriptions 27 to 25 RPT[2:0] DMA Setting Renewal Specify These bits are enabled in CHCR0 to CHCR3. 000: Normal mode 001: Repeat mode SAR/DAR/TCR used as repeat area 010: Repeat mode DAR/TCR used as repeat area 011: Repeat mode SAR/TCR used as repeat mode...
Page 644
Section 14 Direct Memory Access Controller (DMAC) Initial Bit Name Value Descriptions DMA Transfer Size Specify With TS1 and TS0, this bit specifies the DMA transfer size. When the transfer source or transfer destination is a register of an on-chip peripheral module with a transfer size set, a proper transfer size for the register should be set.
Page 645
Section 14 Direct Memory Access Controller (DMAC) Initial Bit Name Value Descriptions R/(W)* Half End Flag After HIE (bit 18) is set to 1 and the number of transfers become half of TCR (1 bit shift to right) which is set before transfer starts, HE becomes 1.
Page 646
Section 14 Direct Memory Access Controller (DMAC) Initial Bit Name Value Descriptions Acknowledge Mode Selects whether DACK is output in data read cycle or in data write cycle. This bit is valid only in CHCR0 to CHCR3. 0: DACK output in read cycle 1: DACK output in write cycle Acknowledge Level Specifies whether the DACK signal output is high active...
Page 647
Section 14 Direct Memory Access Controller (DMAC) Initial Bit Name Value Descriptions 13, 12 SM[1:0] Source Address Mode Specify whether the DMA source address is incremented, decremented, or left fixed. 00: Fixed source address 01: Source address is incremented +1 in byte units transfer +2 in word units transfer +4 in longword units transfer +16 in 16-byte units transfer...
Page 648
Section 14 Direct Memory Access Controller (DMAC) Initial Bit Name Value Descriptions DREQ Level and DREQ Edge Select Specify the detecting method of the DREQ pin input and the detecting level. These bits are valid only in CHCR0 to CHCR3. In channels 0 to 3, also, if the transfer request source is specified as an on-chip peripheral module or if an auto- request is specified, these bits are invalid.
Page 649
Section 14 Direct Memory Access Controller (DMAC) Initial Bit Name Value Descriptions R/(W)* Transfer End Flag Shows that DMA transfer ends. The TE bit is set to 1 when data transfer ends when TCR becomes to 0. The TE bit is not set to 1 in the following cases. •...
Section 14 Direct Memory Access Controller (DMAC) 14.3.8 DMA Operation Register (DMAOR) DMAOR is a 16-bit readable/writable register that specifies the priority level of channels at the DMA transfer. This register shows the DMA transfer status. DMAOR is a common register for channel 0 to 5.
Page 651
Section 14 Direct Memory Access Controller (DMAC) Initial Bit Name Value Descriptions 9, 8 PR[1:0] Priority Mode 1, 0 Select the priority level between channels when there are transfer requests for multiple channels simultaneously. 00: CH0 > CH1 > CH2 > CH3 > CH4 > CH5 01: CH0 >...
Page 652
Section 14 Direct Memory Access Controller (DMAC) Initial Bit Name Value Descriptions NMIF R/(W)* NMI Flag Indicates that an NMI interrupt occurred. If this bit is set, DMA transfer is disabled even if the DE bit in CHCR and the DME bit in DMAOR are set to 1. When the NMI is input, the DMA transfer in progress can be done in at least one transfer unit.
Section 14 Direct Memory Access Controller (DMAC) 14.3.9 DMA Extended Resource Selectors (DMARS0 to DMARS2) DMARS is 16-bit readable/writable registers that specify the DMA transfer sources from peripheral modules in each channel. DMARS0 specifies for channels 0 and 1, DMARS1 specifies for channels 2 and 3, and DMARS2 specifies for channels 4 and 5.
Page 654
Section 14 Direct Memory Access Controller (DMAC) • DMARS1 Bit: C3MID[5:0] C3RID[1:0] C2MID[5:0] C2RID[1:0] Initial value: R/W: Initial Bit Name Value Descriptions 15 to 10 C3MID[5:0] 000000 Transfer request module ID for DMA channel 3 (MID) See table 14.4. 9, 8 C3RID[1:0] 00 Transfer request register ID0 for DMA channel 3 (RID) See table 14.4.
Section 14 Direct Memory Access Controller (DMAC) 14.4 Operation When there is a DMA transfer request, the DMAC starts the transfer according to the predetermined channel priority; when the transfer end conditions are satisfied, it ends the transfer. Transfers can be requested in three modes: auto request, external request, and on-chip peripheral module request.
Section 14 Direct Memory Access Controller (DMAC) When a transmit data empty transfer request of the SCIF0 is set as the transfer request, the transfer destination must be the SCIF0's transmit data register. Likewise, when receive data full transfer request of the SCIF0 is set as the transfer request, the transfer source must be the SCIF0's receive data register.
Page 660
Section 14 Direct Memory Access Controller (DMAC) DMA Transfer CHCR DMARS Request DMA Transfer RS[3:0] Source Request Signal Source Destination Mode SSI1 Transmit mode : DMRQ = 1 Cycle 1000 011101 SSITDR transmitter (Transmit data empty steal request) SSI1 Receive mode : DMRQ = 1 SSIRDR Cycle receiver...
Section 14 Direct Memory Access Controller (DMAC) 14.4.2 Channel Priority When the DMAC receives simultaneous transfer requests on two or more channels, it transfers data according to a predetermined priority. Two modes (fixed mode and round-robin mode) are selected by the bits PR[1:0] in DMAOR. Fixed Mode In this mode, the priority levels among the channels remain fixed.
Section 14 Direct Memory Access Controller (DMAC) Figure 14.3 shows how the priority changes when channel 0 and channel 3 transfers are requested simultaneously and a channel 1 transfer is requested during the channel 0 transfer. The DMAC operates as follows: 1.
Section 14 Direct Memory Access Controller (DMAC) 14.4.3 DMA Transfer Types DMA transfer type is dual address mode transfer. A data transfer timing depends on the bus mode, which has cycle steal mode and burst mode. Dual Address Modes In dual address mode, both the transfer source and destination are accessed by an address. The source and destination can be located externally or internally.
Section 14 Direct Memory Access Controller (DMAC) Auto request, external request, and on-chip peripheral module request are available for the transfer request. DACK can be output in read cycle or write cycle in dual address mode. CHCR can specify whether the DACK is output in read cycle or write cycle. Figure 14.5 shows an example of DMA transfer timing in dual address mode.
Section 14 Direct Memory Access Controller (DMAC) Bus Modes There are two bus modes: cycle steal mode and burst mode. Select the mode in the TB and LCKN bits in CHCR. And cycle steal mode has normal and intermittent modes that are specified by the CMS bits in DMAOR.
Section 14 Direct Memory Access Controller (DMAC) DREQ Busmastership retured to CPU once SuperHyway DMAC DMAC DMAC DMAC bus cycle Read Write Read Write Figure 14.7 DMA Transfer Timing Example in Cycle-Steal Normal Mode 2 (DREQ Low Level Detection) Intermittent mode 16 (DMAOR.CMS = 10, CHCR.LCKN = 0 or 1, CHCR.TB = 0), intermittent mode 64 (DMAOR.CMS = 11, CHCR.LCKN = 0 or 1, CHCR.TB = 0) In intermittent mode of cycle steal, the DMAC returns the SuperHyway bus mastership to other bus master whenever a one-transfer unit (byte, word, longword, or 16-byte or 32-byte...
Section 14 Direct Memory Access Controller (DMAC) • Burst Mode (LCKN = 0, TB = 1) In burst mode, once the DMAC obtains the SuperHyway bus mastership, the transfer is performed continuously without releasing the bus mastership until the transfer end condition is satisfied.
Section 14 Direct Memory Access Controller (DMAC) Table 14.9 DMA Transfer Matrix in Auto-Request Mode (all channels) Transfer Destination On-chip peripheral Transfer Source LBSC space DDRIF space PCIC space module* L RAM LBSC space DDRIF space PCIC space On-chip peripheral module* L RAM [Legend]...
Section 14 Direct Memory Access Controller (DMAC) Table 14.10 DMA Transfer Matrix in External Request Mode (only channels 0 to 3) Transfer Destination On-chip peripheral Transfer Source LBSC space DDRIF space PCIC space module* L RAM LBSC space Yes* Yes* DDRIF space Yes* Yes*...
Section 14 Direct Memory Access Controller (DMAC) Table 14.11 DMA Transfer Matrix in On-Chip Peripheral module Request Mode Transfer Destination On-chip peripheral Transfer Source LBSC space DDRIF space PCIC space module* L RAM LBSC space DDRIF space PCIC space On-chip peripheral module* L RAM [Legend]...
Section 14 Direct Memory Access Controller (DMAC) 14.4.5 Repeat Mode Transfer In a repeat mode transfer, a DMA transfer is repeated without specifying the transfer settings every time before executing a transfer. Using a repeat mode transfer with the half end function allows a double buffer transfer executed virtually.
Section 14 Direct Memory Access Controller (DMAC) 5. Hereafter, steps 2 and 4 are repeated until the DME or DE bit is cleared to 0, or an NMI interrupt is generated. Note that if the HE bit is not cleared in the procedure 3 or if the TE bit is not cleared in the procedure 4, then the transfer is stopped according to the condition of both the HE and the TE bits are set to 1.
Section 14 Direct Memory Access Controller (DMAC) 14.4.7 DREQ Pin Sampling Timing Figures 14.13 to 14.16 show the sample timing of the DREQ input in each bus mode, respectively. CKOUT DMAC Bus cycle DREQ (Rising edge) 1st acceptance 2nd acceptance DRAK (Low-active) DACK...
Section 14 Direct Memory Access Controller (DMAC) Figure 14.17 shows the timing of the TEND output. CLKOUT Last DMA transfer Bus cycle DMAC DMAC DREQ DACK (Active-high) TEND (Active-high) Figure 14.17 DMA Transfer End Signal (Cycle Steal Mode Level Detection) Note that the DACK output and TEND output are divided to align the data when an 8-bit or 16-bit external device is accessed in longword units, or when an 8-bit external device is accessed in word units.
Section 14 Direct Memory Access Controller (DMAC) CLKOUT Address Data DACKn (Active-low) TENDn (Active-low) WAIT Note: TEND is asserted during the last transfer unit of the DMA transfer. When the transfer unit is divided into several bus cycles and CS is negated between bus cycles, TEND is also divided.
Section 14 Direct Memory Access Controller (DMAC) 14.5 Usage Notes Pay attentions to the following notes when the DMAC is used. 14.5.1 Module Stop While DMAC is in operation, modules should not be stopped by setting MSTPCR (transition to the module standby state). When modules are stopped, transfer contents cannot be guaranteed. 14.5.2 Address Error When a DMA address error is occurred, after execute the following procedure, and then start a...
Section 14 Direct Memory Access Controller (DMAC) 14.5.4 DACK and TEND Output Divisions The DACK and TEND output are divided to align the data unit like the CSn output when a DMA transfer unit is divided with multiple bus cycles, for example when an 8-bit or 16-bit external device is accessed in longword units, or when an 8-bit external device is accessed in word units, and the CSn output is negated between these bus cycles.
Page 682
Section 14 Direct Memory Access Controller (DMAC) The transfer destination is the LBSC space and the DACK and TEND are output during the write cycle: Set B'001 to B'111 (i.e., other than 000) to the IWW bits in CSnBCR Note: * The transfer source is the LBSC space and the DACK is output during the read cycle or the transfer destination is the LBSC space and the DACK is output during the write cycle.
Section 14 Direct Memory Access Controller (DMAC) Table 14.12 Register Setting for SRAM, Burst ROM, Byte Control SRAM Interface. Register Setting of CSn is not negated Bus Width DMA Transfer Bus Cycle CSnBCR.IWRRD, [bit] Access Size Number IWRRS or IWW CSnWCR.ADS and ADH Byte Word...
Section 14 Direct Memory Access Controller (DMAC) Table 14.13 Register Setting for PCMCIA Interface Bus Width DMA Transfer Bus Cycle Register Setting of CSn is not negated [bit] Access Size Number CSnWCR.ADS and ADH Byte Word Longword 16-Byte B'000 32-Byte Byte Word Longword...
Section 14 Direct Memory Access Controller (DMAC) 14.5.7 DMA Transfer to DMAC Prohibited Do not perform DMA transfer with the DMAC register specified as the transfer source or transfer destination. 14.5.8 NMI Interrupt When an NMI interrupt occurs, the DMA transfer is stopped. After returning from the NMI interrupt routine, set all channels again, and then restart the DMA transfer.
Page 686
Section 14 Direct Memory Access Controller (DMAC) Rev. 1.00 Oct. 01, 2007 Page 620 of 1956 REJ09B0256-0100...
Section 15 External CPU Interface (EXCPU) Section 15 External CPU Interface (EXCPU) The DDR-SDRAM space in this LSI and internal registers of this LSI can be accessed by a CPU externally connected to the LSI (hereinafter, simply referred to as “external CPU”). Access by an external CPU is implemented using the MPX protocol.
Section 15 External CPU Interface (EXCPU) 15.2 Input/Output Pins Table 15.1 shows the pin configuration of the EXCPU. Table 15.1 Pin Configuration Pin Name Symbol Description EX_CS0 Chip select 0 Input Indicates access to the DDR-SDRAM space EX_CS1 Chip select 1 Input Indicates access to an internal register of this EX_BS...
Section 15 External CPU Interface (EXCPU) 15.3 Register Descriptions Table 15.2 shows the EXCPU register configuration. Table 15.3 shows the register states in each operating mode. Table 15.2 Register Configuration Abbrevia- Area P4 Area 7 Access Register Name tion Address Address Size External CPU control register...
Section 15 External CPU Interface (EXCPU) 15.3.1 External CPU Control Register (EXCCTRL) EXCCTRL indicates whether an external CPU is connected and sets the type of the external CPU. Bit: − − − − − − − − − − − −...
Section 15 External CPU Interface (EXCPU) 15.3.2 External CPU Memory Space Select Register (EXCMSETR) EXCMSETR sets the base address used when the internal memory space of this LSI is accessed by the external CPU. Bit: − − − − − −...
Section 15 External CPU Interface (EXCPU) 15.3.3 External CPU Interrupt Output Control Register (EXCINOR) EXCINOR is used to generate an interrupt to the external CPU from this LSI. Bit: − − − − − − − − − − − −...
Section 15 External CPU Interface (EXCPU) 15.4 Operation With this LSI, a CPU externally connected to the LSI (an external CPU) is allowed to access the DDR-SDRAM space or internal registers of the LSI by using the MPX protocol. The external CPU becomes ready to access the space in this LSI after this sequence: an access request (BREQ) from the external CPU is accepted by the LBSC, the local bus is released, and an access acknowledgement (BACK) is returned to the external CPU.
Section 15 External CPU Interface (EXCPU) Data Alignment Conversion for the External CPU For the external CPU, the EXCPU performs data alignment conversion with the same endian as this LSI. This conversion supports both big endian, where the upper byte is placed at the smaller address, and little endian, where the lower byte is placed at the smaller address.
Section 15 External CPU Interface (EXCPU) Table 15.5 Access and Data Alignment for Big Endian EX_AD31 to EX_AD23 to EX_AD15 to EX_AD7 to EX_AD24 EX_AD16 EX_AD8 EX_AD0 Byte access to address 0 Data 7 to data 0 Byte access to address 1 Data 7 to data 0 Byte access to address 2 Data 7 to data 0...
Section 15 External CPU Interface (EXCPU) Timing Charts of External CPU Access External CPU access through the EXCPU is done through handshaking of the access request (BREQ) and access acknowledge (BACK) signals. Figures 15.2 and 15.3 show the access timing of the EXCPU and external CPU. Read access CLKOUT BREQ...
Section 15 External CPU Interface (EXCPU) Read access CLKOUT BREQ BACK EX_CS0 EX_BS EX_FRAME EX_RDWR High EX_AD[31:0] EX_RDY Write access CLKOUT BREQ BACK EX_CS0 EX_BS EX_FRAME EX_RDWR EX_AD[31:0] EX_RDY Figure 15.3 External CPU Access (Burst Access) Configuration of Connection to the External CPU Figure 15.4 shows the configuration of the connection between the external CPU and this LSI.
Section 15 External CPU Interface (EXCPU) This LSI MD10 SH7750/7751 EXCPU BS/EX_BS CS2/EX_CS1 CS1/EX_CS0 RD/FRAME/EX_FRAME RD/FRAME RDWR/EX_RDWR RDWR D31/EX_AD31 to DATA31 to D0/EX_AD0 DATA0 A25/EX_SIZE2 to DATA31 to A23/EX_SIZE0 DATA29 RDY/EX_RDY EX_INT LBSC BREQ BSREQ BACK BSACK Figure 15.4 Configuration of Connection with External CPU Rev.
Section 16 Clock Pulse Generator (CPG) Section 16 Clock Pulse Generator (CPG) The CPG generates clocks provided to the on-chip peripheral modules and external bus interface of this LSI, and controls the power-down mode function. The CPG consists of an oscillator, PLL circuits, frequency dividers, and control circuits.
Section 16 Clock Pulse Generator (CPG) A block diagram of the CPG is shown in figure 16.1. DDR clock (DDRck0) Divider 2 (DDRck90) ×1/4 (DDRck180) PLL cicuit 3 (DDRck270) ×4 PLL circuit 2 CLKOUT ×1 Bus clock Divider 1 (Bck) ×1/4 CPU clock Crystal...
Page 701
Section 16 Clock Pulse Generator (CPG) The functions of the blocks in the CPG are as follows. PLL Circuit 1 PLL circuit 1 multiples the frequency of the crystal oscillator or the clock input from the EXTAL pin by the ratio of ×16. The multiplication ratio is selected by the combination of mode control pins MD0, MD1, and MD2.
Section 16 Clock Pulse Generator (CPG) Module Stop Registers 0, 1(MSTPCR0 and MSTPCR1) The module stop registers have control bits for running/stopping the individual peripheral modules. (10) Standby Control Register (STBCR) The standby control register has bits for controlling the power-down modes. 16.2 Input/Output Pins Table 16.1 lists the CPG pin configuration.
Section 16 Clock Pulse Generator (CPG) 16.3 Clock Operating Mode Table 16.2 shows the relationship between the mode control pin (MD0, MD1, and MD2) combinations and the clock operating mode after a power-on reset. Table 16.2 Clock Operating Modes External pin Clock EXTAL combination*...
Section 16 Clock Pulse Generator (CPG) 16.4 Register Descriptions Table 16.3 shows the CPG register configuration. Table 16.4 shows the register states in each operating mode. Table 16.3 Register Configuration Abbrevia- Area P4 Area 7 Access Register Name tion Address Address Size Frequency control register...
Section 16 Clock Pulse Generator (CPG) 16.4.1 Frequency Control Register (FRQCR) FRQCR is a 32-bit read-only register used to confirm the division ratios for the CPU clock (Ick), SHwy clock (SHck), peripheral clocks (Pck0, Pck1), and the bus clock (Bck) after a power-on reset.
Page 706
Section 16 Clock Pulse Generator (CPG) Initial Bit Name Value Description — Reserved This bit is always read as 0. 2 to 0 P1FC[2:0] 101 Peripheral Clock 1 (Pck1) Frequency Division Ratio 101: ×1/16 Rev. 1.00 Oct. 01, 2007 Page 640 of 1956 REJ09B0256-0100...
Section 16 Clock Pulse Generator (CPG) 16.4.2 PLL Control Register (PLLCR) PLLCR is a 32-bit readable/writable register that enables or disables clock output from the CLKOUT pin. PLLCR can be accessed only in longwords. Bit: − − − − − −...
R = 0 Ω Avoid crossing signal lines EXTAL XTAL SH7763 Note: The values for CL1, CL2, and the damping resistance should be determined after consultation with the crystal resonator manufacturer. Figure 16.2 Notes on Using Crystal Resonator Notes on Inputting External Clock via EXTAL Pin Make no connection to the XTAL pin.
Section 17 Watchdog Timer and Reset (WDT) Section 17 Watchdog Timer and Reset (WDT) The reset and watchdog timer (WDT) control circuit comprises the reset control unit and WDT control unit which control the power-on reset sequence and a reset for on-chip peripheral modules and external devices.
Section 17 Watchdog Timer and Reset (WDT) 17.2 Input/Output Pins Table 17.1 shows the pin configuration of the reset control unit. Table 17.1 Pin Configuration Pin name Function Description PRESET Power-on reset input Input Power-on reset occurs at low-level MRESET Manual reset input Input Manual reset occurs at low-level...
Section 17 Watchdog Timer and Reset (WDT) 17.3 Register Descriptions Table 17.2 shows the registers of the reset and watchdog timer. Table 17.3 shows the register state in each operating mode. Table 17.2 Register Configuration Access Register Name Abbreviation R/W P4 Address Area 7 Address Size...
Section 17 Watchdog Timer and Reset (WDT) 17.3.1 Watchdog Timer Stop Time Register (WDTST) WDTST is a readable/writable 32-bit register that specifies the time until a watchdog timer overflows. The time until WDTCNT overflows becomes the minimum value when set H'001 to the bits 11 to 0, and the maximum value when set H'000 to the bits 11 to 0.
Section 17 Watchdog Timer and Reset (WDT) 17.3.2 Watchdog Timer Control/Status Register (WDTCSR) WDTCSR is a readable/writable 32-bit register that comprises the timer mode-selecting bit and overflow flags. Use a longword access to write to the WDTCSR, with H'A5 in the bits 31 to 24. The reading value of bits 31 to 24 is always H'00.
Page 717
Section 17 Watchdog Timer and Reset (WDT) Initial Bit Name Value Description RSTS Reset Select Specifies the kind of reset to be performed when WDTCNT overflows in watchdog timer mode. This setting is ignored in interval timer mode. 0: Power-on reset 1: Manual reset WOVF Watchdog Timer Overflow Flag...
Section 17 Watchdog Timer and Reset (WDT) 17.3.3 Watchdog timer Base Stop Time Register (WDTBST) WDTBST is a readable/writable 32-bit register that clears WDTBCNT. Use a longword access to clear the WDTBCNT, with H'A5 in the bits 31 to 24. The reading value of bits WDTBST is always H'0000 0000.
Section 17 Watchdog Timer and Reset (WDT) 17.3.4 Watchdog Timer Counter (WDTCNT) WDTCNT is a 32-bit read-only register that comprises 12-bit watchdog timer counter and counts up on the WDTBCNT overflow signal. When WDTCNT overflows, a reset is generated in watchdog timer mode, or an interrupt is generated in interval timer mode.
Section 17 Watchdog Timer and Reset (WDT) 17.4 Operation 17.4.1 Reset request Power-on reset and manual reset are available. These sources are follows. Power-on reset 1. Reset sources • Input low level via PRESET pin. • The WDTCNT overflows when the WT/IT bit in the WDTCSR is 1, and the RSTS bit is 0. •...
Section 17 Watchdog Timer and Reset (WDT) Manual reset 1. Reset sources • Input low level via MRESET pin. • When a general exception other than a user break occurs while the BL bit is set to 1 in SR •...
Section 17 Watchdog Timer and Reset (WDT) 4. During operation in watchdog timer mode, clear to the WDTCNT or WDTBCNT periodically so that WDTCNT does not overflow. See section 17.4.5, Clearing WDT Counter for WDT counter clear method. 5. When the WDTCNT overflows, the WDT sets the WOVF flag in WDTCSR to 1, and generates a reset of the type specified by the RSTS bit.
Section 17 Watchdog Timer and Reset (WDT) WDT mode: Interval timer mode: Clear counter after WDTCNT Clear counter when overflowed value reset operation Setting value of WDTST Counting up with overflow signal of WDTBCNT H'0000 0000 Time WDTBCNT Clear counter value when overflowed H'0003 FFFF...
Section 17 Watchdog Timer and Reset (WDT) WDTBCNT is an 18-bit up-counter operated on the peripheral clock0 (Pck0). WDTBCNT is cleared when H'55 is set to the bits 31 to 24 in WDTBST. If the peripheral clock frequency is 66.6 MHz, the WDTBCNT overflow time is approximately ×...
Section 17 Watchdog Timer and Reset (WDT) 17.5 Status Pin Change Timing during Reset 17.5.1 Power-On Reset by PRESET A power-on reset is to initialize the on-chip PLL circuit when this LSI goes to the power-on reset state by the PERSET pin low level input and then it is necessary to ensure the synchronization settling time of the PLL circuit.
Section 17 Watchdog Timer and Reset (WDT) PRESET input during normal operation It is necessary to ensure the PLL oscillation settling time when the PRESET input during normal operation. EXTAL input CLKOUT output PRESET input STATUS[1:0] LL (normal) HH (reset) LL (normal) output PLL oscillation...
Section 17 Watchdog Timer and Reset (WDT) 17.5.2 Power-On Reset by Watchdog Timer Overflow The power-on reset time (watchdog timer reset holding time) by the watchdog timer overflowed is 3774 clock cycles of the EXTAL pin input clock and thereafter equal to or more than 45 clock cycles of the peripheral clock (Pck0).
Section 17 Watchdog Timer and Reset (WDT) 17.5.3 Manual Reset by Watchdog Timer Overflow The manual reset time (watchdog timer manual reset holding time) by the watchdog timer overflowed is equal to or more than 3774 clock cycles of the EXTAL pin input clock. The transition time from watchdog timer overflowed to manual reset state (watchdog timer reset setup time) is 1 clock cycle of the EXTAL input and thereafter equal to or more than 5 clock cycles of the peripheral clock (Pck0).
Section 18 Power-Down Mode Section 18 Power-Down Mode In power-down modes, operations of the CPU and some of the on-chip peripheral modules are stopped to reduce power consumption. 18.1 Features • Supports sleep mode and module standby mode • Supports RTC power supply backup mode where the power supply for only the RTC is held and other power supplies are turned off •...
Section 18 Power-Down Mode Table 18.1 lists the states of the CPU and on-chip peripheral modules in each mode. Table 18.1 States in Power-Down Modes State On-Chip Peripheral Power- Module On-Chip DDR- Down Transition CPG CPU Memory SDRAM Mode Condition Others Cancellation Sleep...
Section 18 Power-Down Mode 4. Hi-Z state, except for the RTC module interface pins 5. Undefined, except for DDR-SDRAM interface pins 6. AR: auto-refresh: SR: self-refresh 7. S1 and S0 are the output states on the STATUS1 and STATUS0 pins, respectively. 8.
Section 18 Power-Down Mode 18.3 Register Descriptions Table 18.3 shows the register configuration for power-down modes. Table 18.4 shows the register states in each operating mode. Table 18.3 Register Configuration Area P4 Area 7 Access Register Name Abbreviation R/W Address Address Size Standby control register...
Section 18 Power-Down Mode 18.3.1 Standby Control Register (STBCR) STBCR is a 32-bit readable/writable register that selects a power-down mode to be entered after a SLEEP instruction is executed. STBCR can be accessed only in longwords. Bit: − − − −...
Section 18 Power-Down Mode 18.3.2 Module Stop Register 0 (MSTPCR0) MSTPCR0 is a 32-bit readable/writable register that can individually start or stop the module assigned to each bit. MSTPCR0 can be accessed only in longwords. Bit: — — — — —...
Section 18 Power-Down Mode 18.3.3 Module Stop Register 1 (MSTPCR1) MSTPCR1 is a 32-bit readable/writable register that can individually start or stop the module assigned to each bit. MSTPCR1 can be accessed only in longwords. Bit: — STIF1 STIF0 SSI3 SSI2 SSI1 SSI0...
Page 740
Section 18 Power-Down Mode Initial Bit Name Value Description STIF1 STIF1 Module Stop Bit When set to 1, the clock supply to the STIF1 module is halted. 0: STIF1 operates 1: Clock supply to STIF1 is halted STIF0 STIF0 Module Stop Bit When set to 1, the clock supply to the STIF0 module is halted.
Page 741
Section 18 Power-Down Mode Initial Bit Name Value Description IIC1 IIC1 Module Stop Bit When set to 1, the clock supply to the IIC1 module is halted. 0: IIC1 operates 1: Clock supply to IIC1 is halted IIC0 IIC0 Module Stop Bit When set to 1, the clock supply to the IIC0 module is halted.
Page 742
Section 18 Power-Down Mode Initial Bit Name Value Description SCIF1 SCIF1 Module Stop Bit When set to 1, the clock supply to the SCIF1 module is halted. 0: SCIF1 operates 1: Clock supply to SCIF1 is halted SCIF0 SCIF0 Module Stop Bit When set to 1, the clock supply to the SCIF0 module is halted.
Page 743
Section 18 Power-Down Mode Initial Bit Name Value Description TMU1 TMU1 Module Stop Bit When set to 1, the clock supply to the TMU1 module is halted. 0: TMU1 operates 1: Clock supply to TMU1 is halted TMU0 TMU0 Module Stop Bit When set to 1, the clock supply to the TMU0 module is halted.
Section 18 Power-Down Mode 18.4 Sleep Mode 18.4.1 Transition to Sleep Mode Executing the SLEEP instruction when the STBY bit in STBCR is 0 causes a transition from the program execution state to sleep mode. Although the CPU halts immediately after executing the SLEEP instruction, the contents of the CPU registers remain unchanged.
Section 18 Power-Down Mode 18.5 Software Standby Mode 18.5.1 Transition to Software Standby Mode Executing the SLEEP instruction when the STBY bit in STBCR is 1 causes a transition from the program execution state to software standby mode. In software standby mode, not only the CPU but also the clock and on-chip peripheral modules halt.
Section 18 Power-Down Mode 18.6 Module Standby Mode 18.6.1 Transition to Module Standby Mode Setting the bits in the module stop register to 1 halts the clock supply to the corresponding on-chip peripheral modules. This function can be used to reduce power consumption in normal mode. Modules in module standby mode keep the state immediately before the transition to the module standby mode.
Section 18 Power-Down Mode 18.7 DDR-SDRAM Power Supply Backup 18.7.1 Control of Self-Refresh and Initialization To preserve the contents of the DDR-SDRAM with battery backup, make sure that the DDR- SDRAM is in the self-refresh mode before turning off the system power supply. When the system power supply is turned on, initialization of the DDR-SDRAM or cancellation of the self-refresh mode must be performed according to whether the DDR-SDRAM has been in self-refresh mode or has not been initialized.
Section 18 Power-Down Mode Transition to self-refresh System power System power Power-on M_CKE asserted mode completed supply supply reset by SMS bits in SCR turned off turned on canceled PRESET Delay time of LSI internal reset DDRIF reset (1.2 V, 3.3 V) M_CKE M_BKPRST Figure 18.1 DDR-SDRAM Interface Operation when...
Section 18 Power-Down Mode After the system power supply is turned on, the M_CKE output may remain unstable until the clock is supplied after the LSI power supply has become stable. Therefore, use the M_BKPRST signal to keep the M_CKE signal input of the DDR-SDRAM low until the power-on reset is canceled.
Section 18 Power-Down Mode 18.8 RTC Power Supply Backup 18.8.1 Transition to RTC Power Supply Backup Mode When entering the RTC power supply backup mode with the VDD power supply (1.2 V) turned off, the VDD power supply should be turned off while the XRTCSTBI signal is held low. By turning off the VDD power supply, the currents that might be generated in the VDD (1.2 V) operating region can be eliminated to reduce power consumption.
Section 18 Power-Down Mode System power supply System power supply turned off turned on High-level VDD-RTC RTC battery backup state RTC standby XRTCSTBI Power-on reset canceled PRESET (1) Oscillation stabilization time at power-on (2) Reset delay time at the RTC Figure 18.3 Sequence for Turning VDD Power Supply (1.2 V) On/Off 18.9 STATUS Pin Signal Change Timing...
Section 19 Timer Unit (TMU) Section 19 Timer Unit (TMU) This LSI includes an on-chip 32-bit timer unit (TMU), which has six channels (channels 0 to 5). 19.1 Features The TMU has the following features. • Auto-reload type 32-bit down-counter provided for each channel •...
Section 19 Timer Unit (TMU) Figure 19.1 shows a block diagram of the TMU. RESET, TCLK RTCCLK TUNI0, 1, 3, Pck/4, Pck/16, STBY etc. 4, and 5 Pck/64* TUNI2 TUNI2 TCLK operation Prescaler controller controller To each To channels channel 0 to 2 TOCR TSTR...
Section 19 Timer Unit (TMU) 19.3.1 Timer Output Control Register (TOCR) TOCR is an 8-bit read-only register that specifies whether external pin TMU_TCLK is used as the external clock or input capture control input pin. BIt: — — — — —...
Section 19 Timer Unit (TMU) 19.3.2 Timer Start Register (TSTR) TSTR is an 8-bit readable/writable register that specifies whether TCNT in each channel is operated or stopped. • TSTR0 BIt: — — — — — STR2 STR1 STR0 Initial value: R/W: Initial Bit Name...
Page 760
Section 19 Timer Unit (TMU) • TSTR1 BIt: — — — — — STR5 STR4 STR3 Initial value: R/W: Initial Bit Name Value Description 7 to 3 — All 0 Reserved These bits are always read as 0. The write value should always be 0.
Section 19 Timer Unit (TMU) 19.3.3 Timer Constant Register (TCORn) (n = 0 to 5) The TCOR registers are 32-bit readable/writable registers. When a TCNT counter underflows while counting down, the TCOR value is set in that TCNT, which continues counting down from the set value.
Section 19 Timer Unit (TMU) 19.3.5 Timer Control Registers (TCRn) (n = 0 to 5) The TCR registers are 16-bit readable/writable registers. Each TCR selects the count clock, specifies the edge when an external clock is selected, and controls interrupt generation when the flag indicating TCNT underflow is set to 1.
Page 763
Section 19 Timer Unit (TMU) Initial Bit Name Value Description ICPE1* Input Capture Control ICPE0* These bits, provided in channel 2 only, specify whether the input capture function is used, and control enabling or disabling of interrupt generation when the function is used.
Section 19 Timer Unit (TMU) Initial Bit Name Value Description TPSC2 Timer Prescaler 2 to 0 TPSC1 These bits select the TCNT count clock. TPSC0 000: Counts on Pck0/4 001: Counts on Pck0/16 010: Counts on Pck0/64 011: Counts on Pck0/256 100: Counts on Pck0/1024 101: Setting prohibited 110: Counts on on-chip RTC output clock...
Section 19 Timer Unit (TMU) 19.4 Operation Each channel has a 32-bit timer counter (TCNT) and a 32-bit timer constant register (TCOR). Each TCNT performs count-down operation. The channels have an auto-reload function that allows cyclic count operations, and can also perform external event counting. Channel 2 also has an input capture function.
Section 19 Timer Unit (TMU) Select operation Select the count clock with the TPSC2 to TPSC0 bits Select count clock in TCR. When the external clock (TCLK) is selected, specify the external clock edge with the CKEG1 and CKEG0 bits in TCR. Underflow interrupt Specify whether an interrupt is to be generated on generation setting...
Section 19 Timer Unit (TMU) Auto-Reload Count Operation Figure 19.3 shows the TCNT auto-reload operation. TCNT value TCOR value set in TCNT on underflow TCOR H'0000 0000 Time STR0 to STR5 Figure 19.3 TCNT Auto-Reload Operation TCNT Count Timing • Operating on internal clock Any of five count clocks (Pck0/4, Pck0/16, Pck0/64, Pck0/256, or Pck0/1024) scaled from the peripheral clock can be selected as the count clock by means of the TPSC2 to TPSC0 bits in TCR.
Section 19 Timer Unit (TMU) • Operating on external clock In channels 0, 1, and 2, the external clock pin (TCLK) input can be selected as the timer clock by means of the TPSC2 to TPSC0 bits in TCR. The detected edge (rising, falling, or both edges) can be selected with the CKEG1 and CKEG0 bits in TCR.
Section 19 Timer Unit (TMU) 19.4.2 Input Capture Function Channel 2 has an input capture function. The procedure for using the input capture function is as follows: 1. Use bits TPSC2 to TPSC0 in TCR to set an internal clock as the timer operating clock. 2.
Section 19 Timer Unit (TMU) 19.5 Interrupts There are seven TMU interrupt sources: underflow interrupts and the input capture interrupt when the input capture function is used. Underflow interrupts are generated on each of the channels, and input capture interrupts on channel 2 only. An underflow interrupt request is generated (for each channel) when both the UNF bit and the interrupt enable bit (UNIE) for that channel are set to 1.
Section 19 Timer Unit (TMU) 19.6 Usage Notes 19.6.1 Register Writes When writing to a TMU register, timer count operation must be stopped by clearing the start bit (STR5 to STR0) for the relevant channel in TSTR. Note that TSTR can be written to, and the UNF and ICPF bits in TCR can be cleared while the count is in progress.
Page 772
Section 19 Timer Unit (TMU) Rev. 1.00 Oct. 01, 2007 Page 706 of 1956 REJ09B0256-0100...
Section 20 16-Bit Timer Pulse Unit (TPU) Section 20 16-Bit Timer Pulse Unit (TPU) This LSI has an on-chip 16-bit timer pulse unit (TPU) that comprises four 16-bit timer channels. 20.1 Features • Maximum 4-pulse output A total of 16 timer general registers (TGRA to TGRD × 4 ch.) are provided (four each for channels).
Section 20 16-Bit Timer Pulse Unit (TPU) 20.3 Register Descriptions Table 20.3 shows the TPU register configuration. Table 20.4 shows the register state in each operating mode. Table 20.3 Register Configuration Area P4 Area 7 Access Register Name Abbreviation Address* Address* Size Timer start register...
Page 778
Section 20 16-Bit Timer Pulse Unit (TPU) Area P4 Area 7 Access Register Name Abbreviation Address* Address* Size Timer interrupt enable register_2 TIER_2 H'FFE2 809C H'1FE2 809C 16 Timer status register_2 TSR_2 H'FFE2 80A0 H'1FE2 80A0 16 Timer counter_2 TCNT_2 H'FFE2 80A4 H'1FE2 80A4 16 Timer general register A_2 TGRA_2...
Section 20 16-Bit Timer Pulse Unit (TPU) 20.3.1 Timer Control Registers (TCR) The TCR registers are 16-bit registers that control the TCNT channels. The TPU has four TCR registers, one for each of channels 0 to 3. The TCR registers are initialized to H'0000 by a reset, but not initialized in standby mode, sleep mode, or module standby.
Section 20 16-Bit Timer Pulse Unit (TPU) Initial Bit Name Value Description 4, 3 CKEG[1:0] 00 Clock Edge These bits select the input clock edge. When the input clock is counted using both edges, the input clock period is halved (e.g.
Section 20 16-Bit Timer Pulse Unit (TPU) 20.3.2 Timer Mode Registers (TMDR) The TMDR registers are 16-bit readable/writable registers that are used to set the operating mode for each channel. The TPU has four TMDR registers, one for each channel. The TMDR registers are initialized to H'0000 by a reset, but not initialized in standby mode, sleep mode, or module standby.
Page 786
Section 20 16-Bit Timer Pulse Unit (TPU) Initial Bit Name Value Description Reserved This bit is always read as 0 and cannot be modified. 2 to 0 MD[2:0] Modes These bits are used to set the timer operating mode. 000: Normal operation 001: Reserved (setting prohibited) 010: PWM mode...
Section 20 16-Bit Timer Pulse Unit (TPU) 20.3.3 Timer I/O Control Registers (TIOR) The TIOR registers are 16-bit registers that control the TPU_TO pin. The TPU has four TIOR registers, one for each channel. The TIOR registers are initialized to H'0000 by a reset, but not initialized in standby mode, sleep mode, or module standby.
Section 20 16-Bit Timer Pulse Unit (TPU) 20.3.4 Timer Interrupt Enable Registers (TIER) The TIER registers are 16-bit registers that control enabling or disabling of interrupt requests for each channel. The TPU has four TIER registers, one for each channel. The TIER registers are initialized to H'0000 by a reset, but not initialized in standby mode, sleep mode or module standby.
Page 790
Section 20 16-Bit Timer Pulse Unit (TPU) Initial Bit Name Value Description TG1EC TGR Interrupt Enable C Enables or disables interrupt requests by the TGFC bit when the TGFC bit in TSR is set to 1 (TCNT and TGRC compare match).
Section 20 16-Bit Timer Pulse Unit (TPU) 20.3.5 Timer Status Registers (TSR) The TSR registers are 16-bit registers that indicate the status of each channel. The TPU has four TSR registers, one for each channel. The TSR registers are initialized to H'0000 by a reset, but not initialized in standby mode, sleep mode or module standby mode.
Page 792
Section 20 16-Bit Timer Pulse Unit (TPU) Initial Bit Name Value R/W Description TCFV R/(W)* Overflow Flag Status flag that indicates that TCNT overflow has occurred. [Clearing condition] When 0 is written to TCFV after reading TCFV = 1 [Setting condition] When the TCNT value overflows (changes from H'FFFF to H'0000) TGFD...
Section 20 16-Bit Timer Pulse Unit (TPU) Initial Bit Name Value R/W Description TGFA R/(W)* Output Compare Flag A Status flag that indicates the occurrence of TGRA compare match. [Clearing conditions] When 0 is written to TGFA after reading TGFA = 1 [Setting conditions] When TCNT = TGRA Note:...
Section 20 16-Bit Timer Pulse Unit (TPU) 20.3.8 Timer Start Register (TSTR) TSTR is a 16-bit readable/writable register that selects TCNT operation/stoppage for channels 0 to 3. TSTR is initialized to H'0000 by a reset, but not initialized in standby mode, sleep mode, or module standby.
Section 20 16-Bit Timer Pulse Unit (TPU) 20.4 Operation 20.4.1 Overview Operation in each mode is outlined below. Normal Operation Each channel has a TCNT and TGR register. TCNT performs up-counting, and is also capable of free-running operation, synchronous counting, and external event counting. Buffer Operation When a compare match occurs, the value in the buffer register for the relevant channel is transferred to TGR.
Section 20 16-Bit Timer Pulse Unit (TPU) 20.4.2 Basic Functions Counter Operation When one of bits CST[0:3] is set to 1 in TSTR, the TCNT counter for the corresponding channel starts counting. TCNT can operate as a free-running counter, periodic counter, and so on. Example of count operation setting procedure Figure 20.2 shows an example of the count operation setting procedure.
Section 20 16-Bit Timer Pulse Unit (TPU) (b) Free-running count operation and periodic count operation Immediately after a reset, the TPU's TCNT counters are all designated as free-running counters. When the relevant bit in TSTR is set to 1 the corresponding TCNT counter starts up-count operation as a free-running counter.
Section 20 16-Bit Timer Pulse Unit (TPU) Figure 20.4 illustrates periodic counter operation. Counter cleared by TGRA TCNT value compare match H'0000 Time CST bit Flag cleared by software TGFA Figure 20.4 Periodic Counter Operation Waveform Output by Compare Match The TPU can perform 0, 1, or toggle output from the corresponding output pin (TPU_TO pin) using TGRA compare match.
Section 20 16-Bit Timer Pulse Unit (TPU) (b) Examples of waveform output operation Figure 20.6 shows an example of 0 output/1 output. In this example TCNT has been designated as a free-running counter, and settings have been made so that 1 is output by compare match A, and 0 is output by compare match B. When the set level and the pin level coincide, the pin level does not change.
Section 20 16-Bit Timer Pulse Unit (TPU) 20.4.3 Buffer Operation Buffer operation, enables TGRC and TGRD to be used as buffer registers. Table 20.8 shows the register combinations used in buffer operation. Table 20.8 Register Combinations in Buffer Operation Timer General Register Buffer Register TGRA TGRC...
Section 20 16-Bit Timer Pulse Unit (TPU) Example of Buffer Operation Setting Procedure Figure 20.9 shows an example of the buffer operation setting procedure. [1] Designate TGR for buffer operation with bits Buffer operation BFA and BFB in TMDR. [2] Set rewriting timing from the buffer register with Set buffer operation bit BFWT in TMDR.
Section 20 16-Bit Timer Pulse Unit (TPU) Example of Buffer Operation Figure 20.10 shows an operation example in which PWM mode has been designated for channel 0, and buffer operation has been designated for TGRA and TGRC. The settings used in this example are TCNT clearing by compare match B, 1 output at compare match A (TPU_TO pin), and 0 output at counter clearing.
Section 20 16-Bit Timer Pulse Unit (TPU) 20.4.4 PWM Modes In PWM mode, PWM waveforms are output from the output pins. 0, or 1, output can be selected as the output level in response to compare match of each TGRA. Designating TGRB compare match as the counter clearing source enables the period to be set in that register.
Section 20 16-Bit Timer Pulse Unit (TPU) Example of PWM Mode Setting Procedure Figure 20.11 shows an example of the PWM mode setting procedure. [1] Select the counter clock with bits TPSC2 to PWM mode TPSC0 in TCR. At the same time, select the input clock edge with bits CKEG1 and CKEG0 in TCR.
Section 20 16-Bit Timer Pulse Unit (TPU) Examples of PWM Mode Operation Figure 20.12 shows an example of PWM mode operation. In this example, TGRB compare match is set as the TCNT clearing source, 0 is set for the TGRA initial output value and output value, and 1 is set as the TGRA output value.
Section 20 16-Bit Timer Pulse Unit (TPU) 20.4.5 Phase Counting Mode In phase counting mode, the phase difference between two external clock inputs is detected and TCNT is incremented/decremented accordingly. This mode can be set for channels 2, and 3. When phase counting mode is set, an external clock is selected as the counter input clock and TCNT operates as an up/down-counter regardless of the setting of bits TPSC2 to TPSC0 and bits CKEG1 and CKEG0 in TCR.
Section 20 16-Bit Timer Pulse Unit (TPU) Example of Phase Counting Mode Setting Procedure Figure 20.14 shows an example of the phase counting mode setting procedure. [1] Select phase counting mode with bits MD3 to Phase counting mode MD0 in TMDR. [2] Set the external pin function in pin function controller (PFC).
Section 20 16-Bit Timer Pulse Unit (TPU) Examples of Phase Counting Mode Operation In phase counting mode, TCNT counts up or down according to the phase difference between two external clocks. There are four modes, according to the count conditions. Phase counting mode 1 Figure 20.15 shows an example of phase counting mode 1 operation, and table 20.10 summarizes the TCNT up/down-count conditions.
Section 20 16-Bit Timer Pulse Unit (TPU) 20.5 Usage Notes Note that the kinds of operation and contention described below can occur during TPU operation. Input Clock Restrictions The input clock pulse width must be at least 2 states in the case of single-edge detection, and at least 3 states in the case of both-edge detection.
Section 21 Compare Match Timer (CMT) Section 21 Compare Match Timer (CMT) This LSI includes a 32-bit compare match timer (CMT) of five channels (channel 0 to channel 4). 21.1 Features • 16 bits/32 bits can be selected. • Each channel is provided with an auto-reload up counter. •...
Section 21 Compare Match Timer (CMT) 21.2 Register Descriptions Table 21.2 shows the CMT register configuration. Table 21.3 shows the register state in each operating mode. Table 21.1 Register Configuration Area P4 Area 7 Access Register Name Abbreviation R/W Address* Address* Size Compare match timer start register...
Section 21 Compare Match Timer (CMT) 21.2.1 Compare Match Timer Start Register (CMSTR) CMSTR is a 16-bit register that selects whether the compare match timer counter (CMCNT) is operated or halted. Bit: ...
Section 21 Compare Match Timer (CMT) 21.2.2 Compare Match Timer Control/Status Register (CMCSR) CMCSR is a 16-bit register that indicates the occurrence of compare matches, enables interrupts and DMA transfer request, and sets the counter input clocks. Do not change bits other than bits CMF and OVF during the compare match timer counter (CMCNT) operation.
Page 819
Section 21 Compare Match Timer (CMT) Initial Bit Name Value Description 13 to 10 All 0 Reserved These bits are always read as 0. The write value should always be 0. Compare Match Timer Counter Size Selects whether the compare match timer counter (CMCNT) is used as a 16-bit counter or a 32-bit counter.
Section 21 Compare Match Timer (CMT) Initial Bit Name Value Description 2 to 0 CKS[2:0] All 0 Clock Select These bits select the clock input to CMCNT. When the STRn (n: 4 to 0) bit in CMSTR is set to 1, CMCNT begins incrementing with the clock selected by these bits.
Section 21 Compare Match Timer (CMT) 21.3 Operation 21.3.1 Counter Operation The CMT starts the operation of the counter by writing a 1 to the STRn bit in CMSTR of a channel that has been selected for operation. Complete all of the settings before starting the operation.
Section 21 Compare Match Timer (CMT) Value in CMCNT CMCOR H'00000000 Time CMF=1 OVF=1 (When an overflow is detected) Figure 21.3 Counter Operation (Free-Running Operation) 21.3.2 Counter Size In this module, the size of the counter is selectable as either 16 or 32 bits. This is selected by the CMS bit in CMCSR.
Section 21 Compare Match Timer (CMT) 21.3.4 DMA Transfer Requests and Internal Interrupt Requests to CPU The setting of bits CMR1 and CMR0 in CMCSR selects the sending of a request for a DMA transfer or for an internal interrupt to the CPU at a compare match. A DMA transfer request has different specifications according to the CMT channel as described below.
Page 824
Section 21 Compare Match Timer (CMT) Rev. 1.00 Oct. 01, 2007 Page 758 of 1956 REJ09B0256-0100...
Section 22 Realtime Clock (RTC) Section 22 Realtime Clock (RTC) This LSI includes an on-chip realtime clock (RTC) and a 32.768 kHz crystal oscillator for use by the RTC. 22.1 Features The RTC has the following features. • Clock and calendar functions (BCD display) Counts seconds, minutes, hours, day-of-week, days, months, and years.
Section 22 Realtime Clock (RTC) 22.4 Register Descriptions 22.4.1 64 Hz Counter (R64CNT) R64CNT is an 8-bit read-only register that indicates a state of 64 Hz to 1 Hz within the RTC frequency divider. If this register is read when a carry is generated from the 128 kHz frequency division stage, bit 7 (CF) in RTC control register 1 (RCR1) is set to 1, indicating the simultaneous occurrence of the carry and the 64 Hz counter read.
Section 22 Realtime Clock (RTC) 22.4.3 Minute Counter (RMINCNT) RMINCNT is an 8-bit readable/writable register used as a counter for setting and counting the BCD-coded minute value in the RTC. It counts on the carry generated once per minute by the second counter.
Section 22 Realtime Clock (RTC) 22.4.5 Day-of-Week Counter (RWKCNT) RWKCNT is an 8-bit readable/writable register used as a counter for setting and counting the BCD-coded day-of-week value in the RTC. It counts on the carry generated once per day by the hour counter.
Section 22 Realtime Clock (RTC) 22.4.6 Day Counter (RDAYCNT) RDAYCNT is an 8-bit readable/writable register used as a counter for setting and counting the BCD-coded day value in the RTC. It counts on the carry generated once per day by the hour counter.
Section 22 Realtime Clock (RTC) 22.4.7 Month Counter (RMONCNT) RMONCNT is an 8-bit readable/writable register used as a counter for setting and counting the BCD-coded month value in the RTC. It counts on the carry generated once per month by the day counter.
Section 22 Realtime Clock (RTC) 22.4.9 Second Alarm Register (RSECAR) RSECAR is an 8-bit readable/writable register used as an alarm register for the RTC's BCD-coded second value counter, RSECCNT. When the ENB bit is set to 1, the RSECAR value is compared with the RSECCNT value.
Section 22 Realtime Clock (RTC) 22.4.11 Hour Alarm Register (RHRAR) RHRAR is an 8-bit readable/writable register used as an alarm register for the RTC's BCD-coded hour value counter, RHRCNT. When the ENB bit is set to 1, the RHRAR value is compared with the RHRCNT value.
Section 22 Realtime Clock (RTC) Bits 6 to 3 are always read as 0. A write to these bits is invalid, but the write value should always be 0. Bit: — — — — Day-of-week code Initial value: — — —...
Section 22 Realtime Clock (RTC) 22.4.14 Month Alarm Register (RMONAR) RMONAR is an 8-bit readable/writable register used as an alarm register for the RTC's BCD- coded month value counter, RMONCNT. When the ENB bit is set to 1, the RMONAR value is compared with the RMONCNT value.
Page 839
Section 22 Realtime Clock (RTC) Initial Bit Name Value Description Undefined R/W Carry Flag This flag is set to 1 on generation of a second counter carry, or a 64 Hz counter carry when the 64 Hz counter is read. The count register value read at this time is not guaranteed, and so the count register must be read again.
Section 22 Realtime Clock (RTC) Initial Bit Name Value Description Undefined R/W Alarm Flag Set to 1 when the alarm time set in those registers among RSECAR, RMINAR, RHRAR, RWKAR, RDAYAR, and RMONAR in which the ENB bit is set to 1 matches the respective counter values.
Page 841
Section 22 Realtime Clock (RTC) Initial Bit Name Value Description Undefined R/W Periodic Interrupt Flag Indicates interrupt generation at the interval specified by bits PES2–PES0. When this flag is set to 1, a periodic interrupt is generated. 0: Interrupt is not generated at interval specified by bits PES2–PES0 [Clearing condition] When 0 is written to PEF...
Page 842
Section 22 Realtime Clock (RTC) Initial Bit Name Value Description 30-Second Adjustment Used for 30-second adjustment. When 1 is written to this bit, a value up to 29 seconds is rounded down to 00 seconds, and a value of 30 seconds or more is rounded up to 1 minute.
Section 22 Realtime Clock (RTC) 22.4.17 RTC Control Register (RCR3) and Year-Alarm Register (RYRAR) RCR3 and RYRAR are readable/writable registers. RYRAR is the alarm register for the RTC's BCD-coded year-value counter RYRCNT. When the YENB bit of RCR3 is set to 1, the RYRCNT value is compared with the RYRAR value.
Section 22 Realtime Clock (RTC) 22.5 Operation Examples of the use of the RTC are shown below. 22.5.1 Time Setting Procedures Figure 22.2 shows examples of the time setting procedures. Set RCR2.RESET to 1. Stop clock Clear RCR2.START to 0. Reset frequency divider Set second/minute/hour/day/ In any order.
Section 22 Realtime Clock (RTC) 22.5.2 Time Reading Procedures Figure 22.3 shows examples of the time reading procedures. Clear RCR1.CIE to 0. Disable carry interrupts Clear RCR1.CF to 0 Clear carry flag (Write 1 to RCR1.AF so that alarm flag is not cleared).
Section 22 Realtime Clock (RTC) 22.5.3 Alarm Function The use of the alarm function is illustrated in figure 22.4. Clock running Clear RCR1.AIE to prevent erroneous interrupts. Disable alarm interrupts Set alarm time Clear alarm flag Be sure to reset the flag as it may have been set during alarm time setting.
Section 22 Realtime Clock (RTC) 22.6 Interrupts There are three kinds of RTC interrupt: alarm interrupts, periodic interrupts, and carry interrupts. An alarm interrupt request (ATI) is generated when the alarm flag (AF) in RCR1 is set to 1 while the alarm interrupt enable bit (AIE) is also set to 1.
Section 22 Realtime Clock (RTC) This LSI EXTAL2 XTAL2 VDD-RTC VSS-RTC XTAL Noise filter 3.3 V Notes: 1. Select either the C or C side for the frequency adjustment variable capacitor according to requirements such as the adjustment range, degree of stability, etc. 2.
Section 23 Gigabit Ethernet Controller (GETHER) Section 23 Gigabit Ethernet Controller (GETHER) This LSI has an on-chip Gigabit Ethernet controller (GETHER) conforming to the Ethernet or the IEEE802.3 MAC (Media Access Control) layer standard. Connecting a physical-layer LSI (PHY- LSI) complying with this standard enables the GETHER to perform transmission and reception of Ethernet/IEEE802.3 frames.
Section 23 Gigabit Ethernet Controller (GETHER) 23.2 Input/Output Pins Table 23.1 lists the pin configuration of the GETHER. Table 23.1 Pin Configuration Name Port Abbreviation Function Transmit clock ET0_TX-CLK Input ET0_TX-EN, ET0_ETXD3 to ET0_ETXD0, ET0_TX-ER timing reference signal Transmit enable ET0_TX-EN Output Indicates that transmit data is ready on...
Page 852
Section 23 Gigabit Ethernet Controller (GETHER) Name Port Abbreviation Function RMII RMII0_MDC Output Reference clock signal for information management transfer via RMII0_MDIO in RMII mode data clock RMII RMII0_MDIO Bidirectional signal for exchange of management management information between STA data I/O and PHY in RMII mode RMII RMII0M0_MDC...
Page 853
Section 23 Gigabit Ethernet Controller (GETHER) Name Port Abbreviation Function RMII transmit RMII0_TXD0 Output 2-bit transmit data in RMII mode data RMII transmit RMII0_TXD1 Output 2-bit transmit data in RMII mode data Transmit clock ET1_TX-CLK Input ET1_TX-EN, ET1_ETXD3 to ET1_ETXD0, ET1_TX-ER timing reference signal Receive clock ET1_RX-CLK...
Page 854
Section 23 Gigabit Ethernet Controller (GETHER) Name Port Abbreviation Function RMII RMII1_MDIO Bidirectional signal for exchange of management management information between STA data I/O and PHY in RMII mode Link status ET1_LINKSTA Input Inputs link status from PHY-LSI Wake-On-LAN ET1_WOL Output Signal indicating reception of Magic Packet...
Page 855
Section 23 Gigabit Ethernet Controller (GETHER) Name Port Abbreviation Function RMII transmit RMII1M_TXD0 Output 2-bit transmit data in RMII mode(mirror data (mirror pin) pin) RMII transmit RMII1_TXD1 Output 2-bit transmit data in RMII mode (mirror data (mirror pin) pin) 125-MHz Common REF125CK Input Transmit clock generation signal in GMII...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3 Register Descriptions Table 23.2 shows the configuration of registers of the GETHER. Table 23.3 shows the state of registers in each processing mode. The last number of the abbreviation of a register, except for registers related to the CAM entry tables, corresponds to the number of the two Ethernet interface ports (port 0 or port 1).
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.1 Software Reset Register (ARSTR) ARSTR resets all blocks (E-MAC, TSU, and E-DMAC) in the GETHER. By writing 1 to the ARST bit in this register, a software reset is issued to all blocks of the GETHER (for 256 cycles of external bus clock Bck).
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.2 E-MAC Mode Register (ECMR) ECMR is a 32-bit readable/writable register that specifies the operating mode of the GETHER. The settings in this register are normally made in the initialization process following a reset. The operating mode setting must not be changed while the transmitting and receiving functions are enabled.
Page 875
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description RCSC Checksum Calculation Specifies whether to perform automatic calculation (hardware calculation) of the checksum of the receive frame data unit. 0: Checksum is not automatically calculated 1: Checksum is automatically calculated Note that the checksum calculation of a frame with a VLAN tag is not supported.
Page 876
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description PAUSE Frame Usage with TIME = 0 Enable/Lost Carrier Error Detection Enable. PAUSE Frame Usage with TIME = 0 Enable (In full- duplex mode) 0: Control of a PAUSE frame whose TIME parameter value is 0 is disabled.
Page 877
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description Operating Mode for Receiving Port Flow Control 0: PAUSE frame detection is disabled 1: Flow control for the receiving port is enabled Operating Mode for Transmitting Port Flow Control 0: Flow control for the transmitting port is disabled (Automatic PAUSE frame is not transmitted) 1: Flow control for the transmitting port is enabled...
Page 878
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description Reception Enable If a switch is made from receiving function enabled (RE = 1) to disabled (RE = 0) while a frame is being received, the receiving function will be enabled until reception of the corresponding frame is completed.
Page 879
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description Promiscuous Mode Setting this bit enables all Ethernet frames to be received. All Ethernet frames means all receivable frames, irrespective of differences or enabled/disabled status (destination address, broadcast address, multicast bit, etc.).
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.3 E-MAC Status Register (ECSR) ECSR is a 32-bit readable/writable register that indicates the status in the E-MAC. This status can be notified to the CPU by interrupts. When 1 is written to the PFROI, LCHNG, MPD, and ICD bits, the corresponding flags can be cleared.
Page 881
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description PHYI ET_PHY-INT Interrupt Indicates the state of the ET_PHY-INT pin input from the PHY-LSI. 0: ET_PHY-INT pin is not asserted 1: ET_PHY-INT pin is asserted The signal polarity of the ET_PHY-INT pin can be set by PIPR.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.4 E-MAC Interrupt Permission Register (ECSIPR) ECSIPR is a 32-bit readable/writable register that enables or disables the interrupt sources indicated by ECSR. Each bit can disable or enable interrupts corresponding to the bits in ECSR. Bit: ...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.5 PHY Interface Register (PIR) PIR is a 32-bit readable/writable register that provides a means of accessing the PHY-LSI internal registers via the GMII/MII/RMII. Bit: ...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.6 MAC Address High Register (MAHR) MAHR is a 32-bit readable/writable register that specifies the upper 32 bits of the 48-bit MAC address. The settings in this register are normally made in the initialization process after a reset. The MAC address setting must not be changed while the transmitting and receiving functions are enabled.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.7 MAC Address Low Register (MALR) MALR is a 32-bit readable/writable register that specifies the lower 16 bits of the 48-bit MAC address. The settings in this register are normally made in the initialization process after a reset. The MAC address setting must not be changed while the transmitting and receiving functions are enabled.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.8 Receive Frame Length Register (RFLR) RFLR is a 32-bit readable/writable register that specifies the maximum frame length (in bytes) that can be received by this LSI. The settings in this register must not be changed while the receiving function is enabled.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.11 Transmit Retry Over Counter Register (TROCR) TROCR is a 16-bit counter that indicates the number of frames that were unable to be transmitted in 16 transmission attempts including the retransfer. When 16 transmission attempts have failed, this register is incremented by 1.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.12 Delayed Collision Detect Counter Register (CDCR) CDCR is a 16-bit counter that indicates the number of all delayed collisions that occurred on the line after the start of data transmission. When the value in this register reaches H'0000FFFF, count-up is halted.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.13 Lost Carrier Counter Register (LCCR) LCCR is a 16-bit counter that indicates the number of times the carrier was lost during data transmission. When the value in this register reaches H'0000FFFF, count-up is halted. This register is cleared to 0 when it is read with the TRCCM bit in ECMR set to 1.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.14 CRC Error Frame Receive Counter Register (CEFCR) CEFCR is a 16-bit counter that indicates the number of times a frame with a CRC error was received. When the value in this register reaches H'0000FFFF, count-up is halted. This register is cleared to 0 when it is read with the TRCCM bit in ECMR set to 1.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.15 Frame Receive Error Counter Register (FRECR) FRECR is a 16-bit counter that indicates the number of frames for which a receive error was generated by the ET_RX-ER pin input from the PHY-LSI. FRECR is incremented each time the ET_RX-ER pin becomes active.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.16 Too-Short Frame Receive Counter Register (TSFRCR) TSFRCR is a 16-bit counter that indicates the number of frames received with a length fewer than 64 bytes. When the value in this register reaches H'0000FFFF, count-up is halted. This register is cleared to 0 when it is read with the TRCCM bit in ECMR set to 1.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.17 Too-Long Frame Receive Counter Register (TLFRCR) TLFRCR is a 16-bit counter that indicates the number of frames received with a length exceeding the value specified by the receive frame length register (RFLR). When the value in this register reaches H'0000FFFF, count-up is halted.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.18 Residual-Bit Frame Receive Counter Register (RFCR) RFCR is a 16-bit counter that indicates the number of frames received containing residual bits (less than an 8-bit unit). When the value in this register reaches H'0000FFFF, count-up is halted. This register is cleared to 0 when it is read with the TRCCM bit in ECMR set to 1.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.19 Carrier Extension Loss Counter Register (CERCR) CERCR is a 16-bit counter that indicates the number of frames received with the carrier extension lost. When the value in this register reaches H'0000FFFF, count-up is halted. This register is cleared to 0 when it is read with the TRCCM bit in ECMR set to 1.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.20 Carrier Extension Error Counter Register (CEECR) CEECR is a 16-bit counter that indicates the number of frames received with an illegal carrier extension. When the value in this register reaches H'0000FFFF, count-up is halted. This register is cleared to 0 when it is read with the TRCCM bit in ECMR set to 1.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.21 Multicast Address Frame Receive Counter Register (MAFCR) MAFCR is a 16-bit counter that indicates the number of frames received with a specified multicast address. When the value in this register reaches H'0000FFFF, count-up is halted. This register is cleared to 0 when it is read with the TRCCM bit in ECMR set to 1.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.22 Automatic PAUSE Frame Register (APR) APR is used to set the TIME parameter value of an automatic PAUSE frame. When an automatic PAUSE frame is transmitted, the value set in this register is used as the TIME parameter of the PAUSE frame.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.23 Manual PAUSE Frame Register (MPR) MPR is used to set the TIME parameter value of a manual PAUSE frame. When a manual PAUSE frame is transmitted, the value set in this register is used as the TIME parameter of the PAUSE frame.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.24 Automatic PAUSE Frame Retransmit Count Register (TPAUSER) TPAUSER is used to set the upper limit for the number of times to retransmit an automatic PAUSE frame. The settings in this register must not be changed while the transmitting function is enabled.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.25 PAUSE Frame Transmit Counter Register (PFTCR) PFTCR is a 16-bit counter that indicates the number of times a PAUSE frame is transmitted. This register is cleared to 0 when it is read. Bit: ...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.26 PAUSE Frame Receive Counter Register (PFRCR) PFRCR is a 16-bit counter that indicates the number of times a PAUSE frame is received. This register is cleared to 0 when it is read. Bit: ...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.32 Relay FIFO Size Select Register (TSU_FCM) TSU_FCM selects the size of the relay FIFO in the TSU, used for relay operations between the E- MAC-0 and E-MAC-1. Bit: ...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.33 Relay FIFO Overflow Alert Set Register (Port 0) (TSU_BSYSL0) The TSU has an alert function, which informs the E-MAC-0 and E-MAC-1 that writing to the relay FIFO will be disabled when the data volume written in the relay FIFO during relay operations exceeds a certain threshold.
Page 912
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description 5 to 0 BSYSL0[5:0] 111111 These bits set the threshold of the port 0-to-1 relay FIFO size in 256-byte units when the TSU alerts the E- MAC-0 that writing in the relay FIFO will be disabled during relay operations.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.34 Relay FIFO Overflow Alert Set Register (Port 1) (TSU_BSYSL1) The TSU has an alert function, which informs the E-MAC-0 and E-MAC-1 that writing to the relay FIFO will be disabled when the data volume written in the relay FIFO during relay operations exceeds a certain threshold.
Page 914
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description 5 to 0 BSYSL1[5:0] All 1 These bits set the threshold of the port 1-to-0 relay FIFO size in 256-byte units when the TSU alerts the E- MAC-1 that writing in the relay FIFO will be disabled during relay operations.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.35 Transmit/Relay Priority Control Mode Register (Port 0) (TSU_PRISL0) TSU_PRISL0 sets the priority control mode when the transmission request from the E-DMAC to E-MAC-0 comes into collision with port 1 to 0 relay operations. This register must not be written to once after relay operations have been enabled (after the FWEN0 bit in TSU_FWEN0 or the FWEN1 bit in TSU_FWEN1 is set to 1).
Page 916
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description 7 to 0 PRISL0[7:0] All 0 These bits set the threshold of the port 1-to-0 relay FIFO size in 64-byte units in the event of switching to relay priority when bits PRIMD0[2:0] are set to H'4 or H'5.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.36 Transmit/Relay Priority Control Mode Register (Port 1) (TSU_PRISL1) TSU_PRISL1 sets the priority control mode when the transmission request from the E-DMAC to E-MAC-1 comes into collision with port 0 to 1 relay operations. This register must not be written to once after relay operations have been enabled (after the FWEN0 bit in TSU_FWEN0 or the FWEN1 bit in TSU_FWEN1 is set to 1).
Page 918
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description 7 to 0 PRISL1[7:0] All 0 These bits set the threshold of the port 0-to-1 relay FIFO size in 64-byte units in the event of switching to relay priority when bits PRIMD1[2:0] are set to H'4 or H'5.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.37 Receive/Relay Function Set Register (Port 0 to 1) (TSU_FWSL0) TSU_FWSL0 sets the processing method (enable or disable relay operation) of each frame in port 0 reception and port 0 to 1 relay operations. For multicast frames and frames whose destinations are other than this LSI, the processing method in relay operations can be determined by referring to the CAM evaluation results.
Page 920
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description FW20 Sets the processing method when frames from port 0 are multicast frames. 0: CAM hit: Frames are relayed to port 1 CAM mishit: Frames are not relayed 1: CAM hit: Frames are not relayed CAM mishit: Frames are relayed to port 1 FW10 Sets the processing method when frames from port 0...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.38 Receive/Relay Function Set Register (Port 1 to 0) (TSU_FWSL1) TSU_FWSL1 sets the processing method (enable or disable relay operation) of each frame in port 1 reception and port 1 to 0 relay operations. For multicast frames and frames whose destinations are other than this LSI, the processing method in relay operations can be determined by referring to the CAM evaluation results.
Page 922
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description FW21 Sets the processing method when frames from port 1 are multicast frames. 0: CAM hit: Frames are relayed to port 0 CAM mishit: Frames are not relayed 1: CAM hit: Frames are not relayed CAM mishit: Frames are relayed to port 0 FW11 Sets the processing method when frames from port 1...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.39 Relay Function Set Register (Common) (TSU_FWSLC) When the CAM is used, the referred area in the CAM entry table (partially or wholly) can be specified by the TSU_POST1 to TSU_POST4 registers. TSU_FWSLC enables settings by the TSU_POST1 to TSU_POST4 registers.
Page 924
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description 11 to 0 All 0 Reserved These bits are always read as 0. The write value should always be 0. Rev. 1.00 Oct. 01, 2007 Page 858 of 1956 REJ09B0256-0100...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.40 Qtag Addition/Deletion Set Register (Port 0 to 1) (TSU_QTAG0) TSU_QTAG0 sets the functions adding Qtag to the normal Ethernet frames (no Qtag) to convert them into IEEE802.1Q frames (with Qtag) and deleting Qtag from IEEE802.1Q frames (with Qtag) to convert them into normal Ethernet frames (no Qtag) during port 0 to 1 relay operations.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.41 Qtag Addition/Deletion Set Register (Port 1 to 0) (TSU_QTAG1) TSU_QTAG1 sets the functions adding Qtag to the normal Ethernet frames (no Qtag) to convert them into IEEE802.1Q frames (with Qtag) and deleting Qtag from IEEE802.1Q frames (with Qtag) to convert them into normal Ethernet frames (no Qtag) during port 1 to 0 relay operations.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.42 Relay Status Register (TSU_FWSR) TSU_FWSR is a 32-bit readable/writable register that indicates the status during relay operations. By setting the relay status interrupt mask register (TSU_FWINMK), this status can be notified to the CPU as an interrupt source. The status bit set to 1 will be cleared to 0 by writing 1 to the corresponding bit.
Page 928
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description RINT50 E-MAC-0 Residual-Bit Frame Receive Set to 1 when a frame containing residual bits (less than an 8-bit unit) is received in the E-MAC-0. RINT40 E-MAC-0 Too-Long Frame Receive Set to 1 when a frame exceeding the value set by RFLR0 is received in the E-MAC-0.
Page 929
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description RINT31 E-MAC-1 Too-Short Frame Receive Set to 1 when a frame with a length of less than 64 bytes is received in the E-MAC-1. RINT21 E-MAC-1 Frame Receive Error Set to 1 when a receive error is detected on the ET1_RX-ER pin input from the PHY-LSI in the E-MAC- RINT11...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.44 Added Qtag Value Set Register (Port 0 to 1) (TSU_ADQT0) TSU_ADQT0 sets the Qtag data to be added in the conversion of normal Ethernet frames (no Qtag) to IEEE802.1Q frames (with Qtag) in port 0 to 1 relay operations (if bits QTAG0[2:0] in TSU_QTAG0 are set to H'3 or H'7 when using the Qtag adding function).
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.45 Added Qtag Value Set Register (Port 1 to 0) (TSU_ADQT1) TSU_ADQT1 sets the Qtag data to be added in the conversion of normal Ethernet frames (no Qtag) to IEEE802.1Q frames (with Qtag) in port 1 to 0 relay operations (if bits QTAG1[2:0] in TSU_QTAG1 are set to H'3 or H'7 when using the Qtag adding function).
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.46 VLANtag Set Register (Port 0) (TSU_VTAG0) TSU_VTAG0 enables or disables the frame receive/discard evaluation function based on the VLAN number in port 0 relay operations, and also sets the VLAN number. Bit: VTAG ...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.47 VLANtag Set Register (Port 1) (TSU_VTAG1) TSU_VTAG1 enables or disables the frame receive/discard evaluation function based on the VLAN number in port 1 relay operations, and also sets the VLAN number. Bit: VTAG ...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.48 CAM Entry Table Busy Register (TSU_ADSBSY) When CAM entry table registers (TSU_ADRH0 to TSU_ADRH31 and TSU_ADRL0 to TSU_ADRL31) are set by register writing, the ADSBSY bit in this register is set to 1 (when the process of reflecting the contents of the CAM entry table registers in the CAM controller is completed inside the TSU, the ADSBSY bit is automatically restored to 0).
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.50 CAM Entry Table POST1 Register (TSU_POST1) When using the CAM, the conditions for referring to each CAM entry table can be specified by using the TSU_POST1 to TSU_POST4 registers. TSU_POST1 specifies the conditions for referring to TSU_ADRH0 to TSU_ADRH7 and TSU_ADRL0 to TSU_ADRL7.
Page 944
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value R/W Description 23 to 20 POST2[3:0] All 0 R/W These bits set the conditions for referring to CAM entry table 2. By setting multiple bits to 1, multiple conditions can be selected. POST2[3]: CAM entry table 2 is referred to in port 0 reception.
Page 945
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value R/W Description 11 to 8 POST5[3:0] All 0 R/W These bits set the conditions for referring to CAM entry table 5. By setting multiple bits to 1, multiple conditions can be selected. POST5[3]: CAM entry table 5 is referred to in port 0 reception.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.51 CAM Entry Table POST2 Register (TSU_POST2) When using the CAM, the conditions for referring to each CAM entry table can be specified by using the TSU_POST1 to TSU_POST4 registers. TSU_POST2 specifies the conditions for referring to TSU_ADRH8 to TSU_ADRH15 and TSU_ADRL8 to TSU_ADRL15.
Page 947
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value R/W Description 23 to 20 POST10[3:0] All 0 R/W These bits set the conditions for referring to CAM entry table 10. By setting multiple bits to 1, multiple conditions can be selected. POST10[3]: CAM entry table 10 is referred to in port 0 reception.
Page 948
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value R/W Description 11 to 8 POST13[3:0] All 0 R/W These bits set the conditions for referring to CAM entry table 13. By setting multiple bits to 1, multiple conditions can be selected. POST13[3]: CAM entry table 13 is referred to in port 0 reception.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.52 CAM Entry Table POST3 Register (TSU_POST3) When using the CAM, the conditions for referring to each CAM entry table can be specified by using the TSU_POST1 to TSU_POST4 registers. TSU_POST3 specifies the conditions for referring to TSU_ADRH16 to TSU_ADRH23 and TSU_ADRL16 to TSU_ADRL23.
Page 950
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value R/W Description 23 to 20 POST18[3:0] All 0 R/W These bits set the conditions for referring to CAM entry table 18. By setting multiple bits to 1, multiple conditions can be selected. POST18[3]: CAM entry table 18 is referred to in port 0 reception.
Page 951
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value R/W Description 11 to 8 POST21[3:0] All 0 R/W These bits set the conditions for referring to CAM entry table 21. By setting multiple bits to 1, multiple conditions can be selected. POST21[3]: CAM entry table 21 is referred to in port 0 reception.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.53 CAM Entry Table POST4 Register (TSU_POST4) When using the CAM, the conditions for referring to each CAM entry table can be specified by using the TSU_POST1 to TSU_POST4 registers. TSU_POST4 specifies the conditions for referring to TSU_ADRH24 to TSU_ADRH31 and TSU_ADRL24 to TSU_ADRL31.
Page 953
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value R/W Description 23 to 20 POST26[3:0] All 0 R/W These bits set the conditions for referring to CAM entry table 26. By setting multiple bits to 1, multiple conditions can be selected. POST26[3]: CAM entry table 26 is referred to in port 0 reception.
Page 954
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value R/W Description 11 to 8 POST29[3:0] All 0 R/W These bits set the conditions for referring to CAM entry table 29. By setting multiple bits to 1, multiple conditions can be selected. POST29[3]: CAM entry table 29 is referred to in port 0 reception.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.54 CAM Entry Table 0H to 31H Registers (TSU_ADRH0 to TSU_ADRH31) TSU_ADRH0 to TSU_ADRH31 are entry tables referred to by the CAM in reception and relay. Each of these registers sets the upper 32 bits of the 48-bit MAC address. Maximum 32 entries of MAC addresses can be registered.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.55 CAM Entry Table 0L to 31L Registers (TSU_ADRL0 to TSU_ADRL31) TSU_ADRL0 to TSU_ADRL31 are entry tables referred to by the CAM in reception and relay. Each of these registers sets the lower 16 bits of the 48-bit MAC address. Maximum 32 entries of MAC addresses can be registered.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.56 Transmit Frame Counter Register (Port 0) (Normal Transmission Only) (TXNLCR0) TXNLCR0 is a 32-bit counter indicating the number of frames successfully transmitted in the E- MAC-0. When the value in this register reaches H'FFFFFFFF, count-up is halted. The counter is cleared to 0 by reading from this register.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.57 Transmit Frame Counter Register (Port 0) (Normal and Erroneous Transmission) (TXALCR0) TXALCR0 is a 32-bit counter indicating the number of frames transmitted in the E-MAC-0, including the number of frames erroneously transmitted. When the value in this register reaches H'FFFFFFFF, count-up is halted.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.58 Receive Frame Counter Register (Port 0) (Normal Reception Only) (RXNLCR0) RXNLCR0 is a 32-bit counter indicating the number of frames successfully received in the E- MAC-0. When the value in this register reaches H'FFFFFFFF, count-up is halted. The counter is cleared to 0 by reading from this register.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.59 Receive Frame Counter Register (Port 0) (Normal and Erroneous Reception) (RXALCR0) RXALCR0 is a 32-bit counter indicating the number of frames received in the E-MAC-0, including the number of frames erroneously received. When the value in this register reaches H'FFFFFFFF, count-up is halted.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.60 Relay Frame Counter Register (Port 1 to 0) (Normal Relay Only) (FWNLCR0) FWNLCR0 is a 32-bit counter indicating the number of frames successfully relayed in port 1 to 0 relay operations. When the value in this register reaches H'FFFFFFFF, count-up is halted. The counter is cleared to 0 by reading from this register.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.61 Relay Frame Counter Register (Port 1 to 0) (Normal and Erroneous Transmission) (FWALCR0) FWALCR0 is a 32-bit counter indicating the number of frames relayed in port 1 to 0 relay operations, including the number of frames erroneously relayed. When the value in this register reaches H'FFFFFFFF, count-up is halted.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.62 Transmit Frame Counter Register (Port 1) (Normal Transmission Only) (TXNLCR1) TXNLCR1 is a 32-bit counter indicating the number of frames successfully transmitted in the E- MAC-1. When the value in this register reaches H'FFFFFFFF, count-up is halted. The counter is cleared to 0 by reading from this register.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.63 Transmit Frame Counter Register (Port 1) (Normal and Erroneous Transmission) (TXALCR1) TXALCR1 is a 32-bit counter indicating the number of frames transmitted in the E-MAC-1, including the number of frames erroneously transmitted. When the value in this register reaches H'FFFFFFFF, count-up is halted.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.64 Receive Frame Counter Register (Port 1) (Normal Reception Only) (RXNLCR1) RXNLCR1 is a 32-bit counter indicating the number of frames successfully received in the E- MAC-1. When the value in this register reaches H'FFFFFFFF, count-up is halted. The counter is cleared to 0 by reading from this register.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.65 Receive Frame Counter Register (Port 1) (Normal and Erroneous Reception) (RXALCR1) RXALCR1 is a 32-bit counter indicating the number of frames received in the E-MAC-1, including the number of frames erroneously received. When the value in this register reaches H'FFFFFFFF, count-up is halted.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.66 Relay Frame Counter Register (Port 0 to 1) (Normal Relay Only) (FWNLCR1) FWNLCR1 is a 32-bit counter indicating the number of frames successfully relayed in port 0 to 1 relay operations. When the value in this register reaches H'FFFFFFFF, count-up is halted. The counter is cleared to 0 by reading from this register.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.67 Relay Frame Counter Register (Port 0 to 1) (Normal and Erroneous Transmission) (FWALCR1) FWALCR1 is a 32-bit counter indicating the number of frames relayed in port 0 to 1 relay operations, including the number of frames erroneously relayed. When the value in this register reaches H'FFFFFFFF, count-up is halted.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.68 E-DMAC Start Register (EDSR) EDSR specifies activation of the transmitting unit and receiving unit of the E-DMAC. This register can only be written to, and the read values are invalid. Bit: ...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.69 E-DMAC Mode Register (EDMR) EDMR is a 32-bit readable/writable register that specifies E-DMAC resetting and the transmit/receive descriptor length. This register is to be set before the transmitting or receiving function is enabled (before the TR bit in EDTRR or the RR bit in EDRRR is set to 1). However, the SWRR and SWRT bits can be written to even after the transmitting or receiving function is enabled.
Page 971
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description 31 to 7 All 0 Reserved These bits are always read as 0. The write value should always be 0. Transmit/Receive Frame Endian Sets the endian mode for DMA transfer of frame data between the transmit/receive FIFO and transmit/receive buffer.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.70 E-DMAC Transmit Request Register (EDTRR) EDTRR is a 32-bit readable/writable register that issues transmit directives to the E-DMAC. After writing 11 to bits TR[1:0] in this register, the E-DMAC reads the transmit descriptor at the address specified by TDLAR.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.71 E-DMAC Receive Request Register (EDRRR) EDRRR is a 32-bit readable/writable register that issues receive directives to the E-DMAC. After writing 1 to the RR bit in this register, the E-DMAC reads the receive descriptor at the address specified by RDLAR.
Section 23 Gigabit Ethernet Controller (GETHER) Note: If the receiving function is disabled during frame reception, write-back is not performed successfully to the receive descriptor. Following pointers to read a receive descriptor become abnormal and the E-DMAC cannot operate successfully. In this case, to make E-DMAC reception enabled again, execute a software reset by the SWRT and SWRR bits in EDMR0 (EDMR1).
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.73 Receive Descriptor List Start Address Register (RDLAR) RDLAR is a 32-bit readable/writable register that specifies the start address of the receive descriptor list. Descriptors have a boundary configuration in accordance with the descriptor length indicated by the DL bits in EDMR.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.74 E-MAC/E-DMAC Status Register (EESR) EESR is a 32-bit readable/writable register that shows communications status information on the E-DMAC in combination with the E-MAC. The information in this register is reported in the form of interrupt sources.
Page 977
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description TC[1] Frame Transmission Complete Indicates, in combination with the TC[0] bit, that all the data specified by the transmit descriptor has been transmitted from the E-MAC. This bit is set to 1 on assuming the completion of transmission.
Page 978
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description RABT Receive Abort Detect Indicates that the E-MAC aborts receiving a frame because of failures during frame reception. 0: Frame reception has not been aborted or no reception directive 1: Frame reception has been aborted RFCOF Receive Frame Counter Overflow...
Page 979
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description Transmit Descriptor Empty Indicates that the transmit descriptor valid bit (TACT) of a transmit descriptor read by the E-DMAC is not set if the previous descriptor does not represent the end of a frame in multi-buffer frame processing based on single- frame/multi-descriptor operation.
Page 980
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description RFOF Receive FIFO Overflow Indicates that the receive FIFO has overflowed during frame reception. 0: Overflow has not occurred 1: Overflow has occurred 15 to 11 All 0 Reserved These bits are always read as 0.
Page 981
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description CELF Carrier Extension Loss Indicates that the carrier extension has been lost in 1- Gigabit/half-duplex transfer. This means that the sum of a frame and carrier extension is smaller than SLOT_TIME (4096 bits).
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.75 E-MAC/E-DMAC Status Interrupt Permission Register (EESIPR) EESIPR is a 32-bit readable/writable register that enables interrupts corresponding to individual bits in the E-MAC/E-DMAC status register (EESR). An interrupt is enabled by writing 1 to the corresponding bit.
Page 983
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description ROCIP Receive Overflow Frame Write-Back Complete Interrupt Enable 0: Receive overflow frame write-back complete interrupt is disabled 1: Receive overflow frame write-back complete interrupt is enabled TABTIP Transmit Abort Detect Interrupt Enable 0: Transmit abort detect interrupt is disabled 1: Transmit abort detect interrupt is enabled RABTIP...
Page 984
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description RDEIP Receive Descriptor Empty Interrupt Enable 0: Receive descriptor empty interrupt is disabled 1: Receive descriptor empty interrupt is enabled RFOFIP Receive FIFO Overflow Interrupt Enable 0: Overflow interrupt is disabled 1: Overflow interrupt is enabled ...
Page 985
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description RTLFIP Receive Too-Long Frame Interrupt Enable 0: Receive too-long frame interrupt is disabled 1: Receive too-long frame interrupt is enabled RTSFIP Receive Too-Short Frame Interrupt Enable 0: Receive too-short frame interrupt is disabled 1: Receive too-short frame interrupt is enabled PREIP PHY-LSI Receive Error Interrupt Enable...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.76 Transmit/Receive Status Copy Enable Register (TRSCER) TRSCER specifies whether the information for the transmit and receive state reported by bits 17, 16, and 10 to 0 in the E-MAC/E-DMAC status register (EESR) is to be reflected in the TFE or RFE bit of the corresponding descriptor.
Page 987
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description 15 to 11 All 0 Reserved These bits are always read as 0. The write value should always be 0. DLCCE DLC Bit Copy Directive 0: Reflects the DLC bit status in the TFE bit of the transmit descriptor 1: Occurrence of the corresponding source is not reflected in the TFE bit of the transmit descriptor...
Page 988
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description RRFCE RRF Bit Copy Directive 0: Reflects the RRF bit status in the RFE bit of the receive descriptor 1: Occurrence of the corresponding source is not reflected in the RFE bit of the receive descriptor RTLFCE RTLF Bit Copy Directive 0: Reflects the RTLF bit status in the RFE bit of the...
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.77 Receive Missed-Frame Counter Register (RMFCR) RMFCR is a 16-bit counter that indicates the number of frames that could not be saved in the receive buffer and so were discarded during reception. When the receive FIFO overflows, the receive frames in the FIFO are discarded.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.78 Transmit FIFO Threshold Register (TFTR) TFTR is a 32-bit readable/writable register that specifies the transmit FIFO threshold at which the first transmission is started. The actual threshold is 4 times the set value. The E-MAC starts transmission when the amount of data in the transmit FIFO exceeds the number of bytes specified by this register, when the transmit FIFO is full, or when one frame of data write is performed.
Section 23 Gigabit Ethernet Controller (GETHER) Note: When starting transmission before one frame of data write has completed, take care no underflow occurs. 23.3.79 FIFO Depth Register (FDR) FDR is a 32-bit readable/writable register that specifies the sizes of the transmit and receive FIFOs.
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description 4 to 0 RFD[4:0] All 1 Receive FIFO Size Specifies 256 bytes to 8 Kbytes in 256-byte units as the size of the receive FIFO whose maximum size is 8 Kbytes.
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description Receive Enable Control Sets whether to continue frame reception. 0: Upon completion of reception of one frame, the E- DMAC writes the receive status to the descriptor and clears the RR bit in EDRRR to 0. 1: Upon completion of reception of one frame, the E- DMAC writes (writes back) the receive status to the descriptor.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.82 Receive Descriptor Finished Address Register (RDFXR) RDFXR stores the start address of the receive descriptor for which the E-DMAC has just completed the write-back processing. Up to which receive descriptor has been processed by the E- DMAC can be recognized by monitoring addresses displayed in this register.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.83 Receive Descriptor Final Flag Register (RDFFR) RDFFR indicates whether the receive descriptor for which the E-DMAC has just completed the write-back processing and whose start address is stored in RDFXR is at the end of the receive descriptor queue (descriptor list).
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.84 Transmit Descriptor Fetch Address Register (TDFAR) TDFAR stores the descriptor start address that is required when the E-DMAC fetches descriptor information from the transmit descriptor. Which transmit descriptor information is used for processing by the E-DMAC can be recognized by monitoring addresses displayed in this register. The address from which the E-DMAC is actually fetching a descriptor may be different from the value read from this register.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.85 Transmit Descriptor Finished Address Register (TDFXR) TDFXR stores the start address of the transmit descriptor for which the E-DMAC has just completed the write-back processing. Up to which transmit descriptor has been processed by the E-DMAC can be recognized by monitoring addresses displayed in this register.
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.86 Transmit Descriptor Final Flag Register (TDFFR) TDFFR indicates whether the transmit descriptor for which the E-DMAC has just completed the write-back processing and whose start address is stored in TDFXR is at the end of the transmit descriptor queue (descriptor list).
Section 23 Gigabit Ethernet Controller (GETHER) 23.3.87 Overflow Alert FIFO Threshold Register (FCFTR) FCFTR is a 32-bit readable/writable register that sets the flow control of the E-MAC. The threshold can be set by the size of the receive FIFO data (bits RFD[7:0]) and the number of receive frames (bits RFF[4:0]).
Page 1000
Section 23 Gigabit Ethernet Controller (GETHER) Initial Bit Name Value Description 15 to 8 All 0 Reserved These bits are always read as 0. The write value should always be 0. 7 to 0 RFD[7:0] H'FF Receive FIFO Overflow Alert Signal Output Threshold H'00: When (256 −...