Summary of Contents for Texas Instruments OMAP5910
Page 1
OMAP5910 Dual-Core Processor Technical Reference Manual Literature Number: SPRU602B January 2003...
Page 2
IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete.
About This Manual This manual describes the Texas Instruments OMAP5910 multimedia proces- sor, hereafter called the OMAP5910 device. The OMAP5910 device supports the development and testing of wireless device applications that use the Microsoft Windows CE or the Symbian EPOC operating system.This manual...
Page 4
Notational Conventions In syntax descriptions, the instruction, command, or directive is in a bold typeface font and parameters are in an italic typeface. Portions of a syntax that are in bold should be entered as shown; portions of a syntax that are in italics describe the type of information that should be entered.
Page 5
Information About Cautions and Warnings / Related Documentation From Texas Instruments Notational Conventions Information About Cautions and Warnings This book may contain cautions and warnings. This is an example of a caution statement. A caution statement describes a situation that could potentially damage your software or equipment.
Page 6
Bluetooth is a trademark owned by the Bluetooth SIG, Inc. and licensed to Texas Instruments. TMS320C5510, TMS320C55x, C55x, and Code Composer Studio are trademarks of Texas Instruments. Microsoft, Windows, Windows CE, Windows CE Platform Builder, and Windows NT are trademarks of Microsoft Corporation.
Page 39
Tables 13-1 USB Function Module Registers ..........13-9 13-2 Revision Register (REV)
Page 40
Tables 14-23 HC Port 1 Status and Control Register (HcRhPortStatus1) ......14-30 14-24 HC Port 2 Status and Control Register (HcRhPortStatus2) .
Page 41
15-83 Input and Output Signals for the OMAP5910 Device .......
Chapter 1 Introduction This chapter introduces the setup, components, and features of the OMAP5910 processor and provides a high-level view of the device architecture. Topic Page Overview ........... . .
Page 43
TI TMS320C55x DSP, peripherals, and other components. The OMAP5910 processor is available in the small 289-pin MicroStar package (12 x 12 mm). Figure 1–1 is a master block diagram of the 289-pin OMAP5910 processor. Figure 1–2 shows the OMAP5910 in more detail.
TMS320C55x DSP core and a high-performance TI925T core. The OMAP5910 device is designed to run leading open and embedded RISC- based operating systems, as well as the Texas Instruments (TI) DSP/BIOS software kernel foundation, and is available in a 289-ball MicroStar BGA package.
As a system real-time time clock, there are two possible solutions: The OMAP5910 internal solution (internal RTC and 32-kHz oscillator pads) is not a low-power solution, because the OMAP5910 RTC power supply is not separate from the OMAP5910 core power supply.
Features 1.3 Features The OMAP5910 device has the following features: Ability to support reduced instruction set computer (RISC) and DSP operating systems TI925T MPU subsystem with: Instruction cache (16K bytes) and data cache (8K bytes) Memory management unit (MMU) A 17-word write buffer (WB) DSP subsystem (C55x...
Page 48
Features 192K bytes of 32-bit-wide internal SRAM memory that allows local storage of operating system (OS) critical routines and that provides a direct path from the SRAM to the LCD controller An external memory traffic controller (TC) that allows asynchronous operation among the external memory interface, the MPU, and the DSP Mailboxes (two for MPU-to-DSP and two for DSP-to-MPU) for interprocessor communication...
Fourteen general-purpose input/output (GPIO) Mailbox 1.4 Architecture The OMAP5910 device includes the MPU subsystem, the DSP subsystem, a memory interface traffic controller, general-purpose peripherals, dedicated multimedia application (MMA) peripherals, and multiple interfaces. The MPU is the master of the platform, and it has access to the entire 16M bytes of memory space and to the 128K bytes of I/O space of the DSP subsystem.
Software Compatibility 1.6 Software Compatibility Code compatibility with future OMAP59x devices is only possible if driver writers adhere to the conventions detailed in Section 1.6.1. 1.6.1 OMAP Driver Compatibility Conventions All locations marked as reserved or unused in the documentation are written as zero, and, in general, values read from reserved locations are not used.
Chapter 2 MPU Subsystem This chapter describes the core, caches, memory management units (MMUs), interface, and bridges of the OMAP5910 multimedia processor microprocessor unit (MPU) subsystem. Topic Page Introduction ..........
Introduction 2.1 Introduction The MPU of the OMAP5910 device controls the memory management units (MMUs), the system direct memory access (DMA) controller, the MPU TI peripheral bus (TIPB) bridge, and peripherals. Figure 2–1 shows the OMAP5910 device with the MPU subsystem high- lighted.
A 17-word write buffer (WB) A local bus interface The OMAP5910 device uses the TI925T core in little endian mode only. To reduce effective memory access time, the TI925T has an instruction cache, a data cache, and a write buffer. In general, these are transparent to program...
Instruction Cache 2.3 Instruction Cache The 16K-byte instruction cache (I-cache) has 1024 lines of 16 bytes arranged as a two-way set-associative cache. It uses the virtual addresses generated by the processor core. The I-cache is always reloaded one line at a time. It can be enabled or disabled via the CP15 control register (I_CP15 bit) and is disabled and flushed upon reset.
Data Cache 2.4 Data Cache The 8K-byte data cache (D-cache) has 512 lines of 16 bytes arranged as a two-way set-associative cache. It uses the virtual addresses generated by the processor. The D-cache is always reloaded one line at a time, because it always requires the MMU to be enabled.
Data Cache Table 2–1. Data Cache Configuration (Continued) C_CP15 C_MMU B_MMU Functional Description Cache search active: write through mode (WT) • Read hits do not generate external accesses. • Write hits update the cache and the external memory. • Read misses cause a line load. •...
Write Buffer Data Cache / Write Buffer Note: Cleaning is not the same as flushing. The entire D-cache can be invalidated with a single flush D-cache instruction through the CP15 cache operation register. The D-cache is flushed upon reset. If the D-cache is disabled, its content is maintained valid and is accessible when the cache is reenabled.
Write Buffer 2.5.1 Operation The WB operation is controlled by four control bits, as shown in Table 2–2. Table 2–2. Write Buffer Configuration C_CP15 W_CP15 C_MMU B_MMU Functional Description Writes are not buffered. See Note Noncacheable, buffered (NCB) Writes are buffered, write-through mode. Writes are buffered, copy-back mode.
Coprocessor 15 2.6 Coprocessor 15 TI925T operation and configuration are controlled with coprocessor instruc- tions, configuration pins, and the MMU translation tables. The coprocessor in- structions manipulate on-chip registers, which control the configuration of the cache memories, write buffer, MMU, and a number of other options described in the following sections.
Coprocessor 15 Ignored: Writing to such a location does not affect the system behavior. VA: Virtual address (data or instruction) In all cases, reading data values from or writing any data values to any CP15 register, including those fields specified as unpredictable or SBZ, causes no permanent damage to the TI925T.
Coprocessor 15 Table 2–4. Reading From CP15 Register 0 Function Opcode_2 Instruction † Read ID 0bXXX 0bXXXX TI925T ID MRC p15, 0, Rd, c0, c0, 0 Read CIR 0b001 0b0000 Cache info MRC p15, 0, Rd, c0, c0, 1 † All opcodes [opcode_2,CRm] except [1,0] return the TI925T ID. Table 2–5.
Page 65
Coprocessor 15 Table 2–6. CP15 Cache Information Register (CIR) (Continued) Name Value Function D-Cache information Parameter to calculate the real D-cache associativity and size: D-cache associativity and D-cache size = base value D-cache associativity and D-cache size = 3/2 of the base value. Exception: If base value of associativity is 1, a 1 indicates that there is no D-cache and 0 indicates that D-cache is really direct-map.
Coprocessor 15 Table 2–6. CP15 Cache Information Register (CIR) (Continued) Name Value Function I-cache information Parameter to calculate the real I-cache associativity and size: I-cache associativity and I-cache size are equal to the base value. I-cache associativity and I-cache size are equal to 3/2 of the base value.
Page 67
System protection. This bit modifies the MMU protection system (see Table 2–24). Little/big endian configuration. The TI925T on the OMAP5910 device supports only little endian mode due to the system architecture of the device. This bit must always be written as 0.
Page 68
Coprocessor 15 Table 2–7. CP15 Control Register (Continued) Name Value Function Memory management unit (MMU) enable/disable MMU disabled MMU enabled The MMU must be enabled before or at the same time as the data cache (C) and write buffer (W). The instruction cache can be enabled independently.
Coprocessor 15 Figure 2–3. Format of the CP15 Translation Table Base Register Translation Table Base UNP/SBZ Reading from CP15 register 2 returns the pointer to the currently active first- level translation table in bits 31 – 14 and an unpredictable value in bits 13 – 0. The CRm and opcode_2 fields are SBZ when reading this register.
Coprocessor 15 Table 2–8. Domain Configuration Value Access Type Description 0b00 No access Any access generates a domain fault. 0b01 Client Access rights are checked against the permission given by the page descriptor. 0b10 Reserved Behaves like no access 0b11 Manager The access rights are not checked;...
Coprocessor 15 Figure 2–5. Format of the Fault Address Register Fault Address Reading CP15 register 6 returns the value of the fault address register (FAR). The FAR holds the virtual address of the access that was attempted when a fault occurred. The FAR is only updated for data access faults, not for instruc- tion fetch faults.
Coprocessor 15 2.6.2.3 TLB Operations The CP15 register 8 is a write-only pseudoregister that manages the transla- tion look-aside buffers (TLBs). TI925T includes separate instruction and data TLBs. Several TLB functions are defined and are selected by the opcode_2 and CRm fields. The flush-I and flush-D functions, respectively, flush (invalidate) all unpres- erved entries of the instruction and data TLB.
Coprocessor 15 2.6.2.5 Context Switch (or PID: Process Identifier) Register The PID register is used in Windows CE mode only. The register is used in con- junction with the fast-context switch hardware support and is only used when the Windows CE mode bit is enabled. More information is available upon request.
Page 76
Coprocessor 15 Table 2–14. TI925T Configuration Register (Continued) Name Value Function Must be written to as 0. OS configuration. This bit takes the value of the OS_TYPE input signal upon reset. It is dependent on the hardware application and may be changed by software.
Coprocessor 15 Figure 2–8. Format of the I_min and I_max Registers UNP/SBZ l_min UNP/SBZ UNP/SBZ l_max UNP/SBZ I_max indicates the maximum index of the data cache containing a dirty line. I_min indicates the minimum index of the data cache containing a dirty line. Upon reset, D-cache flush or end of the full D-cache clean, the value of I_max is cleared and the value of all the I_min bits is set to 1.
MPU Memory Management Unit 2.7 MPU Memory Management Unit The MPU MMU performs virtual-to-physical address translations and access permission checks for access to the system memory, and it provides the flexi- bility and security required for the OS to manage physical memory space shared by the DSP subsystem and the MPU subsystem.
MPU Memory Management Unit Unpredictable behavior occurs if two TLB entries correspond to overlapping areas of memory in the virtual space. This can occur if the TLB is not flushed after the memory is remapped with different-sized pages (leaving an old map- ping with different sizes in the TLB and using a new mapping that is loaded into a different TLB location).
MPU Memory Management Unit 2.7.4 MMU Program-Accessible Registers The system control coprocessor (CP15) registers listed in Table 2–16, in con- junction with the translation tables stored in memory, determine the operation of the MMU or hold the MMU state for access by the processor. Table 2–16.
MPU Memory Management Unit 2.7.6 Translation Process The MMU translates virtual addresses generated by the CPU into physical addresses to access the external memory and checks the access permission using a translation look-aside buffer (TLB) (see Figure 2–10). The MMU table walking hardware is used to add entries to the TLB. Figure 2–10.
MPU Memory Management Unit 2.7.6.1 Translation Table Base The translation process is initiated when the on-chip TLB does not contain an entry corresponding to the requested virtual address (that is, when a TLB-miss occurs). The CP15 translation table base (TTB) register points to the base of a table in physical memory, which contains section and page table descriptors.
MPU Memory Management Unit 2.7.6.2 Level 1 Fetch Bits 31–14 of the TTB register are concatenated with bits 31–20 of the virtual address to produce a 30-bit address (see Figure 2–12) by accessing the translation table level 1 descriptors (see Section 2.7.6.3). This address selects a four-byte translation table entry, which is a level 1 descriptor for either a section or a page table.
MPU Memory Management Unit 2.7.6.3 Level 1 Descriptor The level 1 descriptor returned is either a coarse or fine page table descriptor or a section descriptor. Its format varies accordingly, as shown in Figure 2–13. Figure 2–13. Level 1 Descriptors 2019 12 11 10 9 8 5 4 3 2 1...
MPU Memory Management Unit Table 2–19. Level 1 Coarse Page Table Descriptor Name Function 31–10 COARSE_PG_BASE Base address used to access the coarse page table entry. The coarse page table index selecting an entry is derived from the virtual address. If a page table descriptor is returned from the level 1 fetch (Bit 0 = 1), a level 2 fetch is initiated.
MPU Memory Management Unit 2.7.6.4 Translating Section References Figure 2–14 illustrates the complete section translation sequence. The access permissions contained in the level 1 descriptor must be checked before the physical address is put on the address bus. Figure 2–14. Section Translation Virtual address 20 19 Table index...
MPU Memory Management Unit 2.7.6.5 Level 2 Descriptor The level 1 fetch, when returning a coarse or fine page table descriptor, pro- vides the base address of the page table to be used. The page table is then accessed, and a level 2 descriptor is returned. This descriptor defines a tiny, small, or large page access.
MPU Memory Management Unit Table 2–22. Interpreting Page Table Entry Bits 1–0 Value Meaning Notes Invalid Generates a page translation fault Large page Indicates a 64K-byte page Small page Indicates a 4K-byte page Tiny page Indicates a 1K-byte page 2.7.6.6 Translating Tiny Pages References Figure 2–16 illustrates the complete translation sequence for a 1K-byte tiny page.
MPU Memory Management Unit Figure 2–16. Tiny Page Translation Virtual address 20 19 10 9 Table index L2 table index Page index Translation table index 14 13 Translation base 14 13 Translation base Table index First-level descriptor Fine page table base address Domain 12 11 Page table base address...
MPU Memory Management Unit 2.7.6.7 Translating Small Page References Figure 2–17 illustrates the complete translation sequence for a 4K-byte small page. If a small page descriptor is included in a fine page table, the upper two bits of the index of the page overlap the lower two bits of the index of the fine page table.
MPU Memory Management Unit 2.7.6.8 Translating Large Page References Figure 2–18 illustrates the complete translation sequence for a 64K-byte large page. As the upper four bits of the page index and the lower four bits of the coarse page table index overlap, each coarse page table entry for a large page descriptor must be duplicated 16 times (in consecutive memory locations).
MPU Memory Management Unit Figure 2–18. Large Page Translation Virtual address 20 19 16 15 12 11 Table index Page index L2 table index Translation table base 14 13 Translation base 14 13 Translation base Table index First-level descriptor Page table base address Domain 10 9 Page table base address...
MPU Memory Management Unit 2.7.8 Fault Address and Fault Status Registers (FAR and FSR) If an illegal data access (data abort) occurs, the MMU places an encoded 4-bit value FS[3–0] and the 4-bit encoded domain number in the fault status register (FSR).
MPU Memory Management Unit 2.7.9 Domain Access Control MMU accesses are primarily controlled via domains. There are 16 domains, and each domain has a 2-bit field to define it. Two kinds of users are supported: clients and managers. Clients use a domain; managers control the behavior of the domain.
MPU Memory Management Unit 2.7.10 Permission Access Both instructions and data need access permission checks, but their respec- tive access violations are handled differently. A data access error generates a DABORT and stores the status, domain, and address in FSR and FAR. An instruction fetch generates an IABORT only;...
MPU Memory Management Unit If the access generates an alignment fault, the access sequence aborts with- out checking access rights. If a nonaligned read access is executed and the alignment fault is disabled, data is accessed at a word address and rotated inside the core as shown be- low.
MPU Memory Management Unit Section: If the level 1 descriptor defines a section-mapped access, its AP bits define whether or not the the access is allowed (see Table 2–24). Their interpretation is dependent upon the setting of the S bit (CP15 con- trol register bit 8).
The 16M bytes of DSP external addresses can be mapped to any of the 4G bytes of addresses on the OMAP5910 device. If a memory protection or memory access violation occurs, the DSP MMU sends an interrupt to the MPU via the second-level interrupt handler on IRQ_28.
DSP Memory Management Unit Table 2–29. Control Register (CNTL_REG) – Offset Address (hex): 08 Value at Hardware Reset Function Size Access 15–6 Reserved Enables the 16-bit burst management. Active high. Reserved Reserved When 1, enables the walking table logic. When 0, the walking table is disabled and access to the TLB and lock counter are disabled.
DSP Memory Management Unit Table 2–32. Fault Status Register (F_ST_REG)) – Offset Address (hex): 14 Value at Hardware Reset Function Size Access 15–4 Reserved Error occurred during a prefetch. Active high. Permission fault. Active high. TLB miss. Active high. Translation fault. Active high. Table 2–33.
DSP Memory Management Unit Table 2–36. Lock Counter Register (LOCK_REG) – Offset Address (hex): 24 Value at Hardware Function Size Access Reset 15–10 Locked entries base value 9–4 Current entry pointed by the WTL 3–0 Reserved Table 2–37. Load Entry in TLB Register (LD_TLB_REG) – Offset Address (hex): 28 Value at Hardware Function...
DSP Memory Management Unit Table 2–42. Global Flush Register (GFLUSH_REG) – Offset Address (hex): 3C Value at Hardware Reset Function Size Access 15–1 Reserved Toggle bit. Flush all nonprotected TLB entries when 1 is written. Always 0 when read. Automatically reset. Table 2–43.
MPU Interface 2.9 MPU Interface The MPU interface (MPUI) allows the TI925T and the system DMA controller to communicate with the DSP and its peripherals via the DSP MPUI port (part of the DSP); see Figure 2–22. The MPUI provides the capability for the TI925T and the system DMA controller to access the full memory space (16M bytes) of the DSP and the DSP peripheral buses, except the private peripherals.
MPU Interface 2.9.1 Functional Features The MPUI supports the following features: Four access modes: Single-access mode (SAM) for SARAM, DARAM, memory interface access Single-access mode (SAM) for peripheral bus access Host-only mode (HOM) for SARAM access Host-only mode (HOM) for peripheral bus access An interrupt sent to the TI925T if a time-out occurs Programmable priority scheme (TI925T, DMA, etc.) that must be config- ured during the system boot process...
MPU Interface In SAM, all the DSP internal memory is accessible by the MPUI interface. If both the DSP and the MPU controllers (TI925T and system DMA) access the same memory at the same time, priority is given to the DSP controllers. The access is synchronized to the internal DSP CPU clock.
Byte swap only for APIMEM accesses 15–8 MPUI bus access time out 0xFF 7–4 Division factor of APIF_HNSTROBE. For the OMAP5910 device, this field must be set to 2 (10b) or greater. Settings of 00b or 01b should not be used. 2-58...
MPU Interface Table 2–49. Control Register (CTRL_REG) – Offset: x00 (Continued) Value at Hardware Value Function Size Access Reset Enables sending IRQ_ABORT interrupt to the MPU when an abort condition is indicated by the MPU port from the DSP system. Disables this interrupt source Reserved Enables the time-out feature.
MPU Interface Table 2–51. Debug Data Register (DEBUG_DATA) – Offset: x08 Value at Hard- Function Size Access ware Reset 31–0 Value of S_DATA_R is saved when a read access has a size 0xFFFFFFFF mismatch, and S_DATA_W is saved when a write access is aborted or has a size mismatch.
The STATUS_REG checks the status of the MPU interface during suspend mode (for example, after hitting an emulator breakpoint). The register is for OMAP5910 device chip designers to use for debugging. Table 2–53. Status Register (STATUS_REG) – Offset: x10 Value at...
MPU Interface Table 2–53. Status Register (STATUS_REG) – Offset: x10 (Continued) Value at Hardware Value Function Size Access Reset Current access mode when ACCESS_DONE = 0 or last access mode when ACCESS_DONE = 1 Table 2–54. DSP Status Register (DSP_STATUS_REG) – Offset: x14 Value at Hardware Value...
DSP devices such as the TMS320C5510, XF is con- nected to a pin and used as an external flag. The OMAP5910 device does not have an XF pin, so this bit is provided to show tha value of the XF bit in the DSP...
MPU Interface Table 2–56. DSP MPUI Configuration Register (DSP_API_CONFIG) – Offset: x1C Value at Hardware Reset Function Size Access 15–0 APISIZE: Specify which blocks of SARAM are accessible by the 0xFFFF MPUI in HOM (exclusive access). The amount of SARAM is calculated by this formula: API_SIZE/2) * 8K bytes, starting from SARAM0 Table 2–57 decodes SARAM 0 through SARAM 11 on 8K boundaries.
MPU TI Peripheral Bus Bridges 2.10 MPU TI Peripheral Bus Bridges The MPU TI peripheral bus (TIPB) bridges (see Figure 2–23) connect the TI925T to its peripherals. Two MPU TIPBs, one private and one nonprivate or public, are implemented to reduce access latency and improve system perfor- mance.
MPU TI Peripheral Bus Bridges 2.10.2 TIPB Allocation The MPU TIPBs are shared between the MPU and the DMA controller. A bus- allocation module is provided to resolve conflicts and prioritize accesses. The value written in the TIPB_BUS_ALLOC register defines the priority. If the value is 0, the MPU memory interface has priority over the DMA controller.
MPU TI Peripheral Bus Bridges 2.10.4 MPU Posted Write The MPU can perform a posted write. When posted write is enabled inside the ARM_TIPB_CNTL register, data sent by the MPU is buffered in the MPU TIPB and the MPU can keep going to another access. The bridge takes care of the access towards the TIPB;...
MPU TI Peripheral Bus Bridges Table 2–63. MPU TIPB Control Register (MPU_TIPB_CNTL_REG) – Offset: x08 Reset Value Description Size Access Value Write buffer is enabled for strobe domain 1. Write buffer is bypassed. Write buffer is enabled for strobe domain 0. Write buffer is bypassed.
MPU TI Peripheral Bus Bridges Table 2–67. Data Debug Register MSB (DATA_DEBUG_HIGH) – Offset: x18 Reset Description Size Access Value 15–0 Bytes 31–16 of data bus from MPU 0xFFFF Table 2–68. Debug Control Signals Register (DEBUG_CNTR_SIG) – Offset: x1C Reset Description Size Access...
Endianism Conversion 2.11 Endianism Conversion Because the TI925T is operated in little endian mode and the DSP is operated in big endian mode, shared data must be converted to their respective formats before any processing is done. Table 2–69 and Table 2–70 illustrate the little and big data formats, respectively.
2.11.1 Conversion Through the DSP MMU Swapping buffers are implemented at the boundary between the DSP and the DSP MMU (see Figure 2–24). Assuming that the OMAP5910 system memory is organized in little endian mode, data from and to the DSP is converted as follows: Data is written from the DSP to the system memory.
Endianism Conversion Figure 2–24 shows the endian conversion at the DSP MMU interface bounda- ry. The byte and word swapping is done by decoding the data width and data size, then repacking the data into the appropriate formats. The byte-steering logic provides a mechanism to convert from big to little, little to big, or upper and lower word swap for program code and data accesses.
Endianism Conversion 2.11.2 Conversion Through the MPUI Swapping buffers are implemented at the boundary between the DSP and the MPUI (See Figure 2–25). The word and byte swapping can be programmed so swapping is individually controlled for MPU memory access and non-MPU memory (peripheral and MPU register).
ETM Environment 2.12 ETM Environment The OMAP5910 device has an embedded trace macrocell (ETM) to provide instruction and data trace capabilities of the TI925T processor. ETM9 in large configuration uses an 8-bit data output. The instruction trace shows the instruction flow of the MPU. The data trace shows the data access results after the MPU executes load and store operations.
ETM Environment The ETM trace signals are multiplexed with the camera interface pins on the OMAP5910 device. The default value upon reset is the camera interface. Refer to Section 6.8, Configuration Module, and Section A.2, I/O Functional Multiplexing, for details on pin multiplexing.
ETM Environment 2.12.3 Operation Figure 2–27 shows how the OMAP5910 ETM is used in a system setup for capture of trace data. Figure 2–27. Required System for ETM Usage Ethernet Agilent (HP) Trace port analyzer with E5903A 301 TI CCS Ver 2.0 or higher...
Various standard memories via the external memory interface (EMIF) Various system peripherals via the TI peripheral bus (TIPB) bridge Figure 3–1 shows the OMAP5910 device with the DSP subsystem high- lighted. Figure 3–2 shows the subsystem and the modules with which it inter- faces.
Page 134
Architecture Overview The DSP subsystem has the following components: DSP module: TMS320C55x (C55x) DSP CPU core Tightly coupled hardware accelerators—discrete cosine transform/in- verse discrete cosine transform (DCT/IDCT), motion estimation, and half-pixel interpolation Tightly coupled memories and their interfaces—dual-access RAM (DARAM), single-access RAM (SARAM), programmable dynamic ROM (PDROM), instruction cache External memory interface (EMIF) that connects the CPU to external and loosely coupled memories...
TMS320C55x DSP CPU Overview 3.2 TMS320C55x DSP CPU Overview Features for the high-performance, low-power C55x DSP CPU include: Advanced multiple-bus architecture with one internal program memory bus and five internal data buses (three dedicated to reads and two dedicated to writes) Unified program/data memory architecture Dual 17-bit x17-bit multipliers coupled to 40-bit dedicated adders for non- pipelined single-cycle multiply accumulate (MAC) operations...
Advanced low-power complimentary metal-oxide semiconductor (CMOS) process 3.2.2 Hardware Acceleration Modules The OMAP5910 device contains several hardware acceleration modules to improve performance and reduce power consumption for certain computa- tions relating to image and video processing. These coprocessors include: DCT/IDCT accelerator...
Data write buses EB, FB (2 x 16) For details on CPU architecture and instruction set, see the following documents: TMS320C55x Technical Overview (SPRU393) TMS320C55x DSP CPU Reference Guide (SPRU371) TMS320C5510 DSP Functional Overview (SPRU312) (only CPU sections apply to the OMAP5910 device)
DSP Memory 3.3 DSP Memory The DSP subsystem contains four types of tightly coupled memory to enable maximum efficiency of the DSP CPU. Dual-access RAM (DARAM) Single-access RAM (SARAM) Programmable dynamic ROM (PDROM) Configurable instruction cache structure The CPU uses six sets of buses to simultaneously fetch up to 32 bits of pro- gram and read up to 48 bits of data operands from memory (or write up to 32 bits to memory).
DSP Memory Figure 3–5. DSP Memory Connections 12 blocks of 8K bytes 8 blocks of 8K bytes 1 block of 32K bytes DARAM SARAM PDROM P bus B bus C bus external memory D bus E bus F bus 3.3.1 Internal Memory The DARAM (64K bytes) can support up to two memory accesses in one CPU clock cycle into each RAM block.
The DSP I-cache on OMAP5910 functions as described in the TMS320C55x DSP Instruction Cache Reference Guide (literature number SPRU576). See this document (I-Cache Type A section) for additional details on the DSP I-cache operation.
8 blocks * The DMA controller references byte addresses. (Table A) To access control and data registers associated with various OMAP5910 peripherals, the DSP uses 16-bit I/O space. This space is referenced 01_0000 00_8000 by using appropriate I/O access qualifiers with load or store instructions.
DSP Memory 3.3.5 Peripheral Register Addresses The DSP CPU and the DMA controller can access several classes of peripheral devices: DSP private peripherals (see Chapter 8) Three general-purpose timers A watchdog timer An interrupt handler MPU/DSP shared peripherals (see Chapter 10) Communications mailbox GPIO control General-purpose UART...
DMA Controller 3.4 DMA Controller Acting in the background of MPU operation, the DSP DMA controller can: Transfer data among internal memory, external memory, and peripherals residing on the DSP public peripheral bus Transfer data between the MPUI and internal memory Figure 3–7 shows the ports serviced by the DMA controller within the context of the DSP subsystem.
Figure 3–8). To arbitrate simultaneous requests, the DMA controller has one programmable service chain that is used by each of the standard ports. The complete operation of the OMAP5910 DSP DMA controller is described in detail in the Direct Memory Access (DMA) Controller section of the TMS320C55x Peripherals Reference Guide (literature number SPRU317).
DMA Controller Figure 3–8. Example of DMA Configuration SARAM DARAM EMIF Peripheral bus bridge MPUI P B C D E F P B C D E F P B C D E F IOD IOE SARAM port DARAM port EMIF port Peripheral MPUI port controller...
DMA Controller 3.4.1.1 DMA Channel Read Synchronization vs. Write Synchronization When a DMA channel is configured for synchronization, the synchronization event is tied to the element read operation or the element write operation depending on the source and destination ports. There are three general cases (see Table 3–4): Case 1: Source port is peripheral;...
DSP DMA Event Mapping Table 3–6 defines the mappings of the DMA channel synchronization settings to the different request sources that can be used to create DSP DMA events on OMAP5910. Table 3–6. DSP DMA Mapping DSP DMA Synchronization [4:0]...
TIPB Bridge 3.5 TIPB Bridge The TIPB bridge module manages access to peripheral control and data regis- ters by the DSP CPU, DSP DMA controller, and MPUI via two peripheral buses (see Figure 3–9): Private TIPB: peripherals connected here (timers, interrupt handler) cannot be accessed by the MPU via the MPUI.
TIPB Bridge 3.5.1 Control Mode Register (CMR) The CMR indicates shared access mode/host-only mode (SAM/HOM) status of the MPUI and bus error condition status for accesses to the TIPB bridge. It also controls CPU priority versus the MPUI and DMA for accesses to peripherals on the TIPB bridge.
TIPB Bridge 3) DMA If CPU_Priority = 0, the CPU, MPUI, and DMA accesses to the TIPB bridge are arbitrated in rotating priority fashion. Wait state bits for strb1 and strb2 Strb1 field sets the access rate for the following peripherals: TIPB registers CLKM2 registers Strb2 field sets the access rate for the following peripherals:...
TIPB Bridge Time-out[6:0] This field specifies the number of cycles that can elapse before the TIPB returns a bus error condition. The seven-bit field specifies the number of wait states. The time-out period is determined as Time-out = value of time out[6:0] + 2 measured in DSP subsystem master clock cycles The default value is 0x7f (127).
MPU Interface 3.6 MPU Interface The MPU interface (MPUI) is a 16-bit parallel port that allows the MPU and the system DMA controller to communicate with the DSP and its peripherals, facili- tating software downloads and data transfers. The MPUI provides the MPU with access to the full memory space of the DSP (16M bytes).
MPU Interface the same memory at the same time, priority is given to the DSP controllers. The MPU domain access in SAM is synchronized to the internal DSP CPU clock, which can add access latency for the MPU transfers. HOM provides the MPU with exclusive access to the DSP SARAM or public peripherals, primarily to support high-speed transfers from to DSP during DSP reset or IDLE conditions.
MPU Interface 3.6.3 ST3—HOM_R Bit (Bit 9) The MPUI RAM is the portion of the DSP RAM that is accessible by the MPUI. The HOM_R bit determines/shows whether the MPUI RAM is owned only by the MPUI or shared by the host processor and the C55x DSP: 0: Off The MPUI RAM is shared by the host processor and the DSP.
EMIF 3.7 EMIF The external memory interface (EMIF) is a DSP subsystem module that gives the DSP access to the shared system memory managed by the traffic control- ler. The EMIF interfaces directly to a 32-bit wide system bus. This bus can operate at the CPU clock rate with sustained throughput during burst accesses.
The DSP MMU maps the 16M bytes of the DSP virtual external addresses to anyplace in the 4G-byte address space of the OMAP5910 device. At reset the MMU is disabled and the DSP external memory space is mapped to the first 16M bytes of CS0 system memory.
OMAP5910. The clock domains in the OMAP5910 platform are synthesized by the DPLL1. The DPLL input clock source is externally supplied from the CLKIN pin.
Two MCSIs—MCSI1 and MCSI2 These peripherals are clocked by the DSPXOR_CK signal, which is a buffered version of the OMAP5910 CLKIN signal. The access rate to these peripherals is configured by strobe 2 control bits in the DSP TIPB CMR register. See Section 3.5.1, Control Mode Register.
Register. 3.10.4 Boot Mode for DSP Subsystem The OMAP5910 device contains a bootloader that is a ROM-based utility residing in the DSP subsystem ROM. It consists of a program (code) that facili- tates downloading (bootloading) of DSP code into the DSP subsystem internal memory from either the DSP EMIF interface to the traffic controller or the MPUI interface when it is held in reset by the MPU.
System Operating Details 3.10.4.1 Boot Modes The DSP is reset by two signals: nRESET is a global reset (active low) that resets the DSP subsystem ex- cept for the TIPB interrupt priority encoder, the DSP EMIF configuration registers, and the MPUI port control logic. nMCURESET is a reset signal driven by the MPU (active low).
System Operating Details 3.10.4.2 Boot Table Formats For 16-bit boot download, the boot table in external memory must be in the format shown in Table 3–14. Table 3–14. External Memory Boot Table for 16-Bit Boot Download Word Address (16-Bit Word) Contents Start of External Number of elements of the first section to transfer = N1.
System Operating Details Table 3–14. External Memory Boot Table for 16-Bit Boot Download (Continued) Word Address Contents (16-Bit Word) 2nd word of last section to transfer ..NLth word of last section to transfer 0000h to indicate the end of source program For 32-bit boot download, the the boot table in external memory must be in the format shown in Table 3–15.
Page 174
System Operating Details Table 3-15. External Memory Boot Table for 32-Bit Boot Download (Continued) Word Address Contents (16-bit word) 2nd word of 2nd section to transfer ..N2th word of 2nd section to transfer ..Number of elements of the last section to transfer = NL Most significant word of destination address for the last section.
OMAP5910 system memory resources (SRAM, SDRAM, flash, ROM, etc.). The TC also manages accesses by the MPU or the USB host. The USB host is an internal OMAP5910 peripheral connected on the local bus, so the TC contributes in managing USB host accesses.
Introduction Figure 4–2. Traffic Controller To/from To/from MPUI port MPUI Traffic controller SRAM MPU bus Flash SBFlash Slow bus Slow I/F DMA MPUI-DMA Slow port TI peripheral port (public) SDRAM Fast I/F DMA Fast port TIPB System TI peripheral Fast bus port MPU bus (private)
Single and burst access The memories accessed by the TC are separated into two groups: External memory is memory that is not part of the OMAP5910 device. It can be SDRAM, flash, ROM, RAM, etc. External memory is accessed using the external memory interface (EMIF). The TC has two separate memory interfaces to access the external memories.
Page 179
Introduction The TC provides each of the four hosts with: 32-bit single or burst access to memory (must be aligned with a[1-0] = 00) Size adaptation for 8-, 16-, or 32-bit words, with the requirement that address must be aligned on the correct bit boundary. For example, 32-bit access must be aligned on 32-bit boundary, 16-bit access must be aligned on 16-bit boundary, and so forth.
† The interface to these memory devices is activated via internal address decoding. There is no external chip select. The OMAP5910 peripherals are mapped on the MPU memory space in two different segments: through STROBE0 (public peripherals) and STROBE1 (private peripherals). Each peripheral has a range of 2K bytes.
IMIF Priority Handler This memory interface has two software-selectable priority algorithms for resolving simultaneous access requests: least recently used and dynamic priority. The priority scheme is shared with the EMIFS and EMIFF and is set OMAP5910 configuration registers (bit LRU_SEL FUNC_MUX_CTRL_0).
Active-low chip-select for device FLASH.CS3 – Active-low chip-select for device † FLASH.CS2 and FLASH.BAA are multiplexed on the same device pin. Pin function is selected using the OMAP5910 configu- ration register, FUNC_MUX_CRTL_0. The FLASH.CS2 functionality is default. Memory Interface Traffic Controller 4-13...
Page 188
FLASH.BE 3 – 0 External byte enable † FLASH.CS2 and FLASH.BAA are multiplexed on the same device pin. Pin function is selected using the OMAP5910 configu- ration register, FUNC_MUX_CRTL_0. The FLASH.CS2 functionality is default. Note: OMAP5910 multiplexes the FLASH.CS2 and FLASH.BAA pin functionality to the same device pin.
Page 189
Memory Interfaces At reset, all requestors are initially in the low-priority queue and the time-out registers are set to minimum value for each requestor. You must program these registers before using dynamic priority. The low-priority queue order is: Local bus DMA (all channels including LCD) The high-priority queue order is: DMA transfer involving LCD channel...
Page 190
Memory Interfaces The following operations are also supported for burst flash devices: Synchronous burst read mode (for Intel and AMD flashes) An additional read mode is provided that supports burst read on page mode ROM devices. Figure 4–3 through Figure 4–7 show the external timing of the protocols used by the EMIF slow interface.
In synchronous modes a selectable retiming feature enables read data to be latched by a delayed EMIFS reference clock. The retiming feature accounts for delays through the OMAP5910 input/output pins by feeding back FLASH.CLK to offer optimum data and clock alignment. You can select the re- timing mode using the RT bit in the EMIFS chip-select configuration registers.
Memory Interfaces 4.3.2.5 Asynchronous Read Operation Asynchronous read mode is selected by programming the RDMODE bit field to 000 in the corresponding EMIF slow chip-select configuration register. This is the default mode at reset. The following characteristics describe asynchronous read mode operation. The chip-select pulse width depends on the RDWST bit field of the EMIFS chip-select configuration register.
Page 193
Memory Interfaces 4.3.2.6 Asynchronous Page Mode Read Operation The asynchronous read operation (page mode) is similar to the asynchronous read, except that the number of wait states is different between the first access and the subsequent accesses within the page. This mode of operation is selected by programming the following fields of the EMIF slow chip-select configuration registers (see Table 4–13, EMIF Slow Chip-Select Configuration Registers).
Memory Interfaces Figure 4–4. Asynchronous Page Mode 8x16-Bit Read Operation on a 16-Bit Width Device (8 Words per Page) TC Clock (internal) EMIFS Ref (internal) FLASH.CLK N cycles FLASH.CS_[X] FLASH.ADV P cycles Addr4 FLASH.A(24:1) Add0 Add1 Add2 Add3 Add5 Add6 Add7 FLASH.D(15:0) FLASH.OE...
Page 195
The synchronous read mode is selected for each device by setting the RDMODE configuration bit field to 100. In this mode of operation, FLASH.CLK is driven on the OMAP5910 device pin. Both AMD burst flash and Inter burst flash have three modes of operation:...
Memory Interfaces 4.3.2.8 Asynchronous Write With WE Operation The asynchronous write is used for both file flash and burst flash devices. Figure 4–7 shows the timing diagram. Burst write operation is not supported. Figure 4–7. Asynchronous Write With WE Operation FLASH.CLK Î...
Page 198
EMIFS Not-Ready Functionality The EMIFS interface includes a feature that allows an external device to assert a not-ready signal via the OMAP5910 FLASH.RDY pin. Two modes of not- ready are available: classic and dynamic. In either mode, if FLASH.RDY is low, the external device is not ready.
Memory Interfaces mode is recommended only for 16-bit accesses since the OMAP5910 EMIFS keeps chip-select and write enable active between the two accesses gener- ated by one 32-bit access to EMIFS. While nothing prevents the use of 32-bit accesses in DPRAM interface mode, avoid it if address must be known valid while write enable is active.
Page 200
Memory Interfaces Dynamic priority Dynamic priority uses high- and low-priority queues. Each requestor, except the MPU, has a time-out register allocated to it (see Time-Out Registers in Section 4.4). These registers hold the number of clock cycles that a low-priority queue request has to wait before it is moved from the low-priority queue to the high-priority queue.
The self-refresh mode (idle) and autorefresh (normal operation) Automatic generation of MRS and EMRS commands to the SDRAM by writing to a mirror configuration register within the OMAP5910 device Burst sizes of 1x8, 1x16, 1x32, and 4x32 for all accesses and 8x16 burst access for LCD.
Page 202
To make SDRAM memory accessible, its internal mode register must first be configured. The MRS register contains the protocol information used to com- municate with the OMAP5910 device (burst size, latency, write burst, etc.). The EMRS register enables certain low-power characteristics for the SDRAM.
Page 203
SDRAM Self-Refresh Protection The traffic controller idle mode is entered after an internal request and acknowledge protocol with the OMAP5910 clock generator and system reset module. In idle mode, the traffic controller clock is stopped. If the clock remains idle for more than 64 milliseconds and the SDRAM was not entered into self refresh mode, SDRAM data corruption results.
Page 204
Memory Interfaces Caution: Self-Refresh Mode When the EMIFF SDRAM is in self-refresh mode, the EMIFF does not respond to TIPB requests including MRS writes. To respond, the SLFR bit must be cleared by firmware. Writes to TC registers which would normally cause EMIFF to perform an action have no effect while EMIFF is in self-refresh mode.
Memory Interfaces Figure 4–8. SDRAM Write Single 32-Bit Word With Burst Stop ACTV0 WRITE STOP ACCESS_REG ACCESS_GRANT COMMAND ADDRESS B0/R0 B0/C0 Ignored C0+1 C0+2 CURRENT_COL C0+1 CURRENT_SIZE DVALID SAVE_ADD LAST_DATE Note: WRITE (burst reduced to 2) is interrupted by a STOP command because no new request is pending. Memory Interface Traffic Controller 4-31...
Memory Interfaces Figure 4–9. SDRAM Write Single 16-Bit Half-Word With Burst Stop ACTV0 WRITE STOP ACCESS_REG ACCESS_GRANT COMMAND ADDRESS B0/R0 B0/C0 Ignored C0+1 CURRENT_COL CURRENT_SIZE DVALID SAVE_ADD LAST_DATE Note: WRITE (burst reduced to 1) is interrupted by a STOP command because no new request is pending. 4-32...
Memory Interfaces Figure 4–11.SDRAM Read Single 16-Bit Half-Word With Burst Stop ACTV0 READ STOP ACCESS_REG ACCESS_GRANT COMMAND ADDRESS B0/R0 B0/C0 L = 3 C0+1 CURRENT_COL CURRENT_SIZE DVALID SAVE_ADD LAST_DATE Note: READ (burst reduced to 1) is interrupted by a STOP command because no new request is pending. 4-34...
Memory Interfaces Figure 4–17. SDRAM Write Single Followed by Write Burst 6 on the Same Bank and Different Page ACTV0 WRIT STOP ACTV0 WRIT STOP ACCESS_REG ACCESS_GRANT t rc = 9 COMMAND t ras = 5 ADDRESS B0/R0 B0/C0 B0/R0 B0/R5 C0+1 C5+1 C5+2 C5+3 C5+4 C5+5...
Traffic Controller Memory Interface Registers Table 4–12. EMIF Slow Interface Configuration Register (EMIFS_CONFIG_REG) Reset Field Value Description Access Value 31–5 Reserved Read is undefined. Writes must be zero. All 0 Ready signal. This bit is a copy of the FLASH.RDY input pin as sampled by TC clock.
Specifies EMIFS data bus width. 16-bit bus. This is the appropriate setting for OMAP5910. Reserved. Do not use this setting on OMAP5910. (BW bit reset value depends on the chip-select: For CS0 and CS3, BW = 0; For CS1 and CS2, BW = 1.
Traffic Controller Memory Interface Registers Table 4–13. EMIF Slow Chip-Select Configuration Registers (EMIFS_CS0_CONFIG...EMIFS_CS3_CONFIG) (Continued) Reset Field Value Description Access Value RDWST Number of wait states for asynchronous read 1111 operation (see Table 4–15). Number of inserted clock cycles in protocol (value matches the value programmed in Intel flash devices).
Traffic Controller Memory Interface Registers Table 4–15. Wait Cycles Insertion RDWST Number of Cycles Inserted There is no automatic hardware adjustment of the programmed latencies when the system clock frequency changes. The following restrictions apply when synchronous burst read Intel protocol is selected: Only continuous burst mode is supported Only sequential data access order is supported...
Traffic Controller Memory Interface Registers Table 4–16. EMIF Fast Interface SDRAM Configuration Register 1 (EMIFF_SDRAM_CONFIG) (Continued) Reset Field Value Description Access Value SDRAM power-down enable. Controls power-down state of SDRAM interface: SDRAM interface is not powered down. SDRAM interface is powered down. PWD is one of the prerequisites to meet TC idle.
Data is single buffered with the return clock from SDRAM. Data from SDRAM is double buffered. Data is first clocked on return clock from SDRAM, then with the OMAP5910 internal SDRAM clock. SLRF When set, places the SDRAM in self-refresh mode. Mode is automatically exited upon the generation of any SDRAM access.
Traffic Controller Memory Interface Registers Table 4–17. SDRAM Internal Organization (Continued) Memory Size Number Of Register Value (M Bits) Size Of Data Bus Banks † 1010 1011 † 1100 1101 † 1110 1111 † Unavailable bank number (not supported). Do not use this setting. Note: Reset value = 0x0h.
Traffic Controller Memory Interface Registers Table 4–19. SDRAM Timing Requirements Meeting this Timing With SDRAM.CLK = SDRAM Timing 60 MHz (16.7 ns ac Parameters Requirements (ns) Period) (trwl) – – † Write is never interrupted by precharge command directly. ‡ Neither read or write with autoprecharge is supported. For 60 MHz, timing can be met by using the SDF1 timing configuration.
EMIFF operates, but rather a setting for the SDRAM MRS register.) Note: When the CONF_MOD_EMRS_CTRL bit field (bit 13) of the OMAP5910 control register (MOD_CONF_CTRL_0) is set, the device reconfigures bank settings to write out the EMIFF_MRS register as EMRS commands (see Table 4–21).
Traffic Controller Memory Interface Registers Table 4–21. EMIF Fast Interface SDRAM MRS Register—EMRS Mode (EMIFF_MRS) Reset Field Value Description Access Value 31–5 Reserved Read is undefined. Writes must be zero. Note 1 4–3 TCSR SDRAM EMRS register temperature compensated self-refresh setting: Note 1 70 degrees Celsius maximum case temperature 45 degrees Celsius maximum case temperature...
Traffic Controller Memory Interface Registers The three time-out registers store the number of clock cycles before DSP, DMA, LCD, LB requests are made high-priority in dynamic priority scheme for the TC (see Table 4–22 through Table 4–24). Table 4–22. Time-Out 1 Register (TIMEOUT1) Reset Field Description...
Traffic Controller Memory Interface Registers The endianism register (ENDIANISM) is used to control endianism conversion in the DSP memory management unit endianism block. Table 4–25. Endianism Register (ENDIANISM) Reset Field Value Description Access Value 31–2 Reserved Read is undefined. Writes must be zero. All 0 SWAP Byte swap (8 bits)
Traffic Controller Memory Interface Registers Table 4–27. EMIF Slow Wait State Configuration (EMIFS_CFG_DYN_WAIT) Reset Field Value Description Access Value 31–4 Reserved Read is undefined. Writes must be zero. All 0 DYNW_CS3 Specifies function of FLASH.RDY for CS3. Enable classic not-ready for EMIFS CS3. Enable dynamic not-ready for EMIFS CS3.
4.5 Interfacing Memories With the OMAP5910 Device This section provides two examples of how to connect memories to the OMAP5910 device. Many scenarios can be considered using different kinds of memories. For flash memories, Intel and Hitachi products are used. For SDRAM and SRAM, Hitachi and Toshiba products are used, respectively.
Chapter 5 System DMA Controller This chapter describes the system DMA controller for the OMAP5910 multimedia processor. Topic Page Introduction ..........
MPU operation. It is designed to off-load the block data transfer function from the MPU processor. Figure 5–1 shows the OMAP5910 device with the DMA controller highlighted. Figure 5–2 shows the controller in more detail.
Introduction Figure 5–2. DMA Controller Block Diagram Addr To interleaver Local Port DOUT Local Interleaver Request Addr Allocator EMIFS Port DOUT EMIFS FIFO 0 Interleaver Configuration register Dma _nreq bank 0 (5:0) R/W Unit 0 Interrupt generator Addr EMIFF Port DOUT EMIFF Interleaver...
Page 237
Introduction Transfers are made through a physical channel that can be thought of as a pipe that connects a source and a destination for the duration of a transfer. Data flows through this pipe from the source to the destination. After the transfer is completed, the pipe (channel) can be used to perform other data transfers that involve the same or other sources and destinations.
Page 238
Introduction The system DMA controller is controlled by the MPU (via the TIPB). The DMA controller meets the high-rate-flow requirements of the multichannel applica- tions used by wireless base stations. The system DMA controller is designed for low-power operation. Its clock can be automatically disabled as required.
Page 239
Introduction Memory-to-memory transfer granularity of 8, 16, and 32 bits. Only the number of programmed bytes is transferred; that is, there are no trailing or dirty bytes at the end of transfer. TIPB-to-memory transfer: When performing DMA transfers from a TIPB peripheral, is it ideal that the peripheral FIFO size be 16 bytes, which corresponds to the DMA channel FIFO size.
Introduction Table 5–1. Possible Data Transfers Destinations EMIFS EMIFF IMIF TIPB MPUI Local Bus vs. Sources EMIFS bus EMIFF bus IMIF bus TIPB MPUI Local bus Table 5–2. Possible Transfer Sizes and Types Destination: Destination: Destination: Destination: Destination: Destination: 16-Bit 32-Bit 8-Bit TIPB 8-Bit Non-TIPB...
External Connections 5.2 External Connections The system DMA controller is interconnected with other OMAP5910 components as shown in Figure 5–3. Figure 5–3. System DMA External Connections EMIFS DMA_IT_NF(5–0) EMIFS port IMIF IMIF port EMIFF EMIFF port Local System DMA Local bus...
Generic Channels 5.3 Generic Channels This section discusses the following generic channel topics: Transfers Addressing modes Data packing and bursting Data alignment Constraint on channel configuration parameters Endianism Interrupt generation Memory space protection 5.3.1 Transfers 5.3.1.1 Transfer Sources and Destination Each DMA channel can be configured independently from other channels.
Generic Channels 5.3.1.2 Transfer Control Figure 5–5. Basic Flow of DMA Transfer MPU loads the transfer configuration registers. DMA channel Interrupt generated IDLE No request DMA request Synchronized request? Hardware signal OK? Transfer one element/frame Transfer completed 5-10...
Page 244
Generic Channels 5.3.1.3 Transfer Start There are two ways to start a DMA transfer: Software start (software request): After setting up the configuration regis- ters of a DMA channel, the processor activates the transfer in this channel by writing the DMA_CCR.en bit of this channel. The transfer immediately starts.
Page 245
Generic Channels 5.3.1.5 Autoinitialization A DMA channel (synchronized or not) can operate in two modes. Single transfer mode In this mode, a channel stops when the current transfer finishes Autoinitialization mode In this mode, a channel loads a new configuration and automatically restarts a new transfer when the current one finishes.
Generic Channels To avoid the reload of a configuration when the MPU programs the channel, the MPU can use the autoinitialization bits of the DMA_CCR register, which are described in Table 5–3. Table 5–3. Autoinitialization Configuration Bits Summary AUTOINIT END_PROG REPEAT Autoinitialization Behavior No autoinitialization...
Generic Channels Figure 5–6. Memory Representation Byte @ addr 00 Byte @ 01 Element size Element n Byte @ 02 (Can be 1, 2, 4. Here: Element size = 4) Byte @ 03 Element index (address increments by this Byte @ 04 value after an element) Frame n Byte @ 05...
Page 248
Generic Channels FN is the number of frames in the block, 1 ≤ FN ≤ 65535. EN is the number of elements per frame, 1 ≤ EN ≤ 65535. ES is the number of bytes per element, ES ∈ {1, 2, 4}. An element can be: 8-bit scalar data, s8 16-bit scalar data, s16...
Page 249
Generic Channels 5.3.2.2 Post-Incremented Addressing Mode Address is always incremented by 1. a(0) =SA a(i) =a(i – 1) + 1, 1 ≤ i ≤ BS –1 where: a(i) is the address of the byte number i within the transfer. SA is the start address of the transfer. BS is the block size in bytes.
Generic Channels a(0) = SA a(i) = a(i – 1) + 1 if (i mod ES) ≠ 0 and (i mod FS) ≠ 0, 1 ≤ i ≤ BS – 1 a(i) = a(i – 1) + EI if (i mod ES) = 0 and (i mod FS) ≠ 0, 1 ≤ i ≤ ΒS – 1 a(i) = a(i –...
Generic Channels Table 5–4. Packing and Splitting Summary Data Type Port Access Capability Packing/Splitting – pack 2 x s8 => 16 pack 4 x s8 => 32 split s16 => 2 x 8 – pack 2x s16 => 32 split s32 => 4 x 8 split s32 =>...
Page 252
Generic Channels A transfer to/from a DMA port with 32-bit only access capability must be set up as follows: Element size is a multiple of four. Start address is aligned on a 32-bit word. If frame index is used, it must always produce addresses aligned on a 32-bit word.
Generic Channels Table 5–5. Data Block to Transfer Address Byte 0 Byte 1 Byte 2 Byte 3 Element 1, 1 Element 1, 2 Element 1, 3 Element 1, 4 Element 1, 5 Element 2, 1 Element 2, 2 Element 2, 3 Element 2, 4 Element 2, 5 The computed addresses and access types are as identified in Table 5–6.
Generic Channels 5.3.4 Data/Address Alignment During a transfer, all the addresses computed by the DMA must be aligned on the type of data transferred: If the data type is s8 (8 bits scalar data), addresses can have any value. If the data type is s16 (16 bits scalar data), addresses must be aligned on 16-bit word boundary (the least bit of the address is always 0).
The MSB of the word is placed on the LSB of the bus. The internal FIFOs of the system DMA are big endian. All system DMA ports are treated as little endian on OMAP5910. Therefore, the system DMA con- tains adaptation logic to convert incoming data to big endian and outgoing data back to little endian.
Generic Channels 5.3.7 Interrupt Generation Each DMA physical channel can generate an interrupt to the processor to reflect the transfer status. Each DMA physical channel has a dedicated inter- rupt line to the processor. All the DMA interrupts are level interrupts. For every DMA logical channel, the following interrupt sources can be programmed: End of block: The last byte of the transfer has been written in destination.
Generic Channels The system DMA has nine physical channels; each has the capability to gener- ate interrupts. The DMA has seven interrupt lines, some of which are shared by two physical channels. Each of these seven interrupt lines is routed as an interrupt input on the MPU level2 interrupt handler.
Generic Channels Figure 5–9. Data Read Format—One Physical Channel Physical channel 3 status register 5.3.8 Memory Space Protection To set up a transfer, the software specifies: source port with an address that must hit in the source port memory space. A destination port with an address that must hit in the destination port memory space.
LCD Dedicated Channel 5.4 LCD Dedicated Channel The LCD channel transfers 16-bit data to the LCD controller from a video frame buffer stored in memory. 5.4.1 Functional Description The memory source for the LCD dedicated transfer can be either IMIF or EMIFF.
LCD Dedicated Channel the DMA to the LCD FIFO, the maximum burst length is set to eight. Only near frame boundaries, in case of nonmultiple frames, are single transfers started; otherwise, all requests to the source memory are in 8 x 16 burst requests. The LCD channel priority bit is fixed high (hard-coded LCD channel constant parameter).
LCD Dedicated Channel BF2 is bottom address for frame 2. TF1 is top address for frame 1. TF2 is top address for frame 2. DFM is the dual-frame mode. In other words, the next address is always the current address + 2 unless the frame boundaries (inclusive) have been reached (address is a byte address;...
LCD Dedicated Channel to continue until the LCD enable signal (dma_lcd_en) is disabled one time (LCDEN = 0). This mechanism is provided to avoid having dummy high-priority requests to the ports because the LCD channel’s frame data flow has been corrupted.
LCD Dedicated Channel The transfer runs, and an interruption is generated at the end of the frame. Figure 5–11.LCD One Frame Mode Transfer Scheme SDRAM lcd_top_frame1 0x0B 0000 Video frame controller 0x0B 00DE lcd_bot_frame1 When an interrupt occurs, read the DMA_LCD_CTRL register to find the source of the interrupt.
DMA Request Mapping 5.5 DMA Request Mapping Table 5–9 shows the DMA request mapping for the OMAP5910 device. Table 5–9. DMA Request Mapping MPU System DMA Requests MPU System DMA MCSI1 TX DMA_REQ_01 MCSI1 RX DMA_REQ_02 C RX DMA_REQ_03 C TX...
Page 266
DMA Request Mapping Table 5–9. DMA Request Mapping (Continued) MPU System DMA Requests MPU System DMA Reserved DMA_REQ_025 USB function RX0 DMA_REQ_026 USB function RX1 DMA_REQ_027 USB function RX2 DMA_REQ_028 USB function TX0 DMA_REQ_029 USB function TX1 DMA_REQ_030 USB function TX2 DMA_REQ_031 System DMA Controller 5-33...
Registers 5.6 Registers Table 5–10 describes the DMA controller registers. Note: The DMA control registers are part of a register superset for multiple OMAP- based devices. They are defined for a 16-port, 16-channel DMA controller. Thus as generic as possible a register mapping is provided, so some regis- ters may appear to be almost empty.
Page 268
Registers Table 5–10. DMA Controller Registers (Continued) Size Name Description Address Reset Value (Bits) DMA_CCR_CH1 Channel 1 control 0xFFFED842 0x0000 DMA_CICR_CH1 Channel 1 interrupt control 0xFFFED844 0x0003 DMA_CSR_CH1 Channel 1 status 0xFFFED846 0x0000 DMA_CSSA_L_CH1 Channel 1 source start address 0xFFFED848 lower bits DMA_CSSA_U_CH1 Channel 1 source start address...
Page 269
Registers Table 5–10. DMA Controller Registers (Continued) Size Name Description Address Reset Value (Bits) DMA_CFN_CH2 Channel 2 frame number 0xFFFED892 DMA_CFI_CH2 Channel 2 frame index 0xFFFED894 DMA_CEI_CH2 Channel 2 element index 0xFFFED896 DMA_CPC_CH2 Channel 2 channel progress counter 0xFFFED898 DMA_CSDP_CH3 Channel 3 source destination 0xFFFED8C0 0x0000...
Page 270
Registers Table 5–10. DMA Controller Registers (Continued) Size Name Description Address Reset Value (Bits) DMA_CSSA_U_CH4 Channel 4 source start address 0xFFFED90A upper bits DMA_CDSA_L_CH4 Channel 4 destination start address 0xFFFED90C lower bits DMA_CDSA_U_CH4 Channel 4 destination start address 0xFFFED90E upper bit DMA_CEN_CH4 Channel 4 element number 0xFFFED910...
Page 271
Registers Table 5–10. DMA Controller Registers (Continued) Size Name Description Address Reset Value (Bits) DMA_CSDP_CH6 Channel 6 source destination 0xFFFED980 0x0000 parameters DMA_CCR_CH6 Channel 6 control 0xFFFED982 0x0000 DMA_CICR_CH6 Channel 6 interrupt control 0xFFFED984 0x0003 DMA_CSR_CH6 Channel 6 status 0xFFFED986 0x0000 DMA_CSSA_L_CH6 Channel 6 source start address...
Registers 5.6.1 Generic Channel Registers There is one set of these registers for each generic DMA channel. Although the DMA has a 32-bit TIPB, all registers are in 16-bit format and must be accessed as 16-bit data by the MPU. Table 5–12.
Registers Table 5–12. Channel Source Destination Parameters Register (DMA_CSDP) (Continued) Reset Name Value Description Type Value 12–9 Transfer destination 0000 A unique identifier is given to each port. This field indicates which port is the originator of the transfer. 0000 EMIFF 0001 EMIF...
Page 276
Registers Table 5–12. Channel Source Destination Parameters Register (DMA_CSDP) (Continued) Reset Name Value Description Type Value SRC_PACK Source packing The DMA ports can have a data bus width different from that of the type of data moved by the DMA channel. For example, s8 data can be read on a 32-bit DMA port.
Page 277
Registers Table 5–12. Channel Source Destination Parameters Register (DMA_CSDP) (Continued) Reset Name Value Description Type Value 1–0 DATA_TYPE Defines the type of the data moved in the channel s8, 8 bits scalar s16, 16 bits scalar s32, 32 bits scalar Illegal value Start address must be aligned on the boundary of the type of data moved.
Page 278
Registers Table 5–13. DMA Channel Control Register (DMA__CCR) Reset Name Value Description Type Value 15–14 DST_AMODE Destination addressing mode This field is used to choose the addressing mode on the destination port of a channel. Constant address Post-incremented address Single index (element index) Double index (element index and frame index) 13–12 SRC_AMODE Source addressing mode...
Registers Table 5–13. DMA Channel Control Register (DMA__CCR) (Continued) Reset Name Value Description Type Value AUTO_INIT Autoinitialization at the end of the transfer The channel stops at the end of the current transfer. When the current transfer is complete, the channel automatically reinitializes itself and starts a new transfer.
Page 280
Registers Table 5–13. DMA Channel Control Register (DMA__CCR) (Continued) Reset Name Value Description Type Value Frame synchronization This bit is used to program the way a DMA request is serviced in a synchronized transfer. An element is transferred each time a DMA request is made.
Registers Table 5–14. DMA Channel Interrupt Control Register (DMA_CICR) Reset Name Value Description Type Value 15–7 RESERVED RESERVED BLOCK_IE End block interrupt enable The channel does not interrupt the processor when the transfer of the block completes. The channel sends an interrupt to the processor when the transfer of the block completes.
Registers Table 5–14. DMA Channel Interrupt Control Register (DMA_CICR) (Continued) Reset Name Value Description Type Value TOUT_IE Time-out interrupt enable The DMA does not send an interrupt to the processor if a time-out error occurs. The DMA sends an interrupt to the processor if a time-out error occurs either in the source or in the destination port of the channel.
Page 283
Registers Table 5–15. DMA Channel Status Register (DMA_CSR) (Continued) Reset Name Value Description Type Value SYNC Synchronization status This bit is not set to one when an interrupt is generated, but when a DMA request is made in a synchronized channel. When the DMA request is serviced, the bit returns to zero.
Registers This register is written by the DMA to reflect the channel status. It can be read by the processor (by polling or after an interrupt) to see the channel status. Af- ter a functional read, all the DMA_CSR bits are automatically cleared. The DMA_CSR bit is not cleared after an emulation read via the debugger.
Registers Table 5–19. DMA Channel Destination Start Address–Upper Bits Register (DMA_CDSA_U) Reset Name Description Type Value 15–0 Destination Upper bits for the source start address, expressed in Undefined start address, bytes. The destination start address is made of the upper bits concatenation of DMA_CDSA_U and DMA_CDSA_L.
Registers Table 5–23. DMA Channel Element Index Register (DMA_CEI) Reset Name Description Type Value 15–0 Element index Contains the element index, expressed in bytes, used to Undefined compute the addresses when single-index addressing mode is used. Table 5–24. DMA Channel Progress Counter Register (DMA_CPC) Reset Name Description...
Registers Table 5–25. DMA LCD Control Register (DMA_LCD_CTRL) Reset Name Value Description Type Value 15–7 RESERVED LCD_SOURCE Memory source for the LCD channel This bit indicates the memory source for the next LCD transfer. Memory source is EMIFF. Memory source is IMIF. BUS_ERROR_ Status LCD channel register (must be reset after R–R...
Registers Table 5–25. DMA LCD Control Register (DMA_LCD_CTRL) (Continued) Reset Name Value Description Type Value FRAME_MODE Kind of frame mode used for LCD transfer One frame buffer; only registers for frame 1 are used. Two frame buffers; LCD channel reads alternatively top_frame_1 and top_frame_2 5.6.1.1 LCD Top Address for Frame Buffer 1 Registers (DMA_LCD_TOP_F1_L and...
Registers 5.6.1.2 LCD Bottom Address for Frame Buffer 1 Registers (DMA_LCD_BOT_F1_L and DMA_LCD_BOT_F1_ The LCD bottom address registers are two 16-bit registers that contain the bottom address for the video RAM buffer 1. The 32-bit address is obtained by the concatenation of the two 16-bit words as described here: LCD_BOTTOM_F1 = DMA_LCD_BOT_F1_U and DMA_LCD_BOT_F1_L Note: LSB of the 32-bit word is equal to zero.
Registers 5.6.1.3 LCD Top Address for Frame Buffer 2 Registers (DMA_LCD_TOP_F2_L and DMA_LCD_TOP_F2_U) The LCD top address registers are two 16-bit registers that contain the start address for the video RAM buffer 2. The 32-bit address is obtained by the concatenation of the two 16-bit words as described here: LCD_TOP_F2 = DMA_LCD_TOP_F2_U &...
Registers 5.6.1.4 LCD Bottom Address for Frame Buffer 2 Registers (DMA_LCD_BOT_F2_L and DMA_LCD_BOT_F2_U) The LCD bottom address registers are two 16-bit registers that contain the bottom address for the video RAM buffer 2. The 32-bit address is obtained by the concatenation of the two 16-bit words as described here: LCD_BOTTOM_F2 = DMA_LCD_BOT_F2_U and DMA_LCD_BOT_F2_L Note: LSB of the 32-bit word is equal to zero.
The configuration module allows the software to control the different OMAP5910 modes. The device identification registers allow the software to read the different OMAP5910 identification codes. Figure 6–1 shows the OMAP5910 device with the MPU private peripherals highlighted. Figure 6–1. MPU Private Peripherals...
Timer Description 6.2 Timer Description Three 32-bit timers for the operating system provide general-purpose house- keeping functions. These timers are configured either in autoreload or one- shot mode with on-the-fly read capability. The timers generate an interrupt to the TI925T RISC processor when equal to zero. Figure 6–2 shows the 32-bit timer.
Timer Description Table 6–2 provides division values for each PTV field. Table 6–2. PTV Value and Corresponding Division Value Divisor The timer interrupt period is determined in the following manner, where t the clock period of the input clock, LOAD_TIM (see Table 6–1) is the register that holds the value loaded when the timer passes through 0 or when it starts, and PTV is the prescaler field located in the control timer register (CNTL_TIMER):...
Timer Description If LOAD_TIM = 0 and AR (auto-reload mode) = 1, the timer is always 0 and can never decrement. Here the timer interrupt is asserted and stays asserted all the time. Since the timer interrupts are edge-senditive, only one interrupt is recognized because there is one initial edge, and then the interrupt is asserted constantly.
Timer Description 6.2.2 Timer Registers Table 6–4 lists the timer registers. Table 6–5 through Table 6–7 describe the register bits. Base address for timer 1: FFFE:C500 Base address for timer 2: FFFE:C600 Base address for timer 3: FFFE:C700 Bit width: 32 bits Table 6–4.
Page 298
Timer Description Table 6–6. Load Timer Register (LOAD_TIMER) Reset Name Description Value 31–0 LOAD_TIM The value is loaded into the VALUE_TIM when the timer passes Undefined through 0 or when it starts. Table 6–7. Read Timer Register (READ_TIMER) Reset Name Description Value 31–0...
Watchdog Timer 6.3 Watchdog Timer The watchdog timer (see Figure 6–4) can be configured as either a watchdog timer or a general-purpose timer. 6.3.1 Introduction The watchdog timer is power-up enabled and defaults to watchdog timer for the TI925T RISC processor. A watchdog timer requires that the user program or OS periodically write to the count register before the counter underflows.
Watchdog Timer By default, this timer is configured as a watchdog timer and generates a reset of the TI925T RISC processor approximately every 19 seconds, unless you disable or update properly. If you do not, you may during system development encounter an unexpected reset every 19 seconds or so.
Watchdog Timer When the timer has been configured as a general-purpose timer, it can be switched back to watchdog mode by writing a 1 to the watchdog bit of the TIMER_MODE register. In this case, the value loaded into LOAD_TIM is set to the maximum value (0xFFFF) as on power up.
Watchdog Timer Table 6–13. Load Timer Register (LOAD_TIM) Reset Name Description Value 15–0 LOAD_TIM General-purpose timer: FFFF This value is loaded when timer passes through 0 or when it starts. Watchdog timer: Reload timer with this value. Table 6–14. Read Timer Register (READ_TIM) Reset Name Description...
MPU interrupt (IRQ or FIQ—see Figure 6–6) inputs according to that interrupt ILRn configuration bit. A clock request mechanism is implemented to wake up and provide a clock to the interrupt handler when the OMAP5910 device is in one of the sleep modes. 6-14...
6.4.2 MPU Level 2 Interrupt Handler Because the number of interrupts that the OMAP5910 device must manage is greater than 32, a second interrupt handler is used. The resulting interrupt is connected to the IRQ_0 of the TI925T RISC processor interrupt handler, which must be programmed as a level interrupt.
IRQ_ABORT (IRQ_9) is the traffic controller abort IRQ. It is also connected to DSP IRQ_12. This interrupt comes from either a TIPB bus or the MPUI and is caused by a time-out abort. Table 6–16. Level 1 and Level 2 OMAP5910 MPU Interrupt Mapping Default Sensitivity...
Page 309
Level 1 and Level 2 Interrupt Mapping Table 6–16. Level 1 and Level 2 OMAP5910 MPU Interrupt Mapping (Continued) Default Sensitivity Interrupt Line Interrupt Line Incoming Interrupts Configuration on Level 1 on Level 2 IRQ_DMA_CH3 Level IRQ_22 — IRQ_DMA_CH4 Level IRQ_23 —...
Page 310
Level 1 and Level 2 Interrupt Mapping Table 6–16. Level 1 and Level 2 OMAP5910 MPU Interrupt Mapping (Continued) Default Sensitivity Interrupt Line Interrupt Line Incoming Interrupts Configuration on Level 1 on Level 2 MCSI1 combined TX/RX/frame error Level IRQ0...
Interrupt Handler Level 1 and Level 2 Registers 6.6 Interrupt Handler Level 1 and Level 2 Registers There are two sets of interrupt handler registers: one for the level 1 handler, the other for the level 2 handler (see Table 6–17). Table 6–18 through Table 6–24 describe the register bits.
Interrupt Handler Level 1 and Level 2 Registers Table 6–18. Interrupt Input Register(ITR) Reset Name Description Value IRQ_31 Interrupt request—1 indicates that the peripheral occupying the IRQ_31 address space has requested interrupt service from the MPU. An edge-triggered interrupt is stored in this register as an incoming interrupt.
Interrupt Handler Level 1 and Level 2 Registers Table 6–21. Binary-Coded Source FIQ Register (SIR_FIQ_CODE) Reset Name Description Value 4–0 FIQ_NUM This register indicates the IRQ interrupt that is currently being serviced by the MPU. Reading this register clears the corresponding bit in the ITR register if the interrupt is configured as edge triggered.
The OMAP5910 configuration module allows the software of the OMAP5910 device to control the various static modes supported by the device. This module is the primary point of control for the following areas of the OMAP5910 device: Functional I/O multiplexing...
0x0000EAEFh to the COMP_MODE_CTRL_0 register to utilize the pin multiplexing and device configuration features available in native mode. Be careful when enabling the native mode. All OMAP5910 configuration registers reset to 0x0000h at power-on reset. It is advisable to follow the following procedure before enabling the OMAP5910 mode: 1) Determine the desired values for each OMAP5910 configuration register.
The OMAP5910 device implements both pullups and pulldowns on several I/Os. In this document there are several references to pulldowns and pulldown enables. It is proper to assume that if an OMAP5910 device pin has a pullup, the corresponding pulldown enables (enables = 0/disables = 1) the pullup.
OMAP5910 Configuration Registers 6.8 OMAP5910 Configuration Registers Table 6–26 lists the 32-bit read/write configuration registers. Table 6–27 through Table 6–49 describe the register bits. The compatibility mode control 0 register (COMP_MODE_CTRL_0) must be programmed to 0xEAEFh for any of these configuration registers to exercise their associated control. The base address for the configuration registers is FFFE:1000.
Reserved. These bits must always be written as LB_RESET_DISABLE This bit holds the OMAP local bus reset input active. Set this to 1 when using OMAP5910 USB_HHC module. Local bus RESET <= 0 Local bus RESET <= USB_HHC LB reset This bit is valid in compatibility and native modes.
Page 320
USB input vbus_ctrl <= OMAP5910 configuration VBUS_CTRL bit 17–15 RESERVED Reserved. These bits must always be written as NRESET_ENABLE Allows AND gating of OMAP5910 outputs with the OMAP CHIP_NRESET_OUT Disabled Allowed This bit is valid in compatibility and native modes.
Reset Name Value Description Value PWR_MASK_OUT Does not allow AND gating of OMAP5910 outputs with COM_PWR_REQ (GPIO9) and COM_STS (MPUIO3) OMAP5910 input pins Allows AND gating of OMAP5910 outputs with COM_PWR_REQ (GPIO9) and COM_STS (MPUIO3) OMAP5910 input pins This bit is valid in compatibility and native modes.
Reserved. These bits must always be written as 0. 0x00000000 At reset, the OMAP5910 device configuration registers are software compat- ible with previous prototype devices. Writing an 0x0000EAEFh to the compati- bility mode control 0 register (COMP_MODE_CTRL_0) enables the new functional multiplexing registers found at offset 0x10h and above.
Name Description Value 31–16 RESERVED Reserved for future expansion. These bits must be 0x0000 written to 0x0000h when enabling the OMAP5910 configuration registers. 15–0 CONF_COMPATIBILITY_R These bits must be written to 0x0000EAEFh to 0x0000 enable OMAP5910 configuration bits at offset 0x10h and above.
Name Description Value 23–21 CONF_CAM_EXCLK_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to CAM.EXCLK at reset. The control for this I/O is forced to 000 at reset and while in compatibility mode. 20–18 RESERVED Reserved for future expansion. These bits must always be written as 0.
Page 325
Name Description Value 26–24 CONF_CAM_HS_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to CAM.HS at reset. The control for this I/O is forced to 000 at reset and in compatibility mode. 23–21 CONF_CAM_VS_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to CAM.VS at...
Reserved for future expansion. These bits must always be written as 0. 29–27 CONF_GPIO_4_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to GPIO4 at reset. The control for this I/O is forced to 000 at reset and while in compatibility mode.
Page 327
Bits Name Description Value 17–15 CONF_GPIO_12_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to GPIO12 at reset. The control for this I/O is forced to 000 at reset and while in compatibility mode. 14–12 CONF_GPIO_13_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to GPIO13 at reset.
Reserved for future expansion. These bits must always be written as 0. 20–18 CONF_ARMIO_2_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to MPUIO2 at reset The control for this I/O is forced to 000 at reset and while in compatibility mode.
Reserved for future expansion. These bits must always be written as 0. 29–27 CONF_ARM_BOOT_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to MPU_BOOT at reset. The control for this I/O is forced to 000 at reset and while in compatibility mode. 26–15 RESERVED Reserved for future expansion.
The control for this I/O is forced to 000 at reset and in compatibility mode. 23–21 CONF_TX1_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to UART1.TX at reset. The control for this I/O is forced to 000 at reset and in compatibility mode. 20–15 RESERVED Reserved for future expansion.
0. 26–24 CONF_MMC_DAT1_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to MMC.DAT1 at reset. As long as the STATIC_VALID pin is sampled high upon reset, the control for this I/O is force to 000 at reset and while in compatibility mode.
2–0 CONF_UARTS_CLKIO_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to BCLK at reset. The control for this I/O is forced to 000 at reset and in compatibility mode. Table 6–39. Functional Multiplexing Control B Register (FUNC_MUX_CTRL_B)
Name Description Value 8–6 CONF_MCSI2_DIN_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to MCSI2.DIN at reset. The control for this I/O is forced to 000 at reset and in compatibility mode. 5–3 CONF_MCSI2_CLK_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to MCSI2.CLK at...
Page 334
Name Description Value 20–18 CONF_RX2_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to UART2.RX at reset. The control for this I/O is forced to 000 at reset and while in compatibility mode. 17–15 CONF_MCBSP2_DOUT_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to MCBSP2.DOUT...
0x00000 always be written as 0. 14–12 CONF_MMC_DAT3_R These bits control the multiplexing on the OMAP5910 I/O, which defaults to MMC.DAT3 at reset The control for this I/O is forced to 000 at reset. 11–9 RESERVED Reserved for future expansion. These bits must always be written as 0.
Depending upon the pin multiplexing config- uration of any particular I/O, a pulldown may not be available. Consult Appendix A of this document or the OMAP5910 data manual (literature number SPRS197) to determine whether a pulldown exists for each I/O.
Depending upon the pin multiplexing config- uration of any particular I/O, a pulldown may not be available. Consult Appendix A of this document or the OMAP5910 data manual (literature number SPRS197) to determine whether a pulldown exists for each I/O.
Page 338
Depending upon the pin multiplexing config- uration of any particular I/O, a pulldown may not be available. Consult Appendix A of this document or the OMAP5910 data manual (literature number SPRS197) to determine whether a pulldown exists for each I/O.
Page 339
Depending upon the pin multiplexing config- uration of any particular I/O, a pulldown may not be available. Consult Appendix A of this document or the OMAP5910 data manual (literature number SPRS197) to determine whether a pulldown exists for each I/O.
Page 340
Depending upon the pin multiplexing config- uration of any particular I/O, a pulldown may not be available. Consult Appendix A of this document or the OMAP5910 data manual (literature number SPRS197) to determine whether a pulldown exists for each I/O.
Page 341
Depending upon the pin multiplexing config- uration of any particular I/O, a pulldown may not be available. Consult Appendix A of this document or the OMAP5910 data manual (literature number SPRS197) to determine whether a pulldown exists for each I/O.
Page 342
Depending upon the pin multiplexing config- uration of any particular I/O, a pulldown may not be available. Consult Appendix A of this document or the OMAP5910 data manual (literature number SPRS197) to determine whether a pulldown exists for each I/O.
Page 343
Depending upon the pin multiplexing config- uration of any particular I/O, a pulldown may not be available. Consult Appendix A of this document or the OMAP5910 data manual (literature number SPRS197) to determine whether a pulldown exists for each I/O.
Depending upon the pin multiplexing config- uration of any particular I/O, a pulldown may not be available. Consult Appendix A of this document or the OMAP5910 data manual (literature number SPRS197) to determine whether a pulldown exists for each I/O.
Page 345
Depending upon the pin multiplexing config- uration of any particular I/O, a pulldown may not be available. Consult Appendix A of this document or the OMAP5910 data manual (literature number SPRS197) to determine whether a pulldown exists for each I/O.
Page 346
Depending upon the pin multiplexing config- uration of any particular I/O, a pulldown may not be available. Consult Appendix A of this document or the OMAP5910 data manual (literature number SPRS197) to determine whether a pulldown exists for each I/O.
Page 347
Depending upon the pin multiplexing config- uration of any particular I/O, a pulldown may not be available. Consult Appendix A of this document or the OMAP5910 data manual (literature number SPRS197) to determine whether a pulldown exists for each I/O.
Page 348
Depending upon the pin multiplexing config- uration of any particular I/O, a pulldown may not be available. Consult Appendix A of this document or the OMAP5910 data manual (literature number SPRS197) to determine whether a pulldown exists for each I/O.
Page 349
Depending upon the pin multiplexing config- uration of any particular I/O, a pulldown may not be available. Consult Appendix A of this document or the OMAP5910 data manual (literature number SPRS197) to determine whether a pulldown exists for each I/O.
Reserved for future expansion. These 0x00000 bits must always be written as 0. CONF_PDEN_NTRST_R This bit controls the pulldown enable on the OMAP5910 I/O, which defaults to TRST at reset. Pulldown enabled Pulldown disabled CONF_PDEN_TCK_R This bit controls the pulldown enable on the OMAP5910 I/O, which defaults to TCK at reset.
Reset Name Value Description Value CONF_PDEN_MMC_DAT3_R This bit controls the pullup enable on the OMAP5910 I/O, which defaults to MMC.DAT3 at reset. Pulldown enabled Pulldown disabled 7–2 RESERVED Reserved for future expansion. These bits must always be written as 0.
Page 352
Value Description Value CONF_ This bit controls software gating and SOFTWARE_PWR_R inhibiting of the OMAP5910 I/O, which are gated or inhibited by COM_PWR status. If the gating and inhibiting logic are enabled by FUNC_MUX_CTRL_0 (10 – 13) bits and conf_software_gate_ena_r is set to 1, this bit controls the com_pwr gating and inhibiting instead of device pins.
These bits must always be written as 0. CONF_VOLTAGE_COMIF_R This bit controls the drive strength of the OMAP5910 communication processor interface I/O. This allows the interface to be run at 1.8 V nom or 2.75 V nom. Drive strength is 1.80 V Drive strength is 2.75 V...
Description Value CONF_VOLTAGE_FLASH_R This bit controls the drive strength of the OMAP5910 flash interface I/O. This allows the interface to be run at 1.8 V nom or 2.75 V nom. Drive strength is 1.80 V Drive strength is 2.75 V At reset and in compatibility mode, the interface is set for 2.75-V...
Name Value Description Value CONF_MOD_UART3_ This bit determines the clock source of CLK_MODE_R UART3 on the OMAP5910 device. 12 MHz 48 MHz CONF_MOD_UART2_ This bit determines the clock source of CLK_MODE_R UART2 on the OMAP5910 device. 32 kHz/12 MHz (see Chapter 12, UART...
Page 356
Description Value CONF_MOD_MMC_SD_ This is the functional 48-MHz clock request CLK_REQ_R for the OMAP5910 device MMC/SD interface. This bit resets to 0 at reset. This corresponds to the MMC/SD clock not being requested. Set the bit to 1 to request the clock for the MMC/SD interface.
Page 357
This bit allows the user to force the EMRS_BA1_CTRL SDRAM SDRAM.BA[1] pin to a high. With proper disabling of SDRAM accesses from OMAP5910, users can use this to program the EMRS register of the SDRAM with an MRS write instruction. There are no hardware hooks to only assert this when performing an MRS write.
Page 358
Value CONF_MOD_COM_ This bit determines if the UART2.CLKREQ MCLK_12_48_SEL_R output of the OMAP5910 device is 12 MHz or 48 MHz. This bit resets to 0, which causes a 12-MHz clock to be seen on MCLK when UART2.CLKREQ is low. When written to a 1, this bit causes 48-MHz clock to be seen on MCLK when UART2.CLKREQ is low.
Page 359
OMAP5910 Configuration Registers Table 6–49. Module Configuration Control 0 Register (MOD_CONF_CTRL_0) (Continued) Reset Name Value Description Value CONF_MOD_USB_HOST_ Transceiverless link logic (TLL) USB speed HMC_TLL_SPEED_R control. For HMC modes (as defined by HMC_MODE_I and HMC_JTAG_EN_I) where the TLL is used, determines whether the modelling of the device pullup resistor is on the internal D+ or internal D–...
Page 360
OMAP5910 Configuration Registers Table 6–49. Module Configuration Control 0 Register (MOD_CONF_CTRL_0) (Continued) Reset Name Value Description Value CONF_MOD_USB_HOST_ Transceiverless link logic (TLL) USB attach HMC_TLL_ATTACH_R control. For HMC modes (as defined by HMC_MODE_I and HMC_JTAG_EN_I) where the TLL is used, determines whether...
Device Identification 6.9 Device Identification The device identification can be done by software via two registers: The identification code (IDCODE) register identifies the OMAP5910 device. The identification die (ID) register identifies the die. 6.9.1 Identification Code Register The identification code register (IDCODE), shown in Table 6–50, can be split...
The die ID can be read by software via the private TIPB (see Table 6–52). Table 6–52. Die ID Address Space—Private TIPB Bridge Data Device Name Start Address Size in Bytes Access OMAP5910 Die ID FFFE:1800 4 bytes OMAP5910 Die ID FFFE:1804 4 bytes MPU Private Peripherals...
MPU Public Peripherals 7.1 MPU Public Peripherals Figure 7-1 shows the OMAP5910 device with the MPU public peripherals highlighted. Figure 7-1. MPU Public Peripherals Area DSP private Private peripherals OMAP5910 peripheral bus Timers (3) DSP public peripherals Watchdog timer TMS320C55x DSP...
7.2 Camera Interface An 8-bit camera interface (32-bit internal bus on the TIPB side) connects a camera module to the MPU peripheral bus of the OMAP5910 device. The in- terface handles multiple image formats synchronized on vertical and horizon- tal synchronization signals. Data transfer between camera and interface can be done synchronously or asynchronously.
Camera Interface Figure 7-3. Image Data Transfer CAM_LCLK CAM_VS CAM_HS CAM_D TIPB FIFO DMA_REQ Select order 7.2.1.1 Camera Data Validation The incoming byte on CAM_D can be latched on the rising or falling edge of CAM.LCLK generated by the camera itself. The POLCLK bit can select the polarity of CAM.LCLK in the clock control register.
Camera Interface If either CAM_VS or CAM_HS goes inactive before receiving all four bytes, the data in buffers is cleared by the active CAM.LCLK edge and is not written into FIFO. Figure 7-4. Timing Chart of Image Data Transfer (POLCLK = 1) CAM_VS CAM_HS CAM_LCLK...
Camera Interface You should use the RAZ_FIFO bit to clear any remaining data in FIFO before starting a new transfer. This bit also resets all status and control signals related to the FIFO, and it disables interrupt generation from the camera interface, so the RAZ_FIFO bit must be inactive before any camera interface transfers are started.
Page 370
Camera Interface 7.2.1.5 FIFO Buffer (128 x 32) A write access is applied to the FIFO for each 32-bit word received. When the write FIFO counter reaches the trigger level, an interrupt request can be generated. The trigger level is programmable. In DMA mode, you can program the threshold between 1 and 128, but the DMA must be set up to read the threshold amount out of FIFO per the DMA request issued by the camera interface.
Camera Interface Figure 7-8. FIFO Buffer Parts CAMERA Buffering Word y Buffering Word Q Buffering Word I DMA_REQ Block Word 1 TIPB When the threshold value is set to 0, the interrupt is generated immediately. This is the equivalent of the threshold always being exceeded regardless of whether any data is present in the FIFO.
2) High level of HSYNC and proper clock edge start the first data transfer from the camera to the OMAP5910 camera interface. After the first two pixels of data are received (8 bits x 4 transfers = 32 bits), a DMA request is made.
Camera Interface 3) The camera, the OMAP5910 device camera interface, and the system DMA continue transfer of data. That is, 352/2 * 288 = 50688 transfers for a camera interface image format. After the full image is transferred, the DMA sends an interrupt to the TI925T to signal that the end of frame occurred.
Camera Interface 7.2.1.10 Camera Interface Registers (FFFB:6800) Because the TIPB register read accesses are resynchronized to the camera interface clock, the MCLK_EN bit must first be set before any camera interface register reads are performed. Table 7-3 lists the camera interface registers. Table 7-4 through Table 7-10 describe the individual registers.
Camera Interface Table 7-4. Clock Control Register (CTRLCLOCK) (Continued) Reset Name Value Function Value CAMEXCLK_EN Disables Enables CAM.EXCLK POLCLK Sets polarity of CAM.LCLK Data latched on rising edge Data latched on falling edge FOSCMOD Sets the frequency of the CAM.EXCLK clock 0x00 12 MHz 6 MHz...
Camera Interface Table 7-6. Camera Interface Mode Configuration Register (MODE) Reset Name Value Function Value 31-19 RESERVED Reserved bits RAZ_FIFO When 1: Clears data in the FIFO; reinitializes read and write pointers; clears FIFO full interrupt, FIFO peak counter; and resynchronizes. EN_FIFO_FULL Disables Enables interrupt on FIFO_FULL...
Camera Interface Table 7-6. Camera Interface Mode Configuration Register (MODE) (Continued) Reset Name Value Function Value IMGSIZE Sets image size 0x00 QCIF QVGA Currently, these bits have no effect on the operation of the camera interface. CAMOSC Set synchronous mode Set asynchronous mode Currently this has no effect on the camera interface.
Camera Interface Table 7-9. Image Data Register (CAMDATA) Reset Name Function Value 31-0 CAMDATA Image data from FIFO Table 7-10. FIFO Peak Counter Register (PEAK_COUNTER) Reset Name Function Value 31-7 RESERVED Reserved Unknown PEAK_COUNTER Maximum number of words written to FIFO 0x0000000 during the transfer since the last clear to zero 7.2.2...
The MPU I/O module has two clocks: The 32-kHz system clock (CLK_32KHZ), which comes, through the ULPD, from either the OMAP5910 32-kHz oscillator or the OMAP5910 CLK32K_IN CMOS input. For more detail, see Chapter 15, Clock Generation and System Reset Management).
Page 380
Clock Generation & Management NOTES: kbc(6) (1): These brackets mean that these WIRE_nSCS3 (KBC(6) MPU IOs are not present by default on OMAP5910 pads (2): These Pull-downs have dotted line because they don’t exist for all these kbc(5:0) KBC(5:0) MPU IOs...
MPU I/O 7.3.3 MPUIO Keyboard Interface To allow button press detection: All the row lines (KB.R) must have an external pullup. All the column lines (KB.C) drive a low level (idle state of Table 7-11). The output drivers of the KBC output pins act as open-drain outputs in that they only drive low or are 3-state.
Edge detection can be used to latch all the GPIOs (event capture mode). GPIO interface works with the 32-kHz-system clock and consequently can be used to wake up the OMAP5910 device by generating the GPIO interrupt. 7-20...
MPU I/O Figure 7-12. GPIO Process Interrupt edge Interrupt mask GPIO_INT_EDGE_REG GPIO_MASKIT GPIO_DEBOUNCING_REG and GPIO MASKIT If yes, then GPIO Transition matches MPUIO_IN(15:0) Debouncing interrupt GPIOS_INT the programmed time (steps of edge and not 31 µs) masked? 31 µ-8 ms CPU read: GPIO_INT status INPUT_LATCH...
MPU I/O debouncing period; the debouncing is then forced dynamically to 0 and the interrupt is generated five cycles after the mask presence. You must decide whether or not to mask these interrupts by maintaining or releasing the mask activation. When one detected edge is masked, the event is not reset when a GPIO_INT register read occurs.
MPU I/O 7.3.7 Event Capture Module The GPIO event capture mode allows latching the input value present on the GPIO ports each time a rising or a falling edge occurs on a selected GPIO port, here called GPIO_CLK. If not masked, the GPIO_CLK-selected edge generates an interrupt to the processor, as shown in Figure 7–15.
MPU I/O Figure 7–16. Event Capture Process Interrupt edge Interrupt mask GPIO_INT_EDGE_REG GPIO_MASKIT GPIO_DEBOUNCING_REG and GPIO MASKIT If yes, then GPIO Transition matches MPUIO_IN(15:0) Debouncing Interrupt the programmed time (steps of edge and not 31 µs) masked? 31 µ-8 ms GPIO_INT status Clock event and pin select register:...
MPU I/O Table 7–20. Keyboard Interrupt Register (KBD _INT) Reset Name Function Value 15–1 Reserved KBD_INT Keyboard interrupt (active low) Note: KBD_INT is a status bit only (duplication of the level of the corresponding interrupt signal). Table 7–21. GPIO Interrupt Register (GPIO_INT) Reset Name Function...
MPU I/O Table 7–24. GPIO Debouncing Register (GPIO_DEBOUNCING_REG) Reset Name Function Value 15–9 Reserved 000000000: 0 µσ to 31 µs debouncing time 8–0 GPIO_ 0000 DEBOUNCING_REG 100000010: 7,97 ms to 8 ms debouncing time Programming step is 31 µs. Note: Because GPIO_CLK is an asynchronous signal, loading GPIO_DEBOUNCING_REG with 01 hex minimum value is rec- ommended to ensure that you have a 31-µs minimum debouncing time.
MicroWire Interface 7.4 MicroWire Interface This serial synchronous interface can drive two serial external components. For the external devices, this interface is compatible with the µWire standard and is seen as the master (see Figure 7–17). A transmit DMA mode is available. Figure 7–17.
MicroWire Interface Table 7–29. Control and Status Register (CSR) Reset Name Value Function Value RDRB RDRB bit at 1 indicates that the receive (RDR) is full. When the controller reads the content of the RDR, this bit is cleared. This bit is read only. CSRB CSRB bit at 0 indicates that the control and status (CSR) is ready to receive new data.
MicroWire Interface Table 7–29. Control and Status Register (CSR) (Continued) Reset Name Value Function Value 11–10 INDEX Index of the external device Undefined Reserved Reserved 9–5 NB_BITS_WR Number of bits to transmit Undefined 4–0 NB_BITS_RD Number of bits to receive Undefined This register sets up the serial interface for the first and the second external components.
Page 396
MicroWire Interface Table 7–30. Setup Register 1 (SR1) (Continued) Reset Name Value Function Value 4–3 CS0_FRQ Defines the frequency of the serial clock SCLK when Undefined CS0 is selected (F_INT is the frequency of the internal clock to the microwire control logic as defined in register SR3).
MicroWire Interface This register sets up the serial interface for the first and the second external components. Table 7–31. Setup Register 2 (SR2) Reset Name Value Function Value CS3_CHK Same as CS0_CHK. Undefined Used when CS3 is selected. 10–9 CS3_FRQ Defines the frequency of the serial clock Undefined SCLK when CS3 is selected...
MicroWire Interface This register sets up the serial interface for the internal clock. Table 7–32. Setup Register 3 (SR3) Reset Name Value Function Value 2–1 CK_FREQ Defines the frequency of the internal clock, F_INT, when CLK_EN = 1. All the internal logic is controlled by F_INT (F is the frequency of the external input clock).
MicroWire Interface Table 7–34. Setup Register 5 (SR5) (Read/Write) Reset Name Value Function Value CS_TOGGLE_TX_EN CS_TOGGLE_TX_EN is possible only in autotransmit mode. When in autotransmit mode with CS_TOGGLE_TX_EN inactive, the CS does not go to its active level automatically. Control the CS with the CS CMD bit of the control and status register (CSR) in the software.
MicroWire Interface Set up the DMA, IT, AUTO_TX, and CS_TOGGLE modes in this register. In DMA mode, a DMA request is initiated each time a transmission slot is available. The maximum word size in DMA mode is 16 bits. Notes: You cannot use another CS in normal or DMA mode when a DMA mode is active on one specific CS.
MicroWire Interface Figure 7–18. Behavior of a X25C02 EEPROM Read Cycle WIRE_NCS UWIRE.SCLK A6 A5 A4 A3 A2 A1 A0 UWIRE.SDO UWIRE.SDI D6 D5 D4 D1 D0 On the DO line, data is generated from the µWire interface on SLCK falling edge and read by the EEPROM interface on SCLK rising edge.
Page 402
MicroWire Interface 7.4.3.1 Read Cycle 1) Set the following fields of the control and status register (CSR): NB_BITS_RD: 0 NB_BITS_WR: 0 INDEX: 00 CS_CMD: 1 START: 0 2) Load the transmit data register (TDR) with: 1 1 0 A7 A6 A5 A4 A3 A2 A1 A0 x x x x x x: Don’t care A7 ...
Page 403
MicroWire Interface 7.4.3.2 Write Cycle 1) Set the following fields of the control and status register (CSR): NB_BITS_RD: 0 NB_BITS_WR: 0 INDEX: 00 CS_CMD: 1 START: 0 2) Load the transmit data register (TDR) with: 1 0 1 A7 A6 A5 A4 A3 A2 A1 A0 x x x x x x: Don’t care A7 ...
MicroWire Interface 7.4.4 Example of Protocol Using an LCD Controller (COP472-3) Set up the interface by writing in setup 1 register (SR1) the following value: CS_EDGE_RD = 1 CS_EDGE_WR = 0 CSCS_LVL = 0 CS_FRQ = 10 CS_CHK = 0 In this example, a loading sequence to drive a four-digit display is described.
MicroWire Interface 8) Wait for the CSRB bit of the control and status register (CSR) to be reset. 9) Load the transmit data register (TDR) with: D7...D0 x x x x x x x x x: Don’t care D7...D0: Data for special segment and control function 10) Set the following fields of the control and status register (CSR): NB_BITS_RD: 0 NB_BITS_WR: 8 (decimal)
MicroWire Interface 3) SR3 = CLK_EN: 1 CK_FREQ: 00 (must wait for 1 external clock + 1 F_INT cycle before any other register access) 4) SR4 = CLK_IN: 1 5) Set the following fields of the control and status register (CSR): NB_BITS_RD: 5 NB_BITS_WR: 7 INDEX: 00...
MicroWire Interface 7.4.6 Example of Autotransmit Mode With DMA Support The autotransmit mode and DMA mode are controlled by the setup 5 register (SR5). The following example configures µWire for a 16-bit write access on CS1 with serial clock out not inverted, CS auto toggle enabled, DMA request enabled, and interrupt disabled: 1) Set up and enable the DMA channel.
32-kHz Timer 7.5 32-kHz Timer The MPU subsystem operating system (OS) requires interrupts at regular time intervals for OS scheduling purpose. OS time intervals can be from 1 ms to 30 ms. These time intervals can be generated using the three 32-bit OS/gener- al-purpose TI925T timers, which use CLKIN or DPLL1;...
32-kHz Timer 7.5.1.1 Overriding Normal Counting Normal operation can be overridden by using two bits in the timer control register (TCR): The timer reload bit (TRB) causes the counter to be reloaded on the next clk32-kHz cycle (whether or not the timer is counting). The timer start stop bit (TSS) causes the counter to be stopped on the next clk32-kHz cycle.
32-kHz Timer Table 7–38. Timer Control Register (CR) Reset Name Value Function Value 31–4 Reserved Autoreload/start One-shot mode. When the counter reaches zero, an interrupt is generated and the timer is stopped. Sets the timer to autorestart mode IT_ENA Interrupt enable Interrupt disabled Interrupt enabled Timer reload bit...
Pseudonoise Pulse-Width Light Modulator 7.6 Pseudonoise Pulse-Width Light Modulator This pulse-width light (PWL) module provides control of LCD backlighting and keypad by employing a 4096-bit random sequence generator. This voltage- level control technique decreases the spectral power at the modulator harmonic frequencies.
Pseudonoise Pulse-Width Light Modulator 7.6.2 PWL Registers The PWL is connected to the host with a TIPB. The PWL control is done with two 8-bit registers. All TIPB accesses are done asynchronously with the 32-kHz clock, meaning there is no TIPB wait-state insertion. Table 7–41 lists the PWL registers.
Pulse-Width Tone 7.7 Pulse-Width Tone This pulse-width tone (PWT) module generates a modulated frequency signal for the external buzzer. The frequency is programmable between 322 Hz and 4868 Hz with 12 half-tone frequencies per octave. The volume level is also pro- grammable.
Pulse-Width Tone The clock behind the multiplexer is divided by 154 to get the required frequen- cies on the TONE output. The 12 frequencies in an octave can be programmed with bits 5 to 2 of the frequency control register (FRC), and the octave can be programmed with bits 1 to 0 of the FRC.
322 Hz 11XX XX Not allowed Note: The PWT was originally designed for a 13-MHz input clock, but the OMAP5910 device implements PWT with a 12-MHz clock. Consequently, frequencies shown are not exact tones. 7.7.4.2 Buzzer Volume The buzzer volume can be programmed (see Table 7–49) with bits 6 to 1 in the volume control register VRC.
C controller function does support the multimaster mode, to which more than one device capable of controlling the bus can be connected. Including the OMAP5910, each I C device is recog- nized by a unique address and can operate as either transmitter or receiver depending on the function of the device.
C via the serial data pin (SDA) and the serial clock pin (SCL). These two wires carry information be- tween the OMAP5910 device and others connected to the I C bus. Both SDA and SCL are bidirectional pins. They must be connected to a positive supply voltage via a pullup resistor.
Inter-Integrated Circuit Controller 7.8.1.3 C Bus Base Principal The data on the SDA line must be stable during the high period of the clock. The high and low states of the data line can only change when the clock signal on the SCL line is low (see Figure 7–24).
Page 422
Inter-Integrated Circuit Controller 7.8.1.4 C Operation Serial Data Formats Each byte put on the SDA line is 8 bits long. The number of bytes that can be transmitted or received is unrestricted. The data is transferred with the most significant bit (MSB) first. Each byte is followed by an acknowledge bit from the module I C if it is in receiver mode (see Figure 7–26).
Inter-Integrated Circuit Controller Figure 7–27. I C Data Transfer Formats Slave Address Data Data (a) 7-Bit Addressing Format Slave Address 1st 7-Bit Slave Address 2nd 7-Bit Data 1 1 1 1 0 X X (Write) (b) 10-Bit Addressing Format Slave Address R/W ACK Data Slave Address...
Inter-Integrated Circuit Controller out on the data line SDA in synchronism with the clock pulses that are gener- ated by the master device. It does not generate the clock, but it can hold the clock line SCL low while intervention of the local host is required. Slave Receiver In this mode serial data bits received on the bus line SDA are shifted-in synchronously with the clock pulses on SCL, which are generated by the...
Page 425
Inter-Integrated Circuit Controller C Clock Generation and I C Clock Synchronization Under normal conditions, only one master device generates the clock signal, SCL. During the arbitration procedure, however, there are two or more master devices and the clock must be synchronized so that the data output can be compared.
Page 426
Inter-Integrated Circuit Controller 7.8.2 OMAP5910 I C (Master/Slave I C Controller) The multimaster I C peripheral provides an interface between TIPB bus and any I C-bus compatible devices that connect via the I C serial bus. External components attached to the I...
Inter-Integrated Circuit Controller 7.8.2.2 Data Format The I C controller operates in 16-bit word data format (byte write access supported for the last access), and it supports endianism. 7.8.2.3 C Reset The I2C_EN bit in the I C configuration register (I2C_CON) can also reset the C module.
Page 428
Inter-Integrated Circuit Controller A no-acknowledge interrupt (NACK) is generated when the master I C does not receive an acknowledge from the receiver. A registers-ready-for-access interrupt (ARDY) is generated by the I C when the previously programmed address, data and command have been per- formed and the status bits has been updated.
Inter-Integrated Circuit Controller 7.8.2.7 C Registers Table 7–52 lists the I C registers. Table 7–53 through Table 7–71 describe the register bits. Table 7–52. I C Registers Offset Register Description Access Address I2C_REV C module version 0x00 I2C_IE C interrupt enable 0x04 I2C_STAT C status...
Page 430
Inter-Integrated Circuit Controller The four MSBs indicate a major revision. Ex: 0x10: version 1.0 0x11: version 1.1 A reset has no effect on the value returned. Table 7–53. I C Module Version Register (I2C_REV) Name Description 15 –8 – Reserved 7 -0 Module version number The read/write I...
Page 431
Inter-Integrated Circuit Controller The read-only I C status register (I2C_STAT) provides core status information for interrupt handling and other I C control management. This register is always read before reading the I2C_IV register itself to retain an accurate status (some bits are cleared following a read into I2C_IV). Table 7–55.
Page 432
Inter-Integrated Circuit Controller Bus Busy (BB) This read-only bit (12) indicates the state of the serial bus. In the slave mode, on reception of a start condition, the device sets BB to 1. BB is clear to 0 after reception of a stop condition. In the master mode, the software controls BB.
Page 433
Inter-Integrated Circuit Controller XUDF is set to 1 when the I C has recognized an underflow. The core holds the line till the underflow cause has disappeared. XUDF is clear when writing I2C_DATA register or resetting the I (I2C_EN=0). 0: Normal operation 1: Transmit underflow Value after reset is low.
Page 434
Inter-Integrated Circuit Controller Transmit Data Ready (XRDY) Transmit mode only. XRDY (bit 4) is set to 1 when I C peripheral is a master or slave transmitter, the local host is able to write a new data into the I2C_DATA register, and the transmitter still requires a new data.
Inter-Integrated Circuit Controller Register Access Ready (ARDY) This bit (2) when set to 1 indicates that the previously programmed data and command (receive or transmit, master or slave) have been performed and the status bit has been updated. This flag is used by the local host to let it know that the I C registers are ready to be accessed again.
Page 436
Inter-Integrated Circuit Controller 2) Write to the STP bit in the I2C_CON register to realse I C data line. Do not poll the NACK and AL bits in the I2C_CON register because an up- date could be missed. These bits require an interrupt process to be han- dled correctly (also, the INTCODE field in the I2C_IV register should be read before any action is taken in the subroutine).
Page 438
Inter-Integrated Circuit Controller Table 7–60. I C Data Counter Register (I2C_CNT) Name Description 15–0 DCOUNT Data count Data Count (DCOUNT) Master mode only (receive or transmit). This 16-bit countdown counter decrements by 1 for every byte received or sent. A write initializes DCOUNT to a saved initial value. A read returns the number of bytes that are yet to be received or sent.
Page 439
Inter-Integrated Circuit Controller The I C data access register (I2C_DATA) is the entry point for the local host to read data from, or write data into, the FIFO buffer. The FIFO size is 2x16bits (4 bytes). Bytes within a word are stored and read in little endian format (I2C_CON:BE=0) or big endian format (I2C_CON:BE=1).
Page 440
Inter-Integrated Circuit Controller Table 7–62. I C Configuration Register (I2C_CON) Name Description I2C_EN C module enable Big endian mode 13–12 Reserved Start byte mode (master mode only) Master/slave mode Transmitter/receiver mode (master mode only) Expand address 7 –3 Reserved Repeat mode (master mode only) Stop condition (master mode only) Start condition (master mode only) C Module Enable (I2C_EN)
Page 441
Inter-Integrated Circuit Controller 0: Little endian mode 1: Big endian mode Value after reset is low. Start Byte (STB) Master mode only. The start byte mode bit (11) is set to 1 by the local host to configure the I C in start byte mode (I2C_SA=00000001).
Inter-Integrated Circuit Controller Stop Condition (STP) Master mode only. This bit (1) can be set to a 1 by the local host to generate a stop condition. It is reset to 0 by the hardware after the stop condition has been generated. The stop condition is generated when DCOUNT passes 0.
Page 444
Inter-Integrated Circuit Controller The I C own address register (I2C_OA) specifies the module I C 7-bit or 10-bit address (own address). Table 7–66. I C Own Address Register (I2C_OA) Name Description 15–10 Reserved 9 –0 Own address This field (bits 9-0) specifies either: A 10-bit address coded on OA[9:0] when XA (expand address, I2C_MCR[8]) is set to 1.
Page 445
Inter-Integrated Circuit Controller This register is used to specify the internal clocking of the I C peripheral core. Table 7–68. I C Clock Prescaler Register (I2C_PSC) Name Description 15–8 Reserved 7 –0 Prescale sampling clock divider value The core (bits 7-0) uses this 8-bit value to divide the peripheral clock (MPUXOR_CK) to generate its own internal sampling clock (ICLK).
Page 446
Inter-Integrated Circuit Controller The I C SCL high-time control register (I2C_SCLL) determines the SCL high- time value when master. Table 7–70. I C SCL High Time Control Register (I2C_SCLH) Name Description 15–8 Reserved 7–0 SCLH SCL high time Master mode only. This 8-bit value (bits 7-0) is used to generate the SCL high time value (t HIGH when the peripheral is operated in master mode.
Inter-Integrated Circuit Controller System Test Enable (ST_EN) This bit (15) must be set to 1 to permit other system test registers bits to be set. 0: Normal mode 1: System test enabled Value after reset is low. Free Running Mode After Breakpoint (FREE) This bit (14) is used to determine the state of the I C controller when a break- point is encountered in the HLL debugger.
Page 448
Inter-Integrated Circuit Controller Values after reset are low (2 bits). In SCL counter test mode, the SCL pin is driven with a permanent clock as if master with the parameters set in I2C_PSC, I2C_SCLL, and I2C_SCLH registers. Loopback mode: In the master transmit mode only, data transmitted out of the I2C_DATA register (write action) is received in the same I2C_DATA register via an internal path through the 1-deep FIFO buffers.
Inter-Integrated Circuit Controller SDA Line Drive Output Value (SDA_O) In normal functional mode (ST_EN = 0), this bit (0) is don’t care, and always reads as 0. Writes are ignored. In system test mode (ST_EN = 1 and TMODE = 11), a 0 forces a low level on the SDA line and a 1 puts the I C output driver in a high-impedance state.
Inter-Integrated Circuit Controller Poll receive data: Poll the receive data ready interrupt flag bit (RRDY) in the I C status register (I2C_STAT), use the RRDY interrupt, or use the DMA to read the receive data in the data receive register (I2C_DATA). Poll transmit data: Poll the transmit data ready interrupt flag bit (XRDY) in the I C status register (I2C_STAT), use the XRDY interrupt, or use the...
Inter-Integrated Circuit Controller Figure 7–32. Master Transmitter Mode, RM = 1 Start Read I 2 C_STAT. bus free send data (BB=0) being requested (XUDF=1) Write I 2 C_CON With 8605h. m bytes transferred n = 0 (data byte counter): (n. = m) m = Number of data bytes to be transferred n = n + 2...
Inter-Integrated Circuit Controller Figure 7–33. Master Receiver Mode, RM = 1, Polling 1 (Software Counter, Number of the Receive Data Fixed) Start Set appropriate values to every bit of I 2 C_CON. I 2 C_EN bit must be set Read I 2 C_STAT. to 1 to take I 2 C out of reset condition.
Inter-Integrated Circuit Controller Figure 7–34. Master Receiver Mode, RM =1 , Polling 2 (Number of the Receive Data is Variable, Data Contents Dependent) Start Read I 2 C_STAT. received data bus free in I 2 C_DATA (BB=0) (RRDY=1) Write I 2 C_CON Read I 2 C_DATA.
The LED pulse generator (LPG) module controls an indication LED (see Figure 7–43). The blinking period is programmable between 152 ms and 4s, and the LED can be switched on permanently. The OMAP5910 device has two LPG modules. Each LPG module drives a single output pin on the OMAP5910 device which can be used to switch an LED driver.
The LPG input clock comes from the 32-kHz ULPD clock, because it must work even when the OMAP5910 system is in deep sleep mode. The internal clock of the LPG runs with 256 Hz. For this reason the power consumption of this block can be neglected.
LED Pulse Generator Table 7–74. LPG Control Register (LCR) Reset Name Function Value PERM_ON Set high to force permanent light on. Asynchronous writing and reading. LPGRES LPG counter reset, active low. Asynchronous writing and reading. 5–3 ONCTRL Time LED is on parameter. Asynchronous writing and reading.
LED Pulse Generator With the LCR bits 5-3, the on time of the LED is determined. Table 7–76. LED On Time LCR Bit 5 LCR Bit 4 LCR Bit 3 Time LED On Number of Clock Cycles 3.889 ms 7.789 ms 15.59 ms 31.39 ms 46.59 ms...
Multichannel buffered serial ports (McBSPs) are configurable, high-speed, full-duplex serial ports that allow direct interfacing to external communication devices. There are three McBSPs on OMAP5910. McBSP2 is on the MPU public peripheral bus and is covered briefly in this section. McBSP1 and McBSP3 are on the DSP public peripheral bus and are covered briefly in Chapter 9, DSP Public Peripherals.
The active input clock can be changed in a McBSP register, but register activity on CLKS is required to perform the set up and write to the McBSP. Figure 7–45. Communication Processor Data Interface OMAP5910 Communication processor MPU peripheral...
CLKX set output pin and driven by internal generator CLKR set input pin and derived by external source Sample rate generator input clock mode bit CLKS pin status (no meaning in the OMAP5910 device) DX pin status DR pin status...
McBSP2 7.10.1.3 Receive Control Register Configuration ARM_Write(0x0040) => RCR1; set up RCR1 per below configuration. Table 7–81. Receive Control Register 1 Configuration Configuration Value Description Reserved 14–8 000 0000b Set receive frame length as one word per frame 7–5 010b Set receive word length as 16 bit per frame 4–0 0 0000b...
McBSP2 ARM_Write(0x0001) => XCR2; set up XCR2 per below configuration. Table 7–84. Transmit Control Register 2 Configuration (ARM_Write(0x0001) => XCR2) Configuration Value Description Set single-phase frame 14–8 000 0000b Don’t care for single-phase frame 7–5 000b Don’t care for single-phase frame 4–3 Set no companding data and transfer start with MSB first Set FSX not ignore after the first resets the transfer...
McBSP2 7.10.1.8 Transmit Data Loading (TX_INT Handling in Interrupt Survive Routine) ARM_Write → DXR Note: Clear interrupts flag on ITR, when taken the interrupt handle. 7.10.1.9 Received Data Loading (RX_INT Handling in Interrupt Survive Routine) ARM_Read ← DRR Note: Clear interrupts flag on ITR, when taken the interrupt handle. Waveform Example Figure 7–46.
CLKX set output pin and driven by internal generator CLKR set input pin and derived by external source Sample rate generator input clock mode bit CLKS pin status (no meaning in OMAP5910) DX pin status DR pin status Set FSX polarity as active high...
McBSP2 7.10.1.12 Receive Control Register Configuration ARM_Write(0x0040) => RCR1; set up RCR1 per below configuration. Table 7–86. Receive Control Register 1 Configuration Configuration Description Value Reserved 14–8 000 0000b Set receive frame length as one word per frame 7–5 010b Set receive word length as 16 bits per frame 4–0 0 0000b...
McBSP2 ARM_Write(0x0001) => XCR2; set up XCR2 per below configuration. Table 7–89. Transmit Control Register 2 Configuration Configuration Value Description Set single-phase frame 14–8 000 0000b Don’t care for single-phase frame 7–5 000b Don’t care for single-phase frame 4–3 Set no companding data and transfer start with MSB first Set FSX not ignore after the first resets the transfer 1–0 Set data delay as 1 bit...
McBSP2 7.10.1.18 Data Transfer (DMA Channel) The DMA channel transfers the received data to appropriate data buffer and transfer the new transmit data to appropriate TX buffer. Clear interrupts flag on ITR, when taking the interrupt handle. Note: Clear interrupts flag on ITR, when taken the interrupt handle. Waveform Example Figure 7–47.
USB Function Overview 7.11 USB Function Overview The universal serial bus (USB) function module supports the implementation of a full-speed device fully compliant with the USB 1.1 standard (see Figure 13–2). It provides an interface between the MPU core (TI925T) and the USB wire and handles USB transactions with minimal TI925T intervention.
Page 480
USB Function Overview Table 7–90. USB Function Registers (Continued) Offset Name Description Address DMA_IRQ_EN Enables all DMA interrupts 0x2C IRQ_SRC Identify and clear the source of the interrupt signaled by a set flag 0x30 EPN_STAT Identify the non-ISO endpoint causing an EPn interrupt 0x34 DMAN_STAT Identify the endpoint causing a DMA interrupt...
Page 481
USB Function Overview Table 7–90. USB Function Registers (Continued) Offset Name Description Address Endpoint Configuration Gives the device configuration for control endpoint 0 EP1_RX Gives the device configuration for non-control receive endpoint 1 0x84 EP2_RX Gives the device configuration for non-control receive endpoint 2 0x88 …...
MMC/SD Host Controller 7.12 MMC/SD Host Controller The MMC/SD host controller provides an interface between the TI925T and either MMC or SD memory card plus up to three serial flash cards and handles MMC/SD or SPI transactions with minimal TI925T intervention. All references to a local host in this section refer to the TI925T MPU processor.
The state of the OMAP5910 static_valid input during power on, determines the functional multiplexing on the OMAP5910 MMC/SD pads. The OMAP5910 static_valid pad must be held to 1 during power on so that the MMC/SD host controller signals are usable from the power-on reset on the OMAP5910 MMC/SD pads (described in Table 7–91).
MMC/SD Host Controller Table 7–91. MMC/SD Signal Pads Pullup/ Reset Pad Name Type Description Pulldown Value MMC.CLK MMC/SD card CLK signal. Only active during active command to a MMC/SD card using MMC or SPI protocols. MMC.CMD_SPI. In-Out Pullup Input MMC/SD card CMD signal in MMC/SD mode. DO/SPI_SO (*3) SPI serial out signal in SPI mode (output—goes to serial...
MMC/SD Host Controller 7.12.3 MMC/SD Host Controller Clocks and Reset The MMC/SD host controller has two clocks: An interface clock (clock_i) used between the MPU TIPB and the MMC/SD host controller and connected to the MPU peripheral programmable clock (PERCLK), is determined dividing CK_GEN1 (the output of DPLL1) by the value associated with the PERDIV field of the ARM_CKCTL register (0xFFFECE00).
MMC/SD Host Controller 7.12.6 MMC/SD Internal Pullups There are internal pullups on the following pins: MMC.CMD I/O pin MMC.DAT[3:0] I/O pins MMC cards work in open drain mode on the MMC.CMD line during the identifi- cation phase, and more generally for broadcast MMC commands; con- sequently, a pullup on the MMC.CMD line is needed.
MMC/SD Host Controller Table 7–95. MMC Command Register (MMC_CMD) Name Description DDir Data direction [read/write] Stream command or broadcast host response 13 –12 Type Command types [bc,bcr,ac,adtc] Busy Command with busy response [R1b] 10– 8 Response Command responses [no response, R1/R1b, R2, R3, R4, R5,R6] Init Send initialization stream Card open drain mode...
Page 490
MMC/SD Host Controller Stream Command or Broadcast Host Response (SHR) MMC card only. SD card does not support stream operation or host generated response. This bit (14) must be set to 1 in two cases: Associated with adtc type, if the command is a stream data transfer (read or write).
Page 491
MMC/SD Host Controller Command With Busy Response (Busy) This bit (11) must be set to 1 if the response to the command sent is of type R1b (R1 + busy). 0: Response without busy (R1, R2, R3, R4, R5, R6) 1: Response with busy (R1b) Value after reset is low.
MMC/SD Host Controller Card Open Drain Mode (OD) This bit (6) must be set to 1 if the MMC card bus is operating in open-drain mode during the response phase to the command sent. Typically, during card identification mode, the card is either in idle, ready or identification state. This bit must be set for MMC card commands 1, 2, 3, and 40.
MMC/SD Host Controller Table 7–98. MMC System Configuration Register (MMC_CON) Name Description Data bus width Reserved 13–12 Mode Operating mode select (MMC/SD, SPI, SYSTEST, or MMC SPI protocol). Power-up Power-up control 10 –8 Reserved 7 –0 Clk_div Clock divider [No clock, 1:255] Bus Width During Data Phase (DW) SD card only.
Page 494
MMC/SD Host Controller In SPI mode 2, transfers to the MMC/SD card follow the SPI protocol. MMC clock is enabled and the SPI clock is disabled. MMC protocol must be imple- mented in software when using this mode since the MMC interface acts as a generic SPI port and does not utilize the MMC-specific features available in MMC/SD mode.
MMC/SD Host Controller Clock Divider (Clk_div) These bits (7-0) define the ratio between a reference clock frequency (48 MHz) and the output clock frequency on the CLK pin of either the memory card (MMC or SD) or other 8-bit mode SPI controlled device. The division factor is exactly the binary encoded decimal value for values between 1 and 255.
MMC/SD Host Controller Table 7–100. MMC System Status Register (MMC_STAT) Name Description Reserved Card_Err Card status error in response Card_IRQ Card IRQ received (following CMD40) OCR_busy OCR busy (following CMD1 or ACMD41) A_Empty Buffer almost empty A_Full Buffer almost full Reserved Cmd_CRC Command CRC error...
MMC/SD Host Controller Table 7–101. Response Types Card Status Bits With Response Response Register Error Type Significant Bits Comments R1 (MMC, 31-26, 24-16, MMC_RSP7[15:10,8-0] These 15 bits can all generates errors. 3* (opt) MMC_RSP6[3] This bit can also generate an error if enabled (bit 3 if MMC_SDIO[13]=1) per the SD application specification R6 (SD)
Page 499
MMC/SD Host Controller OCR Busy (OCR_busy) MMC/SD mode only. The core automatically sets this bit (12) after a SEND_OP_COND (CMD1) or a SD_APP_OP_COND (ACMD41) command when one or more cards have not yet completed power up. When this bit is set, the CMD1/ACMD41 com- mand must be repeated until the card stops responding with a busy condition.
Page 500
MMC/SD Host Controller Buffer Almost Full (A_Full) The core automatically sets this bit (10) during a read operation to the card when the level is above the threshold value set in MMC_BUFF:AF_Level reg- ister bits. This bit indicates that the memory card has filled out the buffer to the specified level and that the local host needs to empty the buffer by reading it.
Page 501
MMC/SD Host Controller In SPI or SYSTEST modes, this bit has no meaning and always reads as 0. 0: No action or no command time-out 1: Command time-out Value after reset is low. Data CRC Error (Dat_CRC) MMC/SD mode only. The core automatically sets this bit (6) if there is CRC16 error in the data phase response following a block read command (single or multiple) or if there is a 3-bit CRC status token error 101 to signal for data transmission error during...
Page 502
MMC/SD Host Controller Card Exit Busy State (EOF_Busy) MMC/SD mode only. The core automatically sets this bit (4) when the addressed card releases the DAT line from its busy state (low level = busy). This bit can only get set during a programming phase (write operation) to a MMC or SD memory card.
Page 503
MMC/SD Host Controller Card Enter Busy State (Card_Busy) MMC/SD mode only. The core automatically sets this bit (2) when the addressed card asserts the DAT line to a low level during a programming phase (write operation) to a MMC or SD memory card. For the MMC card only, the user can optionally use this interrupt to deselect the card (which continues to program) and select another card.
MMC/SD Host Controller This 16-bit register specifies the maximum number of clock cycles before a data time-out condition occurs. Table 7–104. MMC Data Time-out Register (MMC_DTO) Name Description 15–0 Data read time-out Data Time-out Value (DTO) In MMC/SD mode, the local host sets this field (bits 15-0) based on N clock cycles.
MMC/SD Host Controller The MMC data access register (MMC_DATA) is the entry point for the local host to read data from, or write data into, the FIFO buffer. The FIFO size is 32 x 16bits (64 bytes). Bytes within a word are stored and read in little endian format.
MMC/SD Host Controller This register configures the core for the number of bytes to read or write. It must be initialized at least once prior to starting an MMC, SD, or SPI block data transfer (read or write). Table 7–107. MMC Block Length Register (MMC_BLEN) Name Description 15–11...
MMC/SD Host Controller This register configures the number of blocks for a multiple block data transfer (read or write) operation for MMC/SD cards. This register is not used for SPI transfers. Table 7–108. MMC Number of Blocks Register (MMC_NBLK) Name Description 15–11 Reserved...
MMC/SD Host Controller This register configures the buffer threshold level of the thirty two 16-bit-word FIFO and enables DMA transfers. Table 7–109. MMC Buffer Configuration Register (MMC_BUF) Name Description RX_DMA_En Receive DMA channel enable 14 –13 Reserved 12 –8 AF_Level Buffer almost full level TX_DMA_En Transmit DMA channel enable...
Page 511
MMC/SD Host Controller Transmit DMA Channel Enable (TX_DMA_En) When this bit (7) is set to 1, the transmit DMA channel is enabled and the A_Empty status bit is forced to 0 by the core irrespectively of AE_level setting (see Table 7–109). More information regarding DMA operation can be found in Chapter 5, System DMA Controller.
MMC/SD Host Controller This register is used to configure the SPI interface and start an SPI transfer if SPI mode has been enabled. Table 7–110. MMC SPI Configuration Register (MMC_SPI) Name Description Start Start SPI transfer Write/not read 13 –12 Reserved 11 –10 TCSH...
Page 513
MMC/SD Host Controller Write/Not Read (WnR) This bit (14) instructs the 11-bit block length counter in MMC_BLEN:BLEN to decrement either on byte read when WnR = 0 or on byte write when WnR = 1. 0: Decrement on byte received 1: Decrement on byte sent Value after reset is low.
MMC/SD Host Controller Chip-Select Mode (CSM) When this bit (3) is set to 0 and enabled (CSD=0), the selected CS signal pin goes active (low) only when SPI transfer is started and brought back automati- cally to its inactive state (high), when the SPI transfer completes. When set to 1, the automatic control of the CS signal is disabled.
Page 516
MMC/SD Host Controller Clock Phase (PHA) The clock polarity and clock phase bits select four different clocking schemes for the SPICLK pin. The clock phase bit (1) selects a half cycle delay for clock. When clock phase = 0: MSB data is ready one half cycle of SPICLK before the SPI clock starts. Data is shifted-in in reception on the first edge transition of SPICLK.
MMC/SD Host Controller Data Time-out Prescaler Enable (DTO_PS_En) When this bit (5) is set to 1 by the LH, the data time-out set in MMC_DTO regis- ter is x1024 the number of MMC_CLK cycles. 0: x1 (Prescaler off) 1: x1024 (Prescaler on) Value after reset is low.
Page 519
MMC/SD Host Controller Ready/Busy Data (RDY_dat) This read-only bit (13) returns the value of the signal on the input pad (high or low). 0: Ready/busy low 1: Ready/busy high Value after reset is high. DAT[3:0] Direction (DAT_dir) When set, this bit (12) places all the in/out DAT[3:0] pins in output mode. 0: Input 1: Output Value after reset is low.
MMC/SD Host Controller MMC_CLK Data (MMC_CK_dat) The MMC_CK pin is driven high or low according to the value written into this register bit (5). Value after reset is low. SPI_CLK Data (SPI_CK_dat) The SPI_CK pin is driven high or low according to the value written into this register bit (4).
MMC/SD Host Controller Table 7–121 and Table 7–122 describe registers that also hold specified bit positions for a 32-bit response of type R1/R1b/R3/R4/R5/R6. Table 7–121. MMC/SD Command Response Register 6 (MMC_RSP6) Name Description 15 –0 RESP6 CMD response (R2[111:96], R1/R1b/R3/R4/R5/R6[23:8]) Table 7–122.
MMC/SD Host Controller 7.12.8 Command Flow To correctly drive the MMC/SD adapter for a command execution, the host must follow the process shown in Figure 7–53 and Figure 7–54. Figure 7–53. Command Flow Initialization (set system configuration) Operation without data Operation with data Set transfer parameters Send command...
MMC/SD Host Controller Figure 7–54. Initialization Phase Host activity The user must set several registers Description Adapter activity Description Waiting IRQ by the host unit IRQ name In all modes (MMC, SD, SPI) a initialization phase is necessary at the begin- ning.
MMC/SD Host Controller Figure 7–56. Command Transfer Send command Write MMC_ARG1. (with type response direction) Write MMC_ARG2IE. Write MMC_CMD. Command time-out End of command Next operation When a command that has no response is used (that is, CMD0, CMD4, CMD15), the command timeout condition can never occur, since there is no response expected.
MMC/SD Host Controller Figure 7–57. Data Transfer Set transfer parameters Write MMC_BUF. Almost full/empty level and Rx/Tx DMA (if needed). Write MMC_BLEN. If the value does not change it is not useful to set it again. Write MMC_NBLK. – In single mode, NBLK must be = 0. –...
MMC/SD Host Controller Figure 7–58. Data Transfer in MMC/SD Mode Example Initialization (set system configuration) Set transfer parameters Read operation Write operation In multi-block the Send command MMC_NBLK(/=0) must be (with type response direction) set for every new operation. Send command (with type response direction) Write data buffer Blocks received from card...
MMC/SD Host Controller 7.12.9 DMA Operation 7.12.9.1 MMC DMA Receive Mode In a DMA block read operation (single or multiple): The DMA RX request signal is asserted to its active level when the FIFO level becomes equal or greater than the threshold set in AF_level. The DMA RX request is deasserted to its inactive level when the system DMA has read one word from the FIFO.
Page 529
MMC/SD Host Controller 7.12.9.2 MMC DMA Transmit Mode In a DMA block write operation (single or multiple): The DMA TX request signal is asserted to its active level when the FIFO level becomes less than the threshold set in AE_level after the block write command has been set (write action into MMC_CMD).
MMC/SD Host Controller 7.12.10 Local Host (IRQ/Polling) Mode 7.12.10.1 MMC Local Host (IRQ/Polling) Receive Mode During a local host block read operation (single or multiple) using inerrupt/poll- ing mode, the A_Full status bit is set active (high level) when the FIFO level becomes equal or greater than the threshold set in AF_level.
Real-Time Clock 7.13 Real-Time Clock The real time clock (RTC) is an embedded module (see Figure 7–59). Its basic features are: Time information (seconds/minutes/hours) directly in BCD code Calendar information (day/month/year/day of the week) directly in BCD code up to year 2099 Interrupt generation, periodically (1s/1m/1h/1d period) or at a precise time of the day (alarm function) 30 s time correction...
Real-Time Clock 7.13.1 Register Descriptions All the time and calendar information is available in dedicated registers, which are called time and calendar registers. Time and calendar register values are written in binary coded decimal (BCD) code (see Table 7–123). Table 7–123. Time and Calendar Register Values Time Unit Range Remarks...
Real-Time Clock 7.13.2.1 Time and Calendar Registers/Alarm Registers To read or write correct data to and from the time and calendar registers/alarm registers, the MPU must first poll the BUSY bit of the STATUS register until BUSY is equal to zero. From this time, and for a time of 15 µs (the available access period), the MPU can safely access the time and calendar registers/ alarm registers.
Page 534
Real-Time Clock The RTC_DISABLE bit of the CTRL register must only be used to completely disable the RTC function. When this bit is set, the 32-kHz clock is gated, and the RTC is frozen. From this point, resetting this bit to zero can lead to unex- pected behavior.
Real-Time Clock 7.13.2.6 Interrupts Management RTC can generate two interrupts: Timer interrupt (IRQ_TIMER) Alarm interrupt (IRQ_ALARM_CHIP) 7.13.2.7 Timer Interrupt IRQ_TIMER interrupt can be generated periodically every second, every minute, every hour, or every day (RTC_INTERRUPTS_REG[1:0]). The IT_TIMER bit of the interrupt register enables this interrupt. The timer interrupt is a negative-edge-sensitive interrupt (low-level pulse duration = 15 µs).
Real-Time Clock 7.13.2.8 Alarm Interrupt IRQ_ALARM_CHIP interrupt can be generated when the time set into time and calendar alarm registers is exactly the same as in the time and calendar registers (see Figure 7–63). This interrupt is then generated if the IT_ALARM bit of the interrupts register is set.
Real-Time Clock Table 7–126. Seconds Register (SECONDS_REG) Reset Name Function Value Reserved 6–4 SEC1 digit of seconds Range is 0 to 5 3–0 SEC0 digit of seconds 0000 Range is 0 to 9 Table 7–127. Minutes Register (MINUTES_REG) Reset Name Function Value Reserved...
Real-Time Clock Table 7–129. Days Register (DAYS_REG) Reset Name Function Value 7–6 Reserved 5–4 DAY1 digit of days Range from 0 to 3 3–0 DAY0 digit of days 0001 Range from 0 to 9 Table 7–130. Months Register (MONTHS_REG) Reset Name Function Value...
Real-Time Clock Table 7–133. Alarm Seconds Register (ALARM_SECONDS_REG) Reset Name Function Value Reserved 6–4 ALARM_SEC1 digit of seconds Range from 0 to 5 3–0 ALARM_SEC0 digit of seconds 0000 Range from 0 to 9 Table 7–134. Alarm Minutes Register (ALARM_MINUTES_REG) Reset Name Function...
Real-Time Clock Table 7–136. Alarm Days Register (ALARM_DAYS_REG) Reset Name Function Value 7–6 Reserved 5–4 ALARM_DAY1 digit for days Range from 0 to 3 3–0 ALARM_DAY0 digit for days 0001 Range from 0 to 9 Table 7–137. Alarm Months Register (ALARM_MONTHS_REG) Reset Name Function...
Real-Time Clock Table 7–139. RTC Control Register (RTC_CTRL_REG) Reset Name Function Value Reserved † RTC_DISABLE RTC enabled RTC disabled (no 32-kHz clock) ‡ SET_32_COUNTER No action Sets the 32-kHz counter with COMP_REG (14:0) val- TEST_MODE Functional mode Test mode (autocompensation is enabled when 32-kHz counter reaches its end) §...
Real-Time Clock Table 7–140. RTC Status Register (RTC_STATUS_REG) Reset Name Value Function Value † POWER_UP Indicates that a reset occurred ‡ ALARM Indicates that an alarm interrupt has been generated 1D_EVENT One day has occurred 1H_EVENT One hour has occurred 1M_EVENT One minute has occurred 1S_EVENT...
Real-Time Clock Table 7–141. RTC Interrupts Register (RTC_INTERRUPTS_REG) (Continued) Reset Name Value Function Value 1–0 EVERY Interrupt period Every second Every minute Every hour Every day Note: The MPU must respect the busy period to prevent spurious interrupt. Table 7–142. RTC Compensation LSB Register (RTC_COMP_LSB_REG) Reset Name Function...
USB Host Controller Overview 7.14 USB Host Controller Overview The OMAP5910 device implements a three-port USB host controller that is compatible with the USB Revision 1.1 specification and the Open Host Controller Interface Specification for USB (OHCI) Revision 1.0a. It provides USB host connectivity for USB low-speed (1.5M bit/sec maximum) and full-...
Page 548
This is accomplished in the OMAP5910 device by setting the line to high (with an external pullup). The slave pulls the line low to initiate a transaction. This is the case when a read happens and the slave must send the read data back to the host.
Page 549
HDQ and 1-Wire Protocols Write operation: 1) Write the command or data value to the TX write register. 2) Write 0 to the R/W bit of the control and status register to indicate a write. 3) Write 1 to the go bit of the control and status register to start the actual transmit.
Page 550
HDQ and 1-Wire Protocols 5) Software must read the interrupt status register, to determine if RX was complete or whether there was a time-out. 6) Software does a read of the RX buffer register to retrieve the read data from slave. 7) Repeat for each successive byte.
Page 551
HDQ and 1-Wire Protocols An interrupt condition indicates either a TX complete, RX complete, or time-out condition. The read of the interrupt status register clears all the interrupt condi- tions. Only one interrupt signal is sent to the microcontroller and only an overall mask bit exists for the enabling and disabling of the interrupt.
Page 552
HDQ and 1-Wire Protocols b) The time-out bit is always cleared in a read. c) The completion of the operation sets the RX complete flag in the inter- rupt status register. If interrupts are masked, no interrupt is generated. The interrupt status register is always cleared at the beginning of any read or write operation.
HDQ and 1-Wire Protocols 7.15.1.2 Timing Diagrams Figure 7–65 through Figure 7–67 show the timing diagram for the read, reset, and write. In HDQ, the reset pulse only contains the initialization and not the presence pulse. The timing required for the various signals are specified in the BQ2023.
HDQ and 1-Wire Protocols 7.15.1.3 Write State Diagram Figure 7–68. Write State Machine #1 Reset Time out = 0 IDLE Go = 0 Rnw = 0, Go = 1 Bits sent < 8 TX complete = 0 Time out = 0 Write data TX complete = 1 TX complete...
Page 555
HDQ and 1-Wire Protocols 7.15.1.5 Status Flags The status flags are provided in the status register, which contains status flags from the transmitter, the receiver, and the presence detect logic. The presence condition detected status flag is contained in the status register. This is valid only in 1-Wire mode.
The HDQ and the 1-Wire mode are selectable in software, which must be done before any transmit and receive from the module is performed. The mode is assumed static during operation of the device. Figure 7–70. HDQ and 1-Wire Overview OMAP5910 MPU TIPB (public) BQxxxx...
HDQ and 1-Wire Protocols 7.15.4 Software Interface The mapping of registers to the TI peripheral bus (TIPB) address signals is shown in Table 7–144 and Table 7–145. The base address for the HDQ regis- ters is FFFB:C000. No synchronization is provided by the hardware between the register clock domain and the state machine domain.
HDQ and 1-Wire Protocols Table 7–145. Registers Accessible From TIPB Access Type Reset Name Value Description at Address Value TX write Read/Write 0000h 31–24 Reserved—read aliased to bits 7:0, data at 8h00 writes ignored 23–16 Reserved—read aliased to bits 7:0, writes ignored 15–8 Reserved—read aliased to bits 7:0,...
Page 559
HDQ and 1-Wire Protocols Table 7–145. Registers Accessible From TIPB (Continued) Access Type Reset Name Value Description at Address Value 31–24 Control and Reserved—read aliased to bits 7:0, at 8h08 status writes ignored register 23–16 Reserved—read aliased to bits 7:0, writes ignored 15–8 Reserved—read aliased to bits 7:0,...
Frame Adjustment Counter 7.16 Frame Adjustment Counter The frame adjustment counter counts the number of rising edges of one signal (start of frame interrupt of the USB function) during a programmable number of rising edges of a second signal (transit frame synchronization of McBSP2). This count value can then be used by system-level software to adjust the dura- tion of the two time domains with respect to each other to reduce overflow and underflow.
WKUP_REQ MPU_PER_RST Reset Clock generation and management OMAP5910 7.16.2 Synchronization and Counter Control Because frame-start and frame-synchronization signals are from different time domains, the FAC module synchronizes these two signals to the system clock domain and uses the synchronized signals as the count enables. The actual counters for frame synchronization and frame start are clocked by the system clock.
Frame Adjustment Counter Figure 7–73. Synchronization Circuit for Frame Synchronization and Frame Start Signals Synced signal Frame sync/ DFF1 DFF2 DFF3 frame start System clock Figure 7–74 shows the actual waveforms of at the output of each flip-flop and the XOR output. Figure 7–74.
Frame Adjustment Counter 7.16.3 FAC Interrupt The FAC generates 1 interrupt, FAC_IRQ (in halt mode when the FARC value is met), connected to the MPU level 2 interrupt handler, line 0 (level-sensitive) 7.16.4 FAC Clocks and Reset The FAC works with a clock (PCLK), which is provided by the ULPD from a request generated by the USB function (DS_WAKE_REQ_ON).
Frame Adjustment Counter The frame-adjustment counter register (FARC) is programmed with the number of frame synchronization counts over which the frame start pulses are counted. This is a 16-bit programmable fixed reference in the range of 0-65536. A value of zero disables the count operation. Table 7–147.
Frame Adjustment Counter The control and configuration register (CTRL) is a read/write register used to configure the module. The RUN bit is used to enable the frame-start counter. If this bit is set to 0, the frame-start counting is disabled immediately. The soft- ware can use this bit as a software reset for the FAC module by setting the RUN bit to zero.
Timers 8.2 Timers Figure 8–2 shows the DSP timers in detail. Three 32-bit timers are available for general-purpose housekeeping functions. The counters/timers are configurable either in autoreload or in one-shot mode with on-the-fly read capability. Each timer generates a corresponding level 1 interrupt to the DSP when equal to zero, as shown in Table 8–1, Timer Interrupt Levels.
Timers 8.2.1 Timer Interrupt Levels Table 8–1. Timer Interrupts Levels Timer Corresponding Level 1 Interrupt Required Sensitivity Setup INT23 Edge INT22 Edge INT8 Edge The timers are counters that receive a dedicated clock from clock generator module #2 (either CK_REF or CK_GEN2 output divided by 2). This clock can be prescaled (divided down) as controlled by the prescale clock timer value (PTV) field of the control timer register (shown in Table 8–2, PTV Divisors: 32-Bit Timers).
Timers Table 8–5. Control Timer Register (CNTL_TIMER) (Continued) Reset Name Value Descriptions Value 0: Stop timer Start timer With one-shot mode selected (AR = 0), bit is automatically reset by internal logic when timer equals 0. The load timer register (LOAD_TIM) is a 32-bit register (see Table 8–6 and Table 8–7).
Timers Table 8–8. Read Timer High Register (VALUE_TIM_HI) Reset Name Description Value 15–0 VALUE_TIM_HI Value of timer. This is the same as READ_TIM[31:16], Undefined Table 8–9. Read Timer Low Register (VALUE_TIM_LO) Reset Name Description Value 15–0 VALUE_TIM_LO Value of timer. This is the same as READ_TIM[15:0] at the time Undefined of the last TIPB read to READ_TIM_HI.
Timers Table 8–10. DSP Timer 1 Registers Size Word Reset Register Name Description (Bits) Address Value CNTL_TIMER1 Timer control register 0x2800 0x0000 LOAD_TIM1 Value that must be loaded into timer 0x2802 when timer passes through 0 READ_TIM1 Timer counter 0x2804 Table 8–11.
Watchdog Timer 8.3 Watchdog Timer When powered up, the timer defaults to the watchdog timer for the DSP. This configuration requires that the user program or the OS periodically write to the count register before the counter underflows to prevent the timer from generat- ing a reset to the DSP.
Watchdog Timer Table 8–14. PTV Divisors: Watchdog Timer Divisor The timer period is defined by: The value of the PTV, which is forced to 7 if the timer is in watchdog mode The value of the load register The timer interrupts period is: (PTV+1) X (LOAD_TIM + 1) x 2 where t...
Watchdog Timer 8.3.1 Programming the Watchdog Timer in Watchdog Mode On power up, the watchdog timer is enabled in the watchdog mode and the value loaded into the load timer register is set to the maximum value (0xFFFF). This gives the user a duration of 16,777,216 * t to change the timer mode or write a new value (different from 0xFFFF) into the load timer register.
Watchdog Timer Table 8–18. Load Timer Register (LOAD_TIM) Reset Name Description Value 15–0 LOAD_TIM General-purpose timer. This value is loaded when timer passes through FFFF 0 or when it starts. Watchdog timer. Reload timer with this value. Table 8–19. Read Timer Register (READ_TIM) Reset Name Description...
Interrupt Handlers 8.4.1 Level 1 Interrupts The DSP level 1 interrupt controller receives interrupts from peripherals and sends them to the DSP core (see Table 8–21). The TI peripheral bus is respon- sible for prioritizing, capturing, and synchronizing interrupts, before sending them to the DSP.
Interrupt Handlers Figure 8–4. Level 2 Interrupt Control Flow 16 incoming interrupts Edge dectection flip_flops Edge or level direction Interrupt input register (IIR) Interrupt set register (ISR) Mask interrupt register (MIR) Interrupt level register 0 (ILR0) Process next pending IRQ Process next pending FIQ Interrupt level register 1 (ILR1) Generate IRQ...
Page 585
Interrupt Handlers 8.4.2.1 Interrupt Sequence 1) One or several incoming interrupts go down, setting the corresponding ITR bits. 2) At this time, two possibilities exist: If there is only one active incoming interrupt and FIQ is not already active, the interrupt controller sends an FIQ. When several incoming interrupts are active, the interrupt controller must determine which is the new interrupt to be serviced.
Interrupt Handlers Table 8–23. Interrupt Input Register (ITR) Reset Name Type Value IRQ_15 IRQ_0 In the event of an edge-sensitive interrupt, ITR stores an incoming interrupt. When the DSP accesses the SIR_FIQ register, the bit corresponding to the interrupt that has requested the DSP action is reset. The DSP can also clear each bit individually by writing a 0 to the corresponding bits at the ITR address.
Interrupt Handlers The mask interrupt register (MIR) operates after interrupt input register (ITR); this means that occurrences of incoming interrupts are always stored in interrupt input register (ITR). Table 8–25. IRQ Binary-Coded Source Register (SIR_IRQ) Reset Name Type Value 3–0 IRQ_NUM This register saves software processing time by recognizing the interrupt number as being either an IRQ or FIQ request.
Interrupt Handlers Table 8–27. Interrupt Control Register (CONTROL_REG) Reset Name Description Type Value NEW_FIQ_AGR New FIQ agreement Writing a 1 resets FIQ output and clears source FIQ register. Enables a new FIQ generation, reset by internal logic. Corresponding bit of ITR must be cleared first. NEW_IRQ_AGR New IRQ agreement Writing a 1 resets IRQ output and clears source IRQ register.
Interrupt Handlers Table 8–29. Interrupt Level Registers (ILR0...ILR15) Reset Name Value Description Type Value 5–2 PRIORITY Define the priority level when the corresponding interrupt is routed to IRQ or FIQ. 0 is the highest priority level. 15 is the lowest priority level. SENS_EDGE The corresponding interrupt is falling-edge-sensitive.
DSP Interrupt Interface 8.5 DSP Interrupt Interface The DSP interrupt interface (DSP_INT_IF) augments the capability of the DSP interrupt processing by providing user-definable edge-triggered and level-sensitive implementations for each of the interrupt lines. This is neces- sary to allow edge-triggered interrupts, since the DSP level 1 interrupts must be active for greater than two DSP_CLK cycles to be recognized as being active.
DSP Interrupt Interface When the edge-registration flip-flop is cleared by the asynchronous reset, two DSP_INTH_CK clock periods must expire before another negative edge tran- sition can be registered. Thus successive negative transitions must be a mini- mum of six DSP_INTH_CK clock periods apart in time to be ensured of being recognized as two separate incidents.
DSP Interrupt Interface 8.5.3 Level-Sensitive Interrupts The level-sensitive interrupt process is, in many ways, identical to the edge- triggered interrupt process. This process also uses a chain of four positive- edge triggered timing flip-flops, but this chain is driven by the inverted repre- sentation of the incoming interrupt nXIRQ(N).
DSP Interrupt Interface Table 8–31. Edge-Triggered/Level-Sensitive Control Register Low Reset Name Value Description Type Value 15–0 CHx Trig/Level This bit defines whether channel CHx is edge- or level- sensitive where CHx corresponds to interrupt channels nXIRQ[15:0]. Channels nXIRQ[15:0] correspond to the DSP level 1 interrupts IRQ17:2, respectively.
DSP Interrupt Interface 8.5.4.1 Level-Sensitive Clear Commands (Write Only) A write transaction issues a clear to those interrupt channels whose assigned bit in the 16-bit word being written is 1. Commands to clear interrupt channels are necessary for those channels assigned as level-sensitive interrupt chan- nels.
DSP Interrupt Interface Table 8–34. Level-Sensitive Clear High Register (RST_LVL_HI) (Continued) Reset Name Value Description Type Value 5–0 Reset_CHx Reset CHx if a 1 is written into RST_LVL_LO[x] and CHx is configured as level-sensitive interrupt, where CHx corresponds to interrupt channels nXIRQ[20:16].
Chapter 9 DSP Public Peripherals This chapter describes the DSP public peripherals for the OMAP5910 multimedia processor. Topic Page Introduction ..........
Introduction 9.1 Introduction The four DSP public peripherals for the OMAP5910 processor include two multichannel buffered serial ports (McBSPs) and two multichannel serial interfaces (MCSIs): McBSP1 McBSP3 MCSI1 MSCI2 Figure 9–1 shows the OMAP5910 device with the DSP public peripherals highlighted.
Multichannel buffered serial ports (McBSPs) are configurable, high-speed, full-duplex serial ports that allow direct interface to external communications devices. There are three McBSPs on the OMAP5910 device. McBSP1 and McBSP3 are on the DSP public peripheral bus and are covered briefly in this chapter.
McBSP1 McBSPs / McBSP1 The operation of the OMAP5910 McBSPs is consistent with the SPRU317, with the following exceptions and clarifications: Only DXENA = 0 setting is supported. The transmit output (DX) pins don not go to high impedance when the transmitter in not actively sending data.
McBSP1 The McBSP1 is half duplex, master/slave for transmission, slave for reception. Table 9–2 lists the McBSP1 signals are available at the OMAP5910 level Table 9–2. Available McBSP1 Signals Generic McBSP Signal Name Description McBSP1 Signal Name FSX2 Transmission frame (bidirectional) McBSP1.FSX...
McBSP1 Application Example: I2S Interface This application uses McBSP1 as an I2S audio codec interface (see Figure 9–3). The OMAP5910 is intended to be either the master or slave device; that is, it either receives or provides the frame synchronization and bit clock.
RX frame-synchronization signal derived by external source CLKX set input pin and derived by external source CLKR set input pin and derived by external source Sample rate generator input clock mode bit the OMAP5910 CLKS pin status (no meaning in device) DX pin status...
McBSP1 9.3.4.3 Receive Control Register Configuration DSP_Write(0x00a0) => RCR1; set up RCR1 as shown in Table 9–6. Table 9–6. Receive Control Register 1 Configuration (DSP_Write(0x00a0) => RCR1) Config Value Description Reserved 14–8 000 0000b Set receive frame length as one word per frame 7–5 101b Set receive word length as 32 bits per frame...
McBSP1 DSP_Write(0x80a1) => XCR2; set up XCR2 as shown in Table 9–9. Table 9–9. Transmit Control Register 2 Configuration (DSP_Write(0x80a1) => XCR2) Config Value Description Set dual-phase frame 14–8 000 0000b Don’t care for single-phase frame 7–5 101b Set receive word length as 32 bits per frame Set no companding data and transfer start with MSB first Set FSX not ignore after the first resets the transfer Set data delay as 1 bit...
CLK(R/X) FS(R/X) A31 A30 A29 D(R/X) 9.4 McBSP3 This section provides information specific to McBSP3 on the OMAP5910 device. For a full description of McBSP functionality and register definitions, see the TMS320C55x DSP Peripherals Reference Guide (literature number SPRU317). 9.4.1 McBSP3 Pin Descriptions Table 9–10 identifies the McBSP3 I/O pins.
The paths shown as dashed lines in Figure 9–5 are not available in this mode. Table 9–11 lists the McBSP3 signals available in this mode at the OMAP5910 level. Table 9–11. Available McBSP3 Signals in R = 0 Mode...
McBSP3 9.4.4.1 Serial Port Control Register Configuration DSP_Write(0x1000) => SPCR; set up SPCR1 per below configuration. Table 9–15. Serial Port Control Register Configuration (DSP_Write(0x1000) => SPCR) Config Value Description Disable digital loopback mode 14–13 Right-justify and zero-fill MSBs in DRR 12–11 Enabled clock stop mode 10–8...
McBSP is set master and generate clock by internal source CLKR set input pin and derived by external source Sample rate generator input clock mode bit CLKS pin status (no meaning in OMAP5910) DX pin status DR pin status Set FSX polarity as active low...
McBSP3 9.4.4.3 Receive Control Register Configuration The values of RWDLEN1, 2 and XWDLEN1, 2 must be set to the same value in SPI mode. DSP_Write(0x0000) => RCR1; set up RCR1 per below configuration. Table 9–17. Receive Control Register 1 Configuration (DSP_Write(0x0000) => RCR1) Config Value Description Reserved...
McBSP3 9.4.4.4 Transmit Control Register Configuration The values of RWDLEN1, 2 and XWDLEN1, 2 must be set to the same value in SPI mode. DSP_Write(0x0000) => XCR1; set up XCR1 per below configuration. Table 9–19. Transmit Control Register 1 Configuration (DSP_Write(0x0000) => XCR1) Config Value Description Reserved...
McBSP3 9.4.4.5 Sample Rate Generator Configuration (SRGR[1,2]) DSP_Write (0x00FF) => SRGR1; set up SRGR1 per below configuration. Table 9–21. Sample Rate Generator 1 Configuration (SRGR[1,2]) (DSP_Write (0x00FF) => SRGR1) Config Value Description 15–8 0000 0000b These bits ignored by the FSGM=0 (SRGR2[12:12]) 7–0 1111 1111b Set sample rate generator clock divider...
Page 618
McBSP3 9.4.4.7 Interrupt Flag Configuration and Clear (ILR, ITR, MIR) on Level 2 Handler 1) DSP_Write => ILR; set ILR appropriately for the interrupt handling priority. 2) DSP_Write ITR and (0xFFFF F3FF)=> ITR; clear remaining TX and RX interrupts. Note: This set up is not needed after reset.
McBSP is set master and generate clock by internal source CLKR set input pin and derived by external source Sample rate generator input clock mode bit CLKS pin status (no meaning in OMAP5910) DX pin status DR pin status Set FSX polarity as active high...
McBSP3 9.4.4.15 Receive Control Register Configuration The values of RWDLEN1, 2 and XWDLEN1, 2 must be set to same value in SPI mode. DSP_Write(0x0000) => RCR1; set up RCR1 per below configuration. Table 9–25. Receive Control Register 1 Configuration (DSP_Write(0x0000) => RCR1) Config Value Description Reserved...
McBSP3 9.4.4.16 Transmit Control Register Configuration The values of RWDLEN1, 2 and XWDLEN1, 2 must be set to the same value in SPI mode. DSP_Write(0x0000) => XCR1; set up XCR1 per below configuration. Table 9–27. Transmit Control Register 1 Configuration (DSP_Write(0x0000) => XCR1) Config Value Description Reserved...
McBSP3 9.4.4.18 DMA Configuration Configure the REVT and XEVT bit for the DMA receive and transmit synchronized invent. 9.4.4.19 Interrupt Flag Configuration and Clear (ILR, MIR) 1) ARM_Write => ILR; set ILR appropriately for the interrupt handling priority. 2) ARM_Write MIR and (0x0000 0D00) => MIR; disabled SPI TX and RX interrupt Note: Enable the appropriate DMA channel interrupts.
MCSIs expand the parallel interface of a DSP to connect to external devices such as codecs and GSM system simulators. The two public MCSIs on the OMAP5910 device provide full duplex transmis- sion and master or slave clock control. All transmission parameters are...
Multichannel Serial Interfaces 9.5.1 Communication Protocol 9.5.1.1 Configuration Parameters The configuration parameters can be modified only if the MCSI is disabled (control_reg[0] = 0). Slave/Master Control Using the control bit, the interface can be configured in one of two ways: In master mode with the transmission clock and the frame synchronization pulse generated by the interface In slave mode with the transmission clock and the frame synchronization...
Page 626
Multichannel Serial Interfaces Normal/Alternate Frame Synchronization The frame-synchronization pulse position either is normal with the frame-synchronization pulse starting one bit before channel 0 or alternates with the frame-synchronization pulse starting with the first bit of channel 0. Control bit: MAIN_ PARAMETERS _REG(9) = FRAME_POSITION 1: Alternate 0: Normal Continuous/Burst Mode...
Page 627
Multichannel Serial Interfaces Word Size To choose the size of the word, set its size minus one into the main parameters registers. Control bit: MAIN_PARAMETERS_REG(3:0) = WORD_ SIZE (2 <= WORD_ SIZE <= 15) The MCSI transmits and receives the most significant bit first. For example, if the word_size equals 11, the upper 12 bits of the TX registers are transmitted, the upper 12 bits of the RX registers contain the received data, and the lower 4 bits are zeros.
Multichannel Serial Interfaces DSP_Write(0x0007) = MAIN_PARAMETERS_REG (set up MCSI per configuration below) Bit 15-14 (00b): No DMA Bit 10 (0b): Positive polarity for frame Bit 9 (0b): Normal synchronization mode Bit 8 (0b): Short framing Bit 7 (0b): Single channel Bit 6 (0b): Slave mode Bit 5 (0b): Burst mode Bit 4 (0b): Positive edge for clock...
Page 629
Multichannel Serial Interfaces 9.5.1.3 Interface Management Interrupts Generation Three physical interrupts are available for real-time management of the MCSI by the DSP: RX_INT (data receive interrupt) TX_INT (data transmit interrupt) FERR_INT (frame duration error interrupt) RX_INT, TX_INT, and FERR_INT are maskable with dedicated programmable control bits of the interrupt register INTERRUPTS_REG.
Multichannel Serial Interfaces Figure 9–10. Receive Interrupt Timing Diagram Channel N-1 Channel N+1 Channel N IT_RX t (syn) t (syn) t (syn) < 2 x DSPXOR_CK (12 MHz) INTERRUPT_REG(3:0) = N–1 DSP_WRITE(1) => STATUS_REG(2) Transmit Interrupt The transmit interrupt is generated every frame after the start of the transmis- sion of a data word.
Multichannel Serial Interfaces Frame Duration Error Interrupt The frame duration error interrupt is only generated when: The interface is configured in burst mode (CONTINUOUS = 0). The frame duration is smaller or longer than the expected value. Namely, expected frame duration = [(channels number) * (word size)] + (over- size number) in clock periods units with over-size number defined in OVER_SIZE_REG register.
Multichannel Serial Interfaces Figure 9–13. Frame Duration Error—Too Few (Short) FSYNCH received FSYNCH expected Channel 15 Channel 0 T3 T2 T7 T6 T2 T1 Over clock duration IT_FERR t (syn) t (syn) t (syn) < 2 T13 MHz DSP_WRITE(1) => STATUS_REG(0) 9.5.1.4 Interrupt Programming At module reset, RX_INT, TX_INT, and FERR_INT are masked.
Multichannel Serial Interfaces Then, to release the interrupt signal and reset the corresponding status bits: DSP_WRITE(1) = STATUS_REG(1) for FERR_INT release STATUS_REG(2) for RX_INT release STATUS_REG(4) for TX_INT release 9.5.1.5 DMA Channel Operation Both transmit and receive operations can be supported by DMA. DMA support is enabled by control bits in the MAIN_PARAMETERS_REG: MAIN_PARAMETERS_REG(15:14) = DMA_ENABLE(1:0) TX_DMA_REQ enabled when DMA_ENABLE(0) = 1...
Multichannel Serial Interfaces Receive DMA Transfers A receive DMA transfer is initiated after the reception of the last channel of a frame, at which time all receive registers RX_REG have been updated and are ready to be read. If N channels are used, the DMA controller successively accesses all consecutive registers between RX_REG(0) and RX_REG(N-1).
Page 635
Multichannel Serial Interfaces 9.5.1.6 Interface Activation Start Sequence A typical sequence to start the interface is: 1) MCSI configuration: a) DSP_WRITE(0x0000)= CONTROL_REG in order to remove the write protection on the control registers b) DSP_WRITE(0x….)= MAIN_PARAMETERS_REG c) DSP_WRITE(0x….)= INTERRUPTS_REG d) DSP_WRITE(0x….)= CHANNEL_USED_REG e) DSP_WRITE(0x….)= CLOCK_FREQUENCY_REG DSP_WRITE(0x….)= OVER_CLOCK_REG 2) Transmit data loading for selected channels:...
Multichannel Serial Interfaces 9.5.1.7 Functional Mode Timing Diagrams The following timing diagrams are based on a positive clock polarity with parameter CLOCK_POL = 0. (Transmit on rising edge/receive on falling edge) Single-Channel/Alternate Long Framing Figure 9–16. Single-Channel/Alternate Long Framing FSYNCH First frame Last frame Single-Channel/Alternate Long Framing/Burst...
Multichannel Serial Interfaces 9.5.2 MCSI Register Descriptions Table 9–29 through Table 9–37 describe MCSI registers. CHANNEL_USED_REG, CLOCK_FREQUENCY_REG, OVER_CLOCK_REG, INTERRUPTS_REG, and MAIN_PARAMETERS_REG are write protected if the MCSI is enabled (control_reg[0] = 1). The channel selection register is only used in multichannel mode (see Table 9–29).
Multichannel Serial Interfaces The clock frequency register is used only in master mode when the interface generates the serial clock (see Table 9–30). Table 9–30. Clock Frequency Register (CLOCK_FREQUENCY_REG) Hardware Name Description Access Reset 15–11 Unused 0000 0 10–0 clk_freq Division factor of 12-MHz reference clock 000 0000 0000 (2<=clk_freq<= 2047)
Multichannel Serial Interfaces Table 9–32. Interrupt Masks Register (INTERRUPTS_REG) Hardware Name Description Access Reset 15–11 Unused 0000 0 mask_it_error Mask of frame duration error interrupt (active at 0) mask_it_tx Mask of transmit interrupt (active at 0) mask_it_rx Mask of receive interrupt (active at 0) 7–4 Number channel for it_tx Channel number for transmit interrupt...
Multichannel Serial Interfaces Table 9–34. Activity Control Register (CONTROL_REG) Hardware Software Name Value Description Access Reset Reset 15–3 Reserved Reserved bits. These bits 0000 0000 0000 0000 should always be written 0000 0 0000 0 as 0. Reserved Reserved bits. These bits should always be written as 0.
Multichannel Serial Interfaces Table 9–35. Interface Status Register (STATUS_REG) Hardware Software Name Value Description Access Reset Reset 15–7 Reserved Reserved bits. These bits 0000 0000 0 0000 0000 0 should always be written as 0. Reserved Reserved bits. These bits should always be written as 0.
Multichannel Serial Interfaces Table 9–36. Receive Word Register (RX_REG[15:0]) Name Access Hardware Reset Note: The MCSI receives the most significant bit first. For example, if the word_size equals 11, the upper 12 bits of the RX registers contain the received data, and the lower 4 bits are zeroes. 9-50...
Multichannel Serial Interfaces Table 9–37. Transmit Word Register (TX_REG[15:0]) Name Access Hardware Reset Note: The MCSI transmits the most significant bit first. For example, if the word_size equals 11, the upper 12 bits of the TX registers are transmitted. DSP Public Peripherals 9-51...
MCSI1 9.6 MCSI1 This section provides information specific to MCSI1 (Figure 9–29) on the OMAP5910 device. 9.6.1 MCSI1 Pin Description Table 9–38 identifies the MCSI1 I/O pins. Table 9–38. MCSI1 Pin Descriptions I/O Direction Description MCSI1.DIN Data input MCSI1.DOUT Data output MCSI1.CLK...
MCSI2 9.7 MCSI2 This section provides information specific to MCSI2 (Figure 9–30) on the OMAP5910 device. 9.7.1 MCSI2 Pin Description Table 9–41 identifies the MCSI2 I/O pins. Table 9–41. MCSI2 Pin Descriptions I/O Direction Description MCSI2.DIN Data input MCSI2.DOUT Data output MCSI2.CLK...
Introduction 10.1 Introduction The OMAP5910 device has five peripherals that appear on both MPU and DSP public peripheral buses: Mailbox registers for interprocessor communication General-purpose I/O (GPIO) UART1 UART2 UART/IrDA Figure 10–1 shows the OMAP5910 device with the MPU/DSP peripherals highlighted.
Interprocessor Communication 10.2 Interprocessor Communication The MPU and DSP processors communicate with each other via a mailbox-interrupt mechanism. This mechanism provides a very flexible software protocol between the processors. The mailboxes are located in the shared memory space (byte address 0xFFFC:E000 for MPU; word address 0x0F800 for DSP).
Page 659
Interprocessor Communication instead of interrupts, the command or data registers must be polled, not the flag register. The flag registers are only useful for the interrupting processor to see if the interrupted processor has responded to the interrupt by reading the command register.
Interprocessor Communication Table 10–1. Mailbox Registers Byte Reset Bits Name Function Offset Value 15–0 ARM2DSP1 Writing to this location stores a software-defined data 0x00 0000 value to be used in conjunction with the ARM2DSP1 interrupt. Can be written only by the MPU. 15–0 ARM2DSP1b Writing to this location stores a software-defined...
Interprocessor Communication Table 10–1. Mailbox Registers (Continued) Byte Reset Bits Name Function Offset Value 15–1 ARM2DSP1_Flag Reserved 0x18 xxxx Flag indicating that the ARM2DSP1 interrupt has been generated. Set by MPU write to ARM2DSP1b; cleared by DSP read of ARM2DSP2b. This bit can only be read by the MPU.
General-Purpose I/O 10.3 General-Purpose I/O The GPIOs (see Figure 10–3) are programmable inputs or outputs. They gen- erate a level interrupt, and the sources of this interrupt can be masked from within the GPIO module. Under software control, the GPIOs can be individually dedicated to either the DSP or the MPU.
General-Purpose I/O Figure 10–3. GPIO Module Architecture DSP interrupt handler MPU_GPIO_CLKACK DSP TI MPU_GPIO_CLKREQ peripheral DSP TI DSP GPIO peripheral instance Read by DSP bus I/F GPIO Config and Control Steering control logic register MPU TI peripheral MPU TI MPU GPIO peripheral Read/write by instance...
General-Purpose I/O The data input register is used to register the data that is read from the GPIO input pins. The input data is captured synchronously and clocked by an internal peripheral clock. The data input register is a read-only register. The GPIO input data is captured into this register three clock cycles after the GPIO input pin(s) change for synchronization and debouncing used to remove any input glitches.
General-Purpose I/O The interrupt control register allows the user to define when an interrupt request occurs. The interrupt can either be generated from a high-to-low tran- sition (function 0) or a low-to-high transition (function 1). Table 10–6. Interrupt Control Register (INTERRUPT_CONTROL_REG) Access Reset Value...
General-Purpose I/O / UART1, UART2, and UART3/IrDA UART1, UART2, and UART3/IrDA The pin control register is only in the MPU. MPU is the master and is responsi- ble for assigning the top-level GPIO I/O pins to either the MPU GPIO or the DSP GPIO.
Module Overview 11.1 Module Overview The OMAP5910 device includes an LCD controller that interfaces with most industry-standard LCD displays. The LCD controller operates only in single- panel mode (dual-panel mode is not supported). The module is designed to work with a separate RAM block to provide data to the FIFO at the front end of the LCD controller data path at a rate sufficient to support the chosen display mode and resolution.
Module Overview Programmable pixel rate Pixel clock plus horizontal and vertical synchronization signals ac-bias drive signal Active display enable signal Figure 11–1.LCD Controller on Board the OMAP5910 Device DSP private Private peripherals OMAP5910 peripheral bus Timers (3) DSP public peripherals...
Page 671
(VSYNC) signal. The pixel clock frequency is derived from the clock provided to the LCD controller (LCD_CK) from the OMAP5910 clock management logic and is programmable from LCD_CK/2 to LCD_CK/255 (see Chapter 15, Clock Generation and System Reset Management). Each time new data is supplied to the LCD data pins, the pixel clock is toggled to latch the data into the LCD display serial shifter.
Module Overview Table 11–1. Interface to LCD Panel Signal Descriptions Name Type Destination Description LCD.P[15:0] LCD panel I/O pins used to transfer either four, eight, or sixteen data display values at a time to the LCD display. For monochrome displays, each signal represents a pixel;...
Display Specifications 11.2 Display Specifications The following information shows the number of palette entries and thus the number of possible screen colors per frame that can be displayed in each mode with the corresponding number of bits-per-pixel (BPP). Mono passive: 1 BPP, 2 BPP, 4 BPP, and 8 BPP 1 BPP: Two palette entries selecting one of 15 grayscale 2 BPP: Four palette entries selecting one of 15 grayscale 4 BPP: 16 palette entries selecting one of 15 grayscale...
Page 674
Display Specifications The vertical synchronization signal (VSYNC) width must be programmed to be as small as possible on passive screen modes, but long enough to load the palette without stealing all the memory bandwidth from the MPU. To satisfy the system requirement, the following equation must be met: ( PPL ) 1 ) 256 ) ( 15 * FDD ) ¦...
LCD Controller Operation 11.3 LCD Controller Operation The LCD controller supports a variety of user-programmable options, includ- ing display type and size, frame buffer pixel size, and output data width. Although all programmable combinations are possible, the selection of displays available within the market dictate which combinations of these programmable options are practical.
LCD Controller Operation Figure 11–3.256 Palette Entry/Buffer Format (8 BPP) Individual Palette Entry † Color Red (R) Green (G) Blue (B) † Mono Unused Mono (M) † Bits-per-pixel (BPP) is only contained within the first palette entry (palette entry0). 256 Entry Palette Buffer Bit 15 Base + 0x0 Palette entry 0...
LCD Controller Operation The first palette entry (palette entry 0) also contains an extra field that is used to configure the LCD controller synchronously at the beginning of each frame. Bits 12, 13, and 14 of the first palette entry contain a field that is used to select the number of bits-per-pixel that is to be used in the following frame and the number of entries that are used in the palette RAM.
• • The OMAP5910 MPU operates in little endian mode and the number and posi- tion of pixels in an access depend on access type (byte, half-word, or word). For example, if the LCD controller is in 2 BPP mode and the MPU performs...
Lookup Palette The pixel data is stored in the frame buffer the same way in all three cases (as shown in Figure 11–5); only the little endian accesses of the MPU result in the different pixel positions of each access. The top and bottom addresses of the frame buffer (palette entries + pixels data) are programmed in the DMA controller.
Color/Grayscale Dithering 11.5 Color/Grayscale Dithering Entries selected from the lookup palette are sent to the color/grayscale space/ timebase dither generator. Each 4-bit value is used to select one of 15 intensity levels. Two of the 16 dither values are identical (most intense). The gray/color intensity is controlled by turning individual pixels on and off at varying periodic rates.
Output FIFO 11.6 Output FIFO The LCD controller contains a 2-entry by 8-bit wide output FIFO that is used to store pixel pin data before it is driven out to the pins. Each time a modulated pixel value is output from the dither generator, it is placed into a serial shifter. The size of the shifter is controlled by programming the color/monochrome select bit in the LCD control registers.
1 depending on the inversions programmed in the timing 2 register. See Table 11–24. The OMAP5910 LCD controller provides outputs compatible with passive monochrome, passive color (STN), and active color (TFT) displays. Recom- mended connections to each type of display are outlined in the sections below.
Each signal represents one pixel that is dithered over successive frames to achieve a maximum of 15 gray levels (see Table 11–4). Table 11–4. Passive Monochrome Panel Inputs OMAP5910 LCD Controller Output Passive Monochrome Panel Input LCD.P[0] (leftmost pixel) D[3] LCD.P[1]...
Connecting a 12-bit panel for 16 BPP operation involves truncating the 16 bits of data to the 12 bits required by the panel (see Table 11–6). Table 11–6. 16-Bit Per Pixel and 12-Bit Panel OMAP5910 LCD Controller Output 12-Bit TFT Panel Input LCD.P[15] (red[4]) red[3] LCD.P[14] (red[3])
LCD Controller Pins Table 11–6. 16-Bit Per Pixel and 12-Bit Panel (Continued) OMAP5910 LCD Controller Output 12-Bit TFT Panel Input LCD.P[3] (blue[3]) blue[2] LCD.P[2] (blue[2]) blue[1] LCD.P[1] (blue[1]) blue[0] LCD.P[0] (blue[0]) Connecting a 15-bit panel for 16 BPP operation involves truncating the 16 bits of data to the 15 bits required by the panel (see Table 11–7).
LCD Controller Registers 11.8 LCD Controller Registers The LCD controller contains four control registers and one status register. The control registers contain bit fields to enable and disable the LCD controller to define: The height and width of the screen being controlled Color or monochrome mode Passive or active display Polarity of the control lines...
LCD Controller Registers 11.8.1 LCD Control Register 1 (LCDControl) Table 11–11. LCD Control Register (LCDControl) Reset Name Value Description Value 31–25 – Reserved 5-6-5 12 BPP (5-6-5) mode 16 bits of data are in the frame buffer, but only 12 bits are dithered and sent out.
Page 691
LCD Controller Registers Table 11–11. LCD Control Register (LCDControl) (Continued) Reset Name Value Description Value Mono 8-bit mode. Selects 4 or 8 data lines to output pixel data to the screen. LCD_PIXEL[3:0] is used to output four pixel values to the panel each pixel clock transition.
LCD Controller Registers The 16-bit STN mode appears in the frame buffer memory as follows: 5-6-5. Table 11–14. 16-Bit STN Data in Frame Buffer Green Blue Pins Data The 16-bit STN mode sends only 12 bits to the dither logic (bits 11, 6, 5, and 0 are not sent to dither logic).
LCD Controller Registers TFT Alternate Signal Mapping (TFT Map) This bit controls how the TFT pixel data are output. When this bit is set to 1, the four red bits, the four green bits, and the four blue bits are mapped to all LCD.P[15:0] output pins, as shown in Table 11–15. Table 11–15.
LCD Controller Registers LCD TFT (LCDTFT) The LCD TFT (LCDTFT) bit selects whether the LCD controller operates in passive (STN) or active (TFT) display control mode. When LCDTFT = 0: passive or STN mode is selected; all LCD data flow operates normally (including the use of the LCD dither logic);...
LCD Controller Registers Figure 11–12. Active Mode Pixel Clock and Data Pin Timing LCDTFT=1 IPC=0 M8B= Don’t Care LCD.PCLK Data Pins Samples Data Pins by the Display Change Pixel 0 Pixel 1 Pixel 2 Pixel 3 LCD.P [3:0] LCD.HS LCD.VS LCD.AC 1 LCD_CK_I clock period The size of the pixel encoding is increased in TFT mode because the LCD...
LCD Controller Registers Table 11–17 shows which set of LCD data pins (and LCD.P pins) is used for each mode of operation. Table 11–17. LCD Controller Data Pin Utilization for Mono/Color, Passive/Active Panels Color/Mono Passive/Active Panel Screen Portion Pins Mono 2, 4, 8 Passive Whole LCD_PIXEL[3:0]...
LCD Controller Registers 11.8.2 LCD Timing 0 Register (LcdTiming0) Table 11–18 describes the LCD timing 0 register (LcdTiming0) bits. Table 11–18. LCD Timing 0 Register (LcdTiming0) Reset Name Description Value 31–24 Horizontal back porch – Encoded value (from 1 256) used to specify number of pixel clock periods to add to the beginning of a line transmission before the first set of pixels is output to the display (program to value minus one).
Page 699
LCD Controller Registers Horizontal Back Porch (HBP) The 8-bit horizontal back porch (HBP) field is used to specify the number of dummy pixel clocks to insert at the beginning of each line or row of pixels. After the line clock for the previous line has been negated, the value in HBP is used to count the number of pixel clocks to wait before starting to output the first set of pixels in the next line.
LCD Controller Registers Figure 11–13. Active Mode End of Line Timing HFP= HSW=0 HBP=1 LCD.PCLK LCD.HS First Data Last Data in Row LCD.P New Row LCD.AC Figure 11–14. Passive Mode End of Line Timing HFP=1 HSW=0 HBP=1 LCD.HS First pixel Last pixel data line n+1 data line n...
Page 701
LCD Controller Registers Horizontal Synchronization Pulse Width (HSW) The 6-bit horizontal synchronization pulse width (HSW) field is used to specify the pulse width of the line clock in passive mode or horizontal synchronization pulse in active mode. LCD.HS is asserted each time a line or row of pixels is output to the display and a programmable number of pixel clock delays have elapsed.
LCD Controller Registers 11.8.3 LCD Timing 1 Register (LcdTiming1) The LCD timing 1 register contains four bit fields that are used as modulus values for a collection of down counters, each of which performs a different function to control the timing of several of the LCD lines. Table 11–19 shows the location of the bit fields located in LCD timing 1 register (LCDTiming1) and provides bit descriptions.
LCD Controller Registers Vertical Back Porch (VBP) The 8-bit vertical back porch (VBP) field is used to specify the number of hori- zontal synchronizations (line clocks) to insert at the beginning of each frame. The VBP count starts just after the VSYNC signal for the previous frame has been negated for active mode or the extra horizontal synchronizations have been inserted as specified by the VSW bit field in passive mode.
LCD Controller Registers Figure 11–16. Passive Mode End of Frame Timing VFP=1 VSW=1 VBP=2 LCD.VS LCD.HS Î Î Î Î Î Î Î Î Î Î Î Î Î Î Î LCD.P Î Î Î Î Î Î Î Î Î Î Î Î Î Î Î Last First Second...
Page 705
LCD Controller Registers Note: The line clock transitions during the insertion of the dummy horizontal syn- chronization delay periods. VSW must be long enough to load the palette. As mentioned, VSW does not affect generation of the frame clock (i.e., vertical synchronization) signal in passive mode.
LCD Controller Registers 11.8.4 LCD Timing 2 Register (LcdTiming2) The LCD timing 2 register (LcdTiming2) contains seven different bit fields that are used to control various functions associated with the timing of the LCD controller (see Table 11–20). The LCD controller must be disabled (LCDEN = 0) when changing the state of any field within this register.
Page 707
LCD Controller Registers Table 11–20. LCD Timing 2 Register (LcdTiming2) (Continued) Reset Name Value Description Value Invert HSYNC LCD.HS pin is active high and inactive low. LCD.HS pin is active low and inactive high. Active and passive mode: horizontal synchronization pulse/line clock active between lines and after end of line wait period Invert VSYNC LCD.VS pin is active high and inactive low.
LCD Controller Registers HSYNC/VSYNC Rise or Fall Programmability This bit determines whether the HSYNC/VSYNC signals are driven on the ris- ing or falling edge of the pixel clock (PHSVS_ON_OFF must be turned on first). By default, the HSYNC/VSYNC signals are driven on the falling edge of the pixel clock, and the LCD pixel data is driven on the rising edge of pixel clock.
LCD Controller Registers The waveforms in Figure 11–18 show PHSVS_ON_OFF PHSVS_RISE_FALL = 0, and IPC = 1. Figure 11–18. Signal Timing When PHSVS_ON_OFF = 1 IPC=1 LCD.PCLK LCD.P[15:0] Pixel 0 HPC-1 LCD.HS VPC-1 LCD.VS LCD.AC ac-Bias Line Transactions Per Interrupt (ACBI) The 4-bit ac-bias line transitions per interrupt (ACBI) field is used to specify the number of LCD.AC line transitions to count before setting the ac-bias count status (ABC) bit in the LCD controller status register, which signals an interrupt...
Page 710
(see Table 11–21). PCD can generate a range of pixel clock frequencies from LCD_CK/2 to LCD_CK/255, where LCD_CK is the LCD controller clock from the OMAP5910 clock management logic (see Chap- ter 15, Clock Generation and System Reset Management). The pixel clock frequency must be adjusted to meet the required screen refresh rate.
LCD Controller Registers All of these factors alter the time duration from one frame transmission to the next. Different display manufacturers require different frame refresh rates, depending on the physical characteristics of the display. The PCD is used to alter the pixel clock frequency in order to meet these requirements. The PCD is also used in parallel data input mode to select the frequency of pixel clock.
LCD Controller Registers Table 11–22. LCD Status Register (LcdStatus) Reset Name Value Description Value 31–7 – Reserved Loaded palette (read-only) The palette is not loaded. The palette is loaded. FIFO underflow status (read-only). Cleared by setting LCDEN to 0, which also resets the input FIFO in the DMA controller. FIFO has not underrun.
LCD Controller Registers Table 11–23. LCD Subpanel Register (LcdSubpanel) Reset Name Value Description Value SPEN Subpanel enable Function disabled Subpanel function mode enabled Reserved HOLS High or low signal The field indicates the position of subpanel compared to the LPPT value.
LCD Controller Registers Figure 11–19. LCD Subpanel Display Register (LcdSubpanel) PANEL Line N Line N Threshold Threshold Line 0 Line 0 SPEN = 1 SPEN = 1 HOLS = 0 HOLS = 1 Line N LPPT = n Line n+1 Line N Line 0 11-48...
Interface to LCD Panel Signal Reset Values 11.9 Interface to LCD Panel Signal Reset Values The LCD panel signal outputs can accept two distinct reset values (see Table 11–24): After a hardware reset by setting the LCD_RESET_I signal to low By disabling the LCD (setting LCDEN bit to low) The default value depends solely upon the signal polarity control, as defined in the LCD timing 2 register, except for LCD.P[15:0] when driven...
Either the MPU (default) or the DSP controls the three UARTs in the OMAP5910 processor via three TIPB switches (one for each UART). Figure 12–1 shows the OMAP5910 device with the UART modem module highlighted. UART1 and 2 are UART modems with autobaud capability.
UART Introduction 12.1.1 Main UART Features (UART1/2/3) The main features are as follows: Selectable UART/autobaud modes (UART1 and 2 only) Dual 64-entry FIFOs for received and transmitted data payload Programmable and selectable transmit and receive FIFO trigger levels for DMA and interrupt generation Programmable sleep mode Complete status reporting capabilities in both normal and sleep mode Frequency prescaler values from 0 to 65535 to generate the appropriate...
UART Introduction 12.1.1.2 IrDA Functions (UART3 Only) Slow infrared (SIR) operations Framing error, cyclic redundancy check (CRC) error, abort pattern (SIR) detection 8-entry status FIFO (with selectable trigger levels) available to monitor frame length and frame errors Table 12–1 describes the I/O module at the module level. 12.1.1.3 UART Signals The signals available on the UART modules are illustrated in Figure 12–2.
UART Introduction Table 12–1. I/O Description Reset Signal Description Value UART/MODEM Signals Serial data input – Serial data output Clear to send. – Active-low modem status signal. Reading bit 4 of the modem status register checks the condition of CTS. Reading bit 0 of that register checks a change of state of CTS since the last read of the modem status register.
Each UART is controllable through a TIPB switch, either by the MPU (default) or the DSP. 12.2.1 UART1 Environment UART1 is a UART modem with autobaud capability. Table 12–2 lists the UART1 modem signals accessible at the OMAP5910 level. Table 12–2. Available UART1 Signals Generic UART Signal Name Description...
UART Environments 12.2.2 UART2 Environment UART2 is an UART modem with autobaud capability. Table 12–3 lists the UART2 modem signals accessible at the OMAP5910 level. Table 12–3. Available UART2 Signals Generic UART Signal Name Description UART1 Signal Name Serial data input...
Putting the baud clock outside of the device enables an external UART to use this baud clock to remain synchronized even while the OMAP5910 device is in deep sleep. If the external UART sends a byte when the OMAP5910 device uis in deep sleep, it isreceived by UART2 correctly without loss of data, although at a slow rate.
You can use the IRDA_SELECT signal to control the multiplexing on the UART3 I/Os between the UART3 modem signals and the UART3 IrDA signals. Table 12–4 lists the UART3 IrDA signals accessible at the OMAP5910 level when IRDA_SELECT = 1.
UART Environments The functional clock is either a 12-MHz or a 48-MHz clock. You can select the clock with the CONF_MOD_UART3_CLK_MODE_R bit (30) of the MOD_CONF_CTRL_0 register (see Section 6.8, OMAP5910 Configuration Registers) as follows: CONF_MOD_UART3_CLK_MODE_R = 0: 12 MHz (default)
UART Environments 12.2.4 TIPB Switch By default, the three UARTs are controllable from the MPU public TIPB. The three TIPB switch modules allow you to change the default configuration individually and thus to control the UARTs from the DSP public TIPB. This change can only be done during the boot time.
UART Environments Table 12–8. TIPB Switch Status MPU Register (RHSW_ARM_STA) Reset Name Value Function Value 15–4 Reserved – – – RHSW_BOTH_LCK_ERR Normal operation Lock error RHSW_ITPEND_ERR Normal operation DMA request error RHSW_DMAREQ_ERR Normal operation IT pending error RHSW_ERR_NIRQ Clears IRQ line and all others status bits of register Normal operation Table 12–9.
UART Environments Table 12–10. TIPB Switch Configuration DSP Register (RHSW_DSP_CNF) Reset Name Value Function Value 15–2 Reserved – – – DSP_PERIPH_LOCK No lock DSP bus is allocated. ARM_PERIPH_LOCK No lock MPU bus is allocated. Table 12–11. TIPB Switch Status DSP Register (RHSW_DSP_STA) Reset Name Value...
UART Environments 12.2.5 Switching Procedures The following procedures enable you to switch from MPU to DSP. For switching UART1 to DSP: 1) MPU: Write 0 into the UART1 TIPB switch configuration MPU register (RHSW_ARM_CNF) to unlock UART1. 2) DSP: Write 2 into the UART1 TIPB switch status DSP register (RHSW_DSP_CNF) to lock UART1.
UART/Autobaud Control and Status Registers 12.3 UART/Autobaud Control and Status Registers The programming combinations for register selection are shown in Table 12–12. 12.3.1 UART/Autobaud Modem Register Mapping UART1 and UART2 are accessible as follows: MPU (32-bit-byte aligned address) from the following base addresses: UART1: 0xFFFB 0000 UART2: 0xFFFB 0800 DSP (16-bit-aligned word address) from the following base addresses:...
UART/Autobaud Control and Status Registers Table 12–14. Receive Holding Register (RHR) Reset Name Function Value 7–0 Receive holding register Undefined The transmitter section consists of the transmit holding register (THR) and the transmit shift register. The THR is actually a 64-byte FIFO. The host (MPU or DSP) writes data to the THR.
Page 736
UART/Autobaud Control and Status Registers Table 12–16. FIFO Control Register (FCR) (Continued) Reset Name Value Function Value 5–4 TX_FIFO_TRIG Sets the trigger level for the TX FIFO: If SCR6 = 0 and TLR3:0 = 0000: 8 characters 16 characters 56 characters 60 characters If SCR6 = 0 and TLR3:0 ≠...
UART/Autobaud Control and Status Registers Table 12–17. Supplementary Control Register (SCR) Reset Name Value Function Value RX_TRIG_GRANU1 Disables the granularity of 1 for trigger RX level Enables the granularity of 1 for trigger RX level TX_TRIG_GRANU1 Disables the granularity of 1 for trigger TX level Enables the granularity of 1 for trigger TX level...
UART/Autobaud Control and Status Registers Table 12–18. Line Control Register (LCR) Reset Name Value Function Value DIV_EN Normal operating condition Divisor latch enable. Allows access to DLL, DLH, and other registers (see the register mapping). BREAK_EN Break control bit. Normal operating condition Forces the transmitter output to go low to alert the communication terminal PARITY_TYPE2...
UART/Autobaud Control and Status Registers Table 12–18. Line Control Register (LCR) (Continued) Reset Name Value Function Value 1–0 CHAR_LENGTH Specifies the word length to be transmitted or received. 5 bits 6 bits 7 bits 8 bits Note: As soon as LCR[6] is set to 1, the RX line is forced to 0 and remains in this state as long as LCR[6] = 1. Table 12–19.
Page 740
UART/Autobaud Control and Status Registers Table 12–19. UART Mode Line Status Register (LSR) (Continued) Reset Name Value Function Value RX_FE No framing error in data being read from RX FIFO Framing error occurred in data being read from RX FIFO (i.e., received data did not have a valid stop bit).
UART/Autobaud Control and Status Registers Table 12–20. Supplementary Status Register (SSR) Reset Name Value Function Value 7–2 – Reserved 000000 RX_CTS_DSR_WAKE_ No falling edge event on RX, CTS and UP_STS A falling edge occurred on RX, CTS or DSR. TX_FIFO_FULL TX FIFO not full TX FIFO full Note:...
UART/Autobaud Control and Status Registers Table 12–21. Modem Control Register (MCR) (Continued) Reset Name Value Function Value RESERVED Reserved. This bit must always be written as 0: Forces RTS output to inactive (high) Forces RTS output to active (low) In loopback mode controls MSR4. If automatic RTS is enabled, the RTS output is controlled by hardware flow control.
UART/Autobaud Control and Status Registers The interrupt enable register (IER) can be programmed to enable/disable any of the following interrupts: Receiver error XOFF received CTS/RTS change of state from low to high These interrupts can be enabled/disabled individually. There is also a sleep mode enable bit.
UART/Autobaud Control and Status Registers The IIR is a read-only register that provides the source of the interrupt in a prioritized manner. Table 12–24. UART Mode Interrupt Identification Register (IIR) Reset Name Value Function Value 7–6 FCR_MIRROR Mirror the contents of FCR(0) on both bits 5–1 IT_TYPE Priority...
UART/Autobaud Control and Status Registers Table 12–25. Enhanced Feature Register (EFR) (Continued) Reset Name Value Function Value SPECIAL_CHAR_ Normal operation DETECT Special character detect enable Received data is compared with XOFF2 data. If a match occurs, the received data is transferred to FIFO and IIR bit 4 is set to 1 to indicate a special character has been detected.
UART/Autobaud Control and Status Registers Table 12–27. XON1 Register (XON1) Reset Name Function Value 7–0 XON_WORD1 Used to store the 8-bit XON1 character 0x00 Table 12–28. XON2 Register (XON2) Reset Name Function Value 7–0 XON_WORD2 Used to store the 8-bit XON2 character 0x00 Table 12–29.
UART/Autobaud Control and Status Registers The divisor latch low register (DLL) and divisor latch high register (DLH) store the 16-bit divisor for generation of the baud clock in the baud rate generator. DLH stores the most significant part of the divisor; DLL stores the least significant part of the divisor.
UART/Autobaud Control and Status Registers The transmission control register (TCR) stores the receive FIFO threshold levels to start/stop transmission during hardware/software flow control. Table 12–34. Transmission Control Register (TCR) Reset Name Function Value 7–4 RX_FIFO_TRIG_START RCV FIFO trigger level to RESTORE 0000 transmission (0 –...
UART/Autobaud Control and Status Registers Table 12–36 and Table 12–37 summarize the different ways to set the trigger levels for the transmit FIFO and the receive FIFO. Table 12–36. TX FIFO Trigger Level Setting Summary SCR[6] TLR[3:0] TX FIFO Trigger Level 0000 Defined by FCR5:4 (either 8, 16, 32, 56 spaces) 00000...
UART/Autobaud Control and Status Registers The mode of operation can be programmed by writing to MDR1[2:0]; therefore the MDR1 must be programmed on start-up after configuration of the configu- ration registers (DLL, DLH, LCR). The value of MDR1[2:0] must not be changed again during normal operation.
UART/Autobaud Control and Status Registers Table 12–39. Autobauding Status Register (UASR) (Continued) Reset Name Value Function Value 4–0 SPEED Used to report the speed identified 0000 00000 No speed identified 00001 115 200 bauds 00010 57 600 bauds 00011 38 400 bauds 00100 28 800 bauds 00101 19 200 bauds 00110...
UART/Autobaud Control and Status Registers / UART/Autobaud Modes of Operation UART/Autobaud Modes of Operation Table 12–41. Module Version Register (MVR) Reset Name Function Value † MAJOR_REV Major revision number of the module MINOR_REV Minor revision number of the module † For example: MVR = 0x11 => Version 1.1 12.4 UART/Autobaud Modes of Operation The UART/autobaud module can operate in two different modes: UART mode and UART with autobaud mode.
UART/Autobaud Functional Description UART/Autobaud Modes of Operation / UART/Autobaud Functional Description 12.4.2 UART Mode With Autobauding The UART modem module is enhanced with an autobauding functionality, which in control mode allows automatically setting the speed, the number of bits per character, and the parity selected (see Figure 12–7). Figure 12–7.
UART/Autobaud Functional Description 12.5.2 Trigger Levels The UART provides programmable trigger levels for both receiver and trans- mitter DMA and interrupt generation. After reset, both transmitter and receiver FIFOs are disabled (in effect, the trigger level is the default value of one byte). Programmable trigger level is an enhanced feature available via the trigger level register (TLR).
Page 755
UART/Autobaud Functional Description Table 12–42. Generic Interrupt Descriptions in Modem Mode (Continued) Priority Interrupt IIR[5 - 0] Interrupt Source Interrupt Reset Method Level Type 0 1 0 0 0 0 XOFF Receive XOFF characters(s)/ Receive XON character(s), if interrupt/special special character XOFF interrupt/read of IIR, if character special character interrupt...
UART/Autobaud Functional Description Figure 12–9. Receive FIFO IT Request Generation Host acknowledged IT request and transferred enough bytes to recover FIFO level below Receive FIFO Level threshold Programmable flow control threshold Programmable FIFO threshold Zero byte time Interrupt request Interrupt request active low time In receive, no interrupt is generated until receive FIFO reaches its threshold.
UART/Autobaud Functional Description 12.5.4 FIFO Polled Mode In FIFO polled mode (FCR [0] = 0, relevant interrupts disabled via IER) the status of the receiver and transmitter can be checked by polling the line status register (LSR). This mode is an alternative to the FIFO interrupt mode of operation where the status of the receiver and transmitter is automatically known by means of interrupts sent to the host (MPU or DSP).
UART/Autobaud Functional Description In transmit mode, a DMA request is automatically asserted when FIFO is empty. This request is deasserted when the number of bytes defined by the threshold level has been written by the system DMA. The DMA request is again asserted if the FIFO is able to receive the number of bytes defined by the threshold.
UART/Autobaud Functional Description 12.5.7 Break and Time-out Conditions Time-out counter The RX idle condition is detected when the RX line has been high for a time equivalent to (4X programmed word length) plus12 bits. The receiver line is sampled midway through each bit. For sleep mode, the counter is reset when there is activity on the RX line.
UART/Autobaud Functional Description 12.5.9 Hardware Flow Control Hardware flow control is composed of automatic RTS and automatic CTS. Both can be enabled/disabled independently by programming EFR[7:6]. With automatic CTS, CTS must be active before the module can transmit data. Automatic RTS only activates the RTS output when there is enough room in the FIFO to receive data, and it deactivates the RTS output when the RX FIFO is sufficiently full.
UART/Autobaud Functional Description 12.5.10 Software Flow Control Software flow control is enabled through the enhanced feature register (EFR) and the modem control register (MCR). Different combinations of software flow control can be enabled by setting different combinations of EFR[3 - 0]. There are two other enhanced features related to software flow control: XON any function [MCR(5)]: Operation resumes after receiving any character after recognizing the XOFF character.
UART/Autobaud Functional Description 12.5.10.2 TX With XOFF1, two characters are transmitted when the RX FIFO has passed the programmed trigger level TCR(3:0). With XON1, two characters are transmitted when the RX FIFO reaches the trigger level programmed via TCR(7:4). After an XOFF character has been sent, if software flow control is disabled, the module transmits XON characters automatically to enable normal transmis- sion to proceed.
Page 764
UART/Autobaud Functional Description The following settings are allowed in autobaud mode: Speed: 115.2K baud, 57.6K baud, 38.4K baud, 28.8K baud, 19.2K baud, 14.4K baud, 9.6K baud, 4.8K baud, 2.4K baud, or 1.2K baud. Length: 7 or 8 bits Parity: Odd, even, or space Combination 7-bit space parity is forbidden.
UART/Autobaud Configuration Example UART/Autobaud Functional Description / UART/Autobaud Configuration Example Figure 12–13. Autobaud State Machine !(A a) Wait a or A <CR> !(A a t) no PE !(A a T) Wait T Wait t (Baud rate (Baud rate acquired) acquired) Reception !<CR>...
UART/Autobaud Configuration Example 12.6.1 UART SW Reset he goal is to clear IER and MCR registers, remove UART breaks (LCR[6] = 0), and put the module in reset (MDR1[2:0] = 0x3). 1) To write into both the IER and MCR registers, set EFR[4] to 1. 2) To enable access to the EFR register, write 0xBF to the LCR register: LCR = 0xBF EFR[4] = 1...
UART/IrDA Control and Status Registers 12.7 UART/IrDA Control and Status Registers Each register is selected using a combination of address and some LCR register bit settings, as shown in Table 12–43. UART3 is accessible as follows: MPU (32-bit aligned byte address) from the following base address: UART3: 0xFFFB 9800 DSP (16-bit aligned word address) from the following base address: UART3: 0x00CC00...
UART/IrDA Control and Status Registers The receiver section consists of the receiver holding register (RHR) and the receiver shift register. The RHR is actually a 64-byte FIFO. The receiver shift register receives serial data from RX input. The data is converted to parallel data and moved to the RHR.
UART/IrDA Control and Status Registers Table 12–47. FIFO Control (FCR) Register Reset Name Value Function Value 7–6 RX_FIFO_TRIG Sets the trigger level for the RX FIFO: If SCR7 = 0 and TLR7:4 = 0000: 8 characters 16 characters 56 characters 60 characters If SCR7 = 0 and TLR7:4 0 0000, RX_FIFO_TRIG is not considered.
Page 772
UART/IrDA Control and Status Registers Table 12–47. FIFO Control (FCR) Register (Continued) Reset Name Value Function Value DMA_MODE DMA_MODE 0 (no DMA) DMA_MODE 1 (UART_nDMA_REQ0 in TX, UART_nDMA_REQ1 in RX) This register is considered if SCR0 = 0. TX_FIFO_CLEAR No change Clears the transmit FIFO and resets its counter logic to zero.
UART/IrDA Control and Status Registers Table 12–48. Supplementary Control Register (SCR) Reset Name Value Function Value RX_TRIG_GRANU1 Disables the granularity of 1 for trigger RX level Enables the granularity of 1 for trigger RX level TX_TRIG_GRANU1 Disables the granularity of 1 for trigger TX level Enables the granularity of 1 for trigger TX level...
Page 774
UART/IrDA Control and Status Registers The line control register (LCR) [6:0] defines parameters of the transmission and reception. Table 12–49. Line Control Register (LCR) Reset Name Value Function Value DIV_EN Normal operating condition Divisor latch enable. Allows access to DLL, DLH, and other registers (refer to the registers mapping).
UART/IrDA Control and Status Registers Table 12–49. Line Control Register (LCR) (Continued) Reset Name Value Function Value CHAR_LENGTH Specify the word length to be transmitted or received. 5 bits 6 bits 7 bits 8 bits Note: As soon as LCR[6] is set to 1, the RX line is forced to 0 and remains in this state as long as LCR[6] = 1. Table 12–50.
Page 776
UART/IrDA Control and Status Registers Table 12–50. UART Mode Line Status Register (UART_LSR) (Continued) Reset Name Value Function Value RX_FE No framing error in data being read from RX FIFO Framing error occurred in data being read from RX FIFO (received data did not have a valid stop bit).
UART/IrDA Control and Status Registers Table 12–51. SIR Mode Line Status Register (SIR_LSR) Reset Name Value Function Value THR_EMPTY Transmit hold register is not empty. Transmit hold register is empty. The processor can now load up to 64 bytes of data into the THR if the TX FIFO is enabled.
UART/IrDA Control and Status Registers Table 12–51. SIR Mode Line Status Register (SIR_LSR) (Continued) Reset Name Value Function Value RX_FIFO_E At least one data character in the RX_FIFO No data in the receive FIFO When the LSR is read, LSR[4:2] reflect the error bits [FL, CRC, ABORT] of the frame at the top of the STATUS FIFO (next frame status to be read).
Page 779
UART/IrDA Control and Status Registers The modem control register (MCR) [3:0] controls the interface with the modem, data set, or peripheral device that is emulating the modem. Table 12–53. Modem Control Register (MCR) Reset Name Value Function Value CLKSEL No action Divide clock input by 4.
UART/IrDA Control and Status Registers The modem status register (MSR) provides information about the current state of the control lines from the modem, data set, or peripheral device to the host (MPU or DSP). It also indicates when a control input from the modem changes state.
Page 781
UART/IrDA Control and Status Registers The interrupt enable register (IER) in UART mode can be programmed to enable/disable any of the following interrupts: Receiver error XOFF CTS/RTS change of state from low to high Each of these interrupts can be enabled/disabled individually. There is also a sleep mode enable bit.
Page 782
UART/IrDA Control and Status Registers The interrupt enable register (IER) in SIR mode can be programmed to enable/ disable any of the following interrupts: Received error TX underrun Status FIFO RX overrun Last byte in RX FIFO Each of these interrupts can be enabled/disabled individually. There is also a sleep mode enable bit.
Page 783
UART/IrDA Control and Status Registers The interrupt identification register (IIR) is a read-only register, which provides the source of the interrupt in a prioritized manner. Table 12–57. UART Mode Interrupt Identification Register (UART_IIR) Reset Name Value Function Value 7–6 FCR_MIRROR Mirror the contents of FCR(0) on both bits.
Page 784
UART/IrDA Control and Status Registers The IRQ output is activated whenever one of the 8 interrupts is active. Table 12–58. SIR Mode Interrupt Identification Register (SIR_IIR) Reset Name Value Function Value EOF_IT Received EOF interrupt inactive Received EOF interrupt active LINE_STS_IT Receiver line status interrupt inactive Receiver line status interrupt active...
Page 785
UART/IrDA Control and Status Registers The enhanced feature register (EFR) enables or disables enhanced features, most of which only apply to UART mode. But EFR[4] enables write accesses to FCR[5:4], the TX trigger level, which is also used in SIR mode. Table 12–59.
UART/IrDA Control and Status Registers Table 12–60. EFR[0:3]: Software Flow Control Options Bit 3 Bit 2 Bit 1 Bit 0 TX, RX Software Flow Controls No transmit flow control Transmit XON1, XOFF1 Transmit XON2, XOFF2 † Transmit XON1, XON2: XOFF1, XOFF2 No receive flow control Receiver compares XON1, XOFF1 Receiver compares XON2, XOFF2...
UART/IrDA Control and Status Registers Table 12–64. XOFF2 Register (XOFF2) Reset Name Function Value 7–0 XOFF_WORD2 Used to store the 8-bit XOFF2 character in used 0x00 in UART mode. The scratchpad register (SPR) does not control the module in anyway. It is a scratchpad register to be used by the programmer to hold temporary data.
UART/IrDA Control and Status Registers The input frequency of the UART IrDA must be fixed to the operating frequency (here 12 MHz; no CLKSEL bit setting), and the the OSC_12M_SEL bit must be set to be able to reach the desired baud rate. Setting OSC_12M_SEL to 1 enables turning on the 6.5 division factor.
UART/IrDA Control and Status Registers Table 12–70 and Table 12–71 summarize the different ways that can be used to set the trigger levels for the transmit FIFO and the receive FIFO, respectively. Table 12–70. Transmit FIFO Trigger Level Setting Summary SCR[6] TLR[3:0] TX FIFO Trigger Level...
UART/IrDA Control and Status Registers The mode of operation can be programmed by writing to MDR1[2:0]; therefore the mode definition 1 register (MDR1) must be programmed on start-up after configuration of the configuration registers (DLL, DLH, LCR…). The value of MDR1[2:0] must not be changed again during normal operation.
UART/IrDA Control and Status Registers The mode definition 2 register (MDR2) sets the trigger level for the frame status FIFO (8 entries) and must be programmed before the mode is programmed in MDR1[2:0]. Table 12–73. Mode Definition Register 2 (MDR2) Reset Name Value...
UART/IrDA Control and Status Registers The received frame length registers (RXFLL and RXFLH) hold the 12-bit receive maximum frame length. RXFLL holds the least significant bits, and RXFLH holds the most significant bits. If the intended maximum receive frame length is n bytes, then program RXFLL and RXFLH to n + 3 in SIR mode (+3 is due to frame format with CRC and stop flag).
UART/IrDA Control and Status Registers The status FIFO line status line register (SFLSR) reads frame status informa- tion from the status FIFO (this register does not physically exist). Reading this register increments the status FIFO read pointer (SFREGL and SFREGH must be read first).
UART/IrDA Control and Status Registers The frame lengths of received frames are written into the status FIFO. This information can be read by reading the status FIFO registers (SFREGL and SFREGH—these registers do not physically exist). The least significant bits are read from SFREGL, and the most significant bits are read from SFREGH.
UART/IrDA Control and Status Registers The beginning of frame length register (EBLR) specifies the number of BOF + XBOFs to transmit in IrDA SIR operations. Value set into this register must take into account the BOF character; to send sent one BOF with no XBOF, this register must be set to 1.
UART/IrDA Control and Status Registers Table 12–85. Auxiliary Control Register (ACREG) (Continued) Reset Name Value Function Value ABORT_EN Frame abort. The host can intentionally abort transmission of a frame by writing 1 to this bit. Neither the end flag nor the CRC bits are appended to the frame.
UART/IrDA Modes of Operation 12.8 UART/IrDA Modes of Operation The UART/IrDA module can operate in two different modes: UART mode and slow infrared (SIR) mode. The modules perform serial-to-parallel conversion on data characters received and parallel-to-serial conversion on data characters transmitted by the processor.
UART/IrDA Modes of Operation SIR transparency is carried out if the outgoing data (between the start and stop flags) contains C0h, C1h, or 7Dh. If one of these is about to be transmitted, then the SIR state machine sends an escape character [7Dh] first, then inverts the fifth bit of the real data to be sent, and sends this data immediately after the 7Dh character.
Page 800
UART/IrDA Modes of Operation 12.8.2.2 Asynchronous Transparency Before transmitting a byte, the UART IrDA controller examines each byte in the payload and the CRC field (between BOF and EOF). For each byte equal to 0xC0 (BOF), 0xC1 (EOF), 0x7D (control escape), the controller does the following.
UART/IrDA Modes of Operation 12.8.2.4 Pulse Shaping In SIR mode both the 3/16 or the 1.6-µs pulse duration methods are supported. ACREG[7] selects the pulse-width method in transmit mode. 12.8.2.5 Encoder Serial data from the transmit state machine is encoded to transmit data to the optoelectronics (see Figure 12–15).
UART/IrDA Modes of Operation 12.8.2.6 Decoder After reset, RXD is high and the 4-bit counter is cleared (see Figure 12–16). When a rising edge is detected on RXIR, RXD falls on the next rising edge of 16XCLK with sufficient setup time. RXD remains low for 16 cycles (16XCLK) and then returns to high as required by the IrDA specification.
UART/IrDA Functional Description 12.9.3 Interrupts The UART generates interrupts on the UART_nIRQ output pin. All interrupts can be enabled/disabled by writing to the appropriate bit in the interrupt enable register (IER). The interrupt status of the device can be checked at any time by reading the interrupt identification register (IIR).
UART/IrDA Functional Description The RX_FIFO_STS bit (LSR[7]) generates the interrupt for the receiver line status interrupt. For the XOFF interrupt, if a XOFF flow character detection causes the inter- rupt, the interrupt is cleared by a XON flow character detection. If special char- acter detection causes the interrupt, the interrupt is cleared by a read of the IIR.
UART/IrDA Functional Description 12.9.3.3 Wake-Up Interrupt Wake-up interrupt is a uniquely designed interrupt, enabled when SCR[4] is set to 1. The IIR register is not modified when it occurs; SSR[1] must be checked to detect a wake-up event. When a wake-up interrupt occurs, the only way to clear it is to reset SCR[4] to 0.
UART/IrDA Functional Description Figure 12–19. Transmit FIFO IT Request Generation Transmit FIFO level Full level Number spaces Programmable FIFO threshold Zero byte time Interrupt request Interrupt request Active low time In transmit mode, an interrupt request is automatically asserted when FIFO is empty.
UART/IrDA Functional Description 12.9.6 FIFO DMA Mode Operation 12.9.6.1 DMA Signaling There are four modes of DMA operation: DMA mode 0, DMA mode 1, DMA mode 2, and DMA mode 3. They can be selected as follows. When SCR[0] = 0: Setting FCR[3] to 0 enables DMA mode 0.
UART/IrDA Functional Description In receive mode, a DMA request is generated as soon as the receive FIFO reaches its threshold. This request is deasserted when the number of bytes defined by the threshold level has been read by the system DMA. Figure 12–21.
UART/IrDA Functional Description 12.9.7 Sleep Mode 12.9.7.1 UART Mode Sleep mode is a low-power, enhanced feature of the UART that can be enabled by writing a 1 to IER[4] (when EFR[4] = 1). Sleep mode is entered when: Serial RX data input line is idle. TX FIFO and TX shift register are empty.
UART/IrDA Functional Description 12.9.8 Break and Time-Out Conditions time-out counter An RX idle condition is detected when the receiver line, RX, has been high for a time equivalent to 4 X programmed word length + 12 bits. The receiv- er line is sampled midway through each bit. For sleep mode, the counter is reset when there is activity on the RX line.
UART/IrDA Functional Description 12.9.10 Hardware Flow Control Hardware flow control is composed of automatic CTS and automatic RTS. Automatic CTS and automatic RTS can be enabled/disabled independently by programming EFR[7:6]. With automatic CTS, CTS must be active before the module can transmit data. Automatic RTS only activates the RTS output when there is enough room in the FIFO to receive data and deactivates the RTS output when the RX FIFO is sufficiently full.
UART/IrDA Functional Description 12.9.11 Software Flow Control Software flow control is enabled through the enhanced feature register (EFR) and the modem control register (MCR). Different combinations of software flow control can be enabled by setting different combinations of EFR[3-0]. There are two other enhanced features relating to software flow control: XON Any function [MCR(5)]: Operation resumes after receiving any char- acter after recognizing the XOFF character.
UART/IrDA Functional Description 12.9.11.2 TX XOFF1: Two characters are transmitted when the RX FIFO has passed the programmed trigger level TCR(3:0). XON1: Two characters are transmitted when the RX FIFO reaches the trigger level programmed via TCR(7:4). If, after an XOFF character has been sent, software flow control is disabled, the module transmits XON characters automatically to enable normal trans- mission to proceed.
UART/IrDA Functional Description 12.9.13 Store and Controlled Transmission In a store and controlled transmission (SCT), the host (MPU or DSP) first starts writing data into the TX FIFO. Then, after it writes a part of a frame (for a bigger frame) or a whole frame (a small frame, that is, supervisory frame), it writes a 1 to ACREG[2] (deferred TX start) to start transmission.
UART/IrDA Functional Description / UART/IrDA Configuration Example / UART Software Reset UART/IrDA Configuration Example The host (MPU or DSP) uses the frame-length information to locate the frame- boundary in the received frame data. The host can screen bad frames using the error-status information and later request the sender to resend only the bad frames.
UART FIFO Configuration 12.12 UART FIFO Configuration The goal of the UART FIFO configuration is to set trigger level for halt/restore (TCR register), set trigger level for transmit/receive (TLR register), and configure the FIFO (FCR register). The procedure of the UART FIFO configuration is as follows: 1) Write into both the TLR and TCR registers Set EFR[4] to 1 Set MCR[6] to 1.
Chapter 13 USB Function Module This chapter describes the components and features of the OMAP5910 universal serial bus (USB) function module. Topic Page 13.1 Overview ........... .
Standard is assumed. All references to local host (LH) in this chapter refer to the MPU processor. Figure 13–1 shows the OMAP5910 device with the USB function module high- lighted. Figure 13–2 shows the connection of the USB function module within the OMAP5910 in more detail.
This count value can then be used by system software to adjust the duration of the two time domains with respect to each other to reduce the overflow and underflow. Figure 13–1. USB Function Module DSP private Private peripherals OMAP5910 peripheral bus Timers (3) DSP public peripherals Watchdog timer TMS320C55x DSP...
Overview 13.1.3 USB Function Clocks and Reset The USB function has two clocks: An interface clock (CLOCK_I), used between the MPU TIPB and the USB function and connected to the MPU peripheral programmable clock (PERCLK), is derived by dividing CK_GEN1 (the output of DPLL1) by the value associated with the PERDIV field of the ARM_CKCTL register (0xFFFECE00).
Overview 13.1.5 USB Detection When OMAP5910 is in deep sleep mode, the USB function can detect a bus connection to an external USB host or hub and generate a deep sleep wake request (DS_WAKE_REQ_ON) to wake up the system and to get the interface clock (CLOCK_I).
Page 824
Overview 13.1.5.2 Hardware Detection This detection can have two sources: The GPIO(0) OMAP5910 input The OMAP5910 input of the USB function I/O power supply (DVDD2) selection between these sources made USB_W2FC_VBUS_MODE bit(17) of the MOD_CONF_CTRL_0 register (bit usable only in OMAP5910 configuration mode): USB_W2FC_VBUS_MODE = 0 (default): GPIO(0) is selected.
Thus: PullUp_En bit=0 (by default): The external 1.5-kΩ is seen as a pulldown on the USB D+; the external USB host cannot detect the OMAP5910 USB function. PullUp_En bit=1: The external 1.5-kΩ is seen as a pullup on the USB D+, the USB host detects this level and, therefore, the presence of the OMAP5910 USB function.
Register Map 13.2 Register Map Table 13–1 lists the USB function registers. Table 13–2 through Table 13–24 describe the register bits. The MPU base address is FFFB:4000. Table 13–1. USB Function Module Registers Offset Register Description Access Address Revision 0x00 Endpoint EP_NUM Endpoint selection...
Page 827
Register Map Table 13–1. USB Function Module Registers (Continued) Offset Register Description Access Address DMA Configuration (Continued) TXDMA1 Transmit DMA control 1 0x54 TXDMA2 Transmit DMA control 2 0x58 Reserved 0x5C RXDMA0 Receive DMA control 0 0x60 RXDMA1 Receive DMA control 1 0x64 RXDMA2 Receive DMA control 2...
Register Map 13.2.1 Revision Register (REV) The read-only revision register (REV) contains the revision number of the module. A write to this register is forbidden. Table 13–2. Revision Register (REV) Name Description 15–8 – Reserved 7–0 Rev_nb Revision number 13.2.1.1 REV_NB This 8-bits field indicates the revision number of the current USB function module.
Page 829
Register Map 13.2.2.1 Setup FIFO Select (Setup_Sel) Set by the local host in response to a setup general USB interrupt in order to access the EP0 read-only setup FIFO when reading the DATA register. Setting this bit clears the Setup interrupt bit. When this bit is set, other EP_NUM register bits must be 0.
Register Map 13.2.2.3 Endpoint Direction (EP_Dir) This bit gives the direction associated with the endpoint number selected in EP_Num. 0: OUT endpoint 1: IN endpoint Value after local host or USB reset is low. 13.2.2.4 Endpoint Number (EP_Num) The endpoint number binary encoded in these four bits, associated to the direction given by EP_Dir bit, is the current endpoint selected.
Register Map Note: Writing the DATA register when EP_Dir = 0 and reading from DATA register when EP_Dir = 1 are denied. 13.2.4 Control Register (CTRL) This set-only control register (CTRL) controls the FIFO and status of the selected endpoint. A read access to this register always returns 0. Note: The endpoint 0 setup FIFO is always enabled and ready to accept setup data.
Page 832
Register Map 13.2.4.2 Set Halt Endpoint (Set_Halt) Only concerns non-isochronous endpoints. Used by the local host to halt the selected endpoint. The halted endpoint returns STALL handshakes to the USB host. The local host can disable the endpoint interrupt if it does not wish to be informed of STALL handshakes. If the endpoint to halt is used by a DMA channel, the local host must disable the DMA channel before setting the halt conditions for this endpoint.
Page 833
Register Map The local host must never enable endpoint 0 FIFO if not performing a control transfer. For bulk and interrupt endpoints, the FIFO must never be enabled when Set_Halt = 1 (halt feature enabled) or when RX FIFO is not empty. Furthermore, during endpoint interrupt handling, the local host must have cleared the interrupt bit before setting the Set_FIFO_En bit (to avoid masked ACK interrupts).
Register Map 13.2.5 Status Register (STAT_FLG) The read-only status flag register provides a status of the FIFO and the results of the transaction handshakes for the selected endpoint. The eight MSB are reserved for isochronous endpoints, while the eight LSB are reserved for non- isochronous endpoints.
Page 835
Register Map Table 13–6. Status Register (STAT_FLG) (Continued) Name Description Transaction acknowledge (non-isochronous) FIFO_En FIFO enable status (non-isochronous) Non_ISO_FIFO_Empty Non-isochronous FIFO empty Non_ISO_FIFO_Full Non-isochronous FIFO full 13.2.5.1 Isochronous Missed IN Token (Miss_In) Only concerns isochronous IN endpoints. Notifies the local host that the core missed a valid isochronous IN token during previous frame and that TX data was flushed from the FIFO instead of being transmitted to the USB host.
Page 836
Register Map This bit is updated every frame. 0: Not significant 1: Isochronous packet received with errors Value after local host or USB reset is low. 13.2.5.4 Isochronous FIFO Empty (ISO_FIFO_Empty) Only concerns isochronous endpoints. Set when the FIFO for the selected isochronous endpoint is empty, either via an appropriate write to the Clr_EP bit or the Reset_EP bit, or after successful reads from the selected FIFO.
Page 837
Register Map 13.2.5.7 Transaction Stall (STALL) Only concerns non-isochronous endpoints. This status bit is set at the end of a transaction if a STALL handshake packet was returned to the USB host, and if no interrupt is pending on current buffer. The core automatically returns a STALL packet if a valid IN token is received by a halted TX endpoint, if a valid OUT transaction is received by an halted RX endpoint, or if there is a request error (endpoint 0).
Page 838
Register Map 13.2.5.10 FIFO Enable (FIFO_En) Only concerns non-isochronous endpoints. This bit is asserted when the Set_FIFO_En bit is set to 1 and is cleared auto- matically after a transaction completes with an ACK or STALL. 0: The non-isochronous endpoint FIFO is disabled. 1: The non-isochronous endpoint FIFO is enabled.
Register Map 13.2.6 Receive FIFO Status Register (RXFSTAT) The read-only receive FIFO status register (RXSTAT) tells how many bytes are in the receive FIFO for the selected endpoint. A write to this register has no effect. The local host cannot read this register if EP_Sel bit is not set for the endpoint.
Page 840
Register Map 13.2.7.1 Device Configuration Locked (Cfg_lock) After the local host has entered the device configuration (registers 0x20 to 0x3F), it must set this bit so that the device can be used. If the device configura- tion is not locked, the device is not ready to be used. 0: Device configuration is not locked.
Register Map 13.2.7.5 External Pullup Enable (Pullup_En) Allows the device to disconnect itself from the USB bus, forcing the host to reset and reconfigure the device. This bit can be used to prevent USB traffic when the device is not ready. 0: Pullup disabled.
Page 842
Register Map 13.2.8.2 Stall Command (Stall_Cmd) Only concerns non-autodecoded requests on control endpoint (EP0). This is asserted in response to a USB command where either the command itself or its data is invalid. Asserting this bit forces the non-autodecoded com- mand to complete with a STALL handshake.
Register Map 13.2.9 Device Status Register (DEVSTAT) The read-only device status register (DEVSTAT) provides a status reflecting the visible device states as defined in USB1.1 chapter 9. A write to this register has no effect. This register is double buffered. If the DS_Chg_IE bit is set (interrupt enabled), the background register is moved to foreground position only after clearing any pending DS_Chg interrupts.
Page 844
Register Map 13.2.9.2 USB Reset Signaling (USB_Reset) This bit returns 1 when the USB host is resetting the USB bus. A valid USB reset resets all the endpoint FIFOS, all other control register bits except Cfg_Lock, all associated configuration registers (0x20 to 0x3F), and bits DS_Chg_IE and DS_Chg.
Page 845
Register Map 13.2.9.5 Addressed State (ADD) Device is attached to the USB and powered, has been reset, and a unique device address has been assigned. This bit returns 1 after a SET_ADDRESS standard request. This bit remains set to 1 until the device becomes de-addressed.
Register Map 13.2.10 Start of Frame Register (SOF) The read-only start of frame register (SOF) provides a frame timer status for use in isochronous communications. A write to this register is forbidden. Table 13–11. Start of Frame Register (SOF) Name Description 15–13 –...
Register Map 13.2.10.2 Time Stamp OK(TS_OK) This bit indicates that the time stamp in the TS field is valid for the current frame. It returns a 1 if a valid SOF packet was received from the USB host and a 0 otherwise. 0: Time stamp is invalid.
Register Map 13.2.12 Interrupt Source Register (IRQ_SRC) The read/clear-only interrupt source register (IRQ_SRC) has for function to identify and clear the source of the interrupt signaled by a set flag. Table 13–13. Interrupt Source Register (IRQ_SRC) Name Description 15–11 – Reserved TXn_Done Transmit DMA channel n done interrupt flag (non-isochronous)
Page 849
Register Map 13.2.12.1 Transmit DMA CH.n Done Interrupt Flag (TXn_Done) Only for non-isochronous DMA transfer. This bit is never set for isochronous DMA transfer. This bit is set automatically by the core when a transmit DMA channel has com- pleted the programmed transfer by servicing the last IN transaction from the USB host.
Page 850
Register Map 13.2.12.3 Receive DMA CH.n EOT Interrupt Flag (RXn_EOT) Only for non-isochronous DMA transfer. This bit is never set for isochronous DMA transfer. This bit is set automatically by the core when a receive DMA channel has detected an end of transfer (EOT) packet during the last OUT transaction from the USB host.
Page 851
Register Map 13.2.12.5 OUT Transaction Endpoint n Interrupt Flag (EPn_RX) Only concerns non-isochronous endpoints. This bit is automatically set by the core when a handshake sequence occurs for an OUT transaction to an interrupt of bulk endpoint (NAK with the Nak_En bit set, ACK, or STALL).
Page 852
Register Map 13.2.12.9 OUT Transaction Endpoint 0 Interrupt Flag (EP0_RX) This bit is set automatically by the core when a handshake sequence occurs for a non-autodecoded OUT transaction to control endpoint (NAK with the Nak_En bit set, ACK, or STALL). 0: No action 1: OUT transaction on EP0 Value after local host or USB reset is low.
Register Map 13.2.13 Non-Isochronous Endpoint Interrupt Status Register (EPN_STAT) read-only non-isochronous endpoint interrupt status register (ENP_STAT) identifies the non-isochronous endpoint causing an EPn inter- rupt. A write into it is forbidden. If a non-transparent transaction occurs before a previous one on another end- point in the same direction has been handled by the local host, the second interrupt is asserted only after first one has been cleared by the local host and EPN_STAT is updated with the corresponding interrupt assertion.
Register Map 13.2.14 Non-Isochronous DMA Interrupt Status Register (DMAN_STAT) The read-only non-isochronous DMA interrupt status register (DMAN_STAT) identifies the endpoint causing a DMA interrupt. A write into it is forbidden. If a DMA interrupt occurs before a previous one on another endpoint in the same direction has been handled by the local host, the second interrupt is asserted only after first one has been cleared by the local host and DMAN_STAT is updated when the corresponding interrupt is asserted.
Register Map 13.2.14.2 DMA Receive Interrupt Source (DMAn_RX_IT_src) Only concerns non-isochronous endpoints. When the EPn_RX flag bit is set, the endpoint causing this flag to be set is encoded in these four register bits. When the EPn_RX flag bit is cleared, the four bits read as 0.
Register Map Table 13–16. Receive DMA Channels Configuration Register (RXDMA_CFG) Name Description 15–12 – Reserved 11–8 RXDMA2_EP Receive endpoint number for DMA channel 2 7–4 RXDMA1_EP Receive endpoint number for DMA channel 1 3–0 RXDMA0_EP Receive endpoint number for DMA channel 0 13.2.15.1 Receive Endpoint Number for DMA Channel 2 (RXDMA2_EP) The endpoint number binary-encoded in these four bits is the current receive endpoint selected for DMA channel 2.
Register Map 13.2.15.3 Receive Endpoint Number for DMA Channel 0 (RXDMA0_EP) The endpoint number binary encoded in these four bits is the current receive endpoint selected for DMA channel 0. A zero value indicates that the DMA channel 0 is deactivated. Any other value automatically enables receive DMA transfer for the selected endpoint.
Page 858
Register Map 13.2.16.1 Transmit Endpoint Number for DMA Channel 2 (TXDMA2_EP) The endpoint number binary-encoded in these four bits is the current transmit endpoint selected for DMA channel 2. A zero value indicates that the DMA channel 2 is deactivated. Any other value automatically enables transmit DMA transfer for the selected endpoint.
Register Map 13.2.17 DMA FIFO Data Register (DATA_DMA) The DMA FIFO data register (DATA_DMA) is the entry point to write or to read data into/from an endpoint used in a DMA transfer through DMA channel 0, 1, or 2. Table 13–18. DMA FIFO Data Register (DATA_DMA) Name Description 15–0...
Register Map 13.2.18 Transmit DMA Control Registers (TXDMA0...TXDMA2) The read/write transmit DMA control registers (TXDMA...TXDMA2) control the operation of the transmit DMA channel n (n = 0, 1, 2). Table 13–19. Transmit DMA Control Registers (TXDMA...TXDMA2) Name Description TXn_EOT Transmit DMA channel n end of transfer TXn_Start Transmit DMA channel n start 13–10...
Page 861
Register Map 13.2.18.3 Transmit DMA Ch.n Transfer Size Counter (TXn_TSC) The binary-encoded value from 0 to 1023, which is written by the local host into this register, corresponds to the number of bytes or number of buffer transfers (function of TXn_EOT), which is transmitted by the transmit DMA channel n. When read, the register reflects the number of bytes/buffers the USB device has left to transmit.
Register Map 13.2.19 Receive DMA Control Registers (RXDMA...RXDMA2) These read/write receive DMA control registers enable monitoring of incoming OUT transactions during DMA transfer on channel n (n=0,1,2). Table 13–20. Receive DMA Control Registers (RXDMA0...RXDMA2) Name Description RXn_Stop Receive DMA channel n transfer stop 14–8 –...
Register Map Set the pointer value higher than 0xFF, because the memory size is 2K bytes. A pointer value equal to 0xFF corresponds to 2040 bytes: addressing upper bytes results in memory overlap (see Section 13.4, Device Initialization). 13.2.21 Receive Endpoint Configuration Registers (EP1_RX...EP15_RX) The read/write receive endpoint configuration registers (EP1_RX...EP15_RX) give the device configuration for non-control receive endpoint n (n: 115).
Register Map 13.2.21.2 Receive Endpoint n Double-Buffer (EPn_RX_Db) This bit is only for non-isochronous endpoints. For isochronous endpoints, which are always double-buffered, this bit is endpoint size MSB. This bit must be set by the local host to allow double buffering for receive non-isochronous endpoint n.
Page 866
Register Map 13.2.21.4 Receive Isochronous Endpoint n(EPn_RX_Iso) This field must be set if the receive endpoint n type is isochronous in the desired device configuration. If not set, the endpoint type is bulk or interrupt (the hardware does not distinguish bulk type from interrupt). 0: Receive endpoint n type is isochronous.
Register Map 13.2.22 Transmit Endpoint Configuration Registers (EP1_TX...EP15_TX) The read/write transmit endpoint configuration registers (EP1_TX... EP15_TX) configure the device for noncontrol transmit endpoint n (n: 115). The endpoint size fields must match the values sent by the local host to the USB host in response to the GET_CONFIGURATION_DESCRIPTOR during configuration phase.
Page 868
Register Map 13.2.22.3 Transmit Endpoint n Size (EPn_TX_Size) EPn_TX.[14] bit description only applies for isochronous endpoints. This field contains the endpoint n FIFO size value. Status flags (FIFO_Empty, FIFO_Full) and underrun condition are based on this value for all IN transac- tions to endpoint n (see Table 13–23, Endpoint n Size Values).
USB Transactions 13.3 USB Transactions There is an interrupt to the local host at the end of a USB transaction if the local host has actions to perform. Isochronous transactions are an exception, because isochronous interrupt information is available at start of frame inter- rupts.
USB Transactions Figure 13–3. Non-Isochronous, Non-Control OUT Endpoint Handshaking Conditions Successful data transfer from USB host. (Occurs because the endpoint’s STAT_FLG bits after STAT_FLG.FIFO_En bit was set when token was received.) interrupt Token Data EPx Rx Interrupt After interrupt, EP’s RX FIFO contains received data. STAT_FLG bits after No data accepted by DSP.
Page 871
USB Transactions 13.3.1.1 Non-Isochronous, Non-Control OUT Endpoint Handshaking Conditions The Set_FIFO_En bit provides the main control for the ability to allow success- ful OUT transaction data reception for the endpoint. If at the beginning of an OUT transaction to an endpoint the FIFO_En bit is 1, the USB module is al- lowed to accept the OUT transaction data to the RX FIFO and, when the trans- action completes, the USB module can return ACK to the USB host to indicate that the data was received correctly (this is the top case shown in Figure 13–3).
Page 872
USB Transactions Non-Acknowledged Transactions (NAK) The device can be configured via the Nak_En bit, either to inform the local host of a NAKed transaction or not. If the NAK_EN bit is cleared, no interrupt is asserted to the local host if an OUT transaction completes with a NAK hand- shake and the NAK bit not set.
Page 873
USB Transactions FIFO. If the EP_Halted has been set in response to a SET_FEATURE request sent by the USB host or if the bit is cleared (control transaction only), the local host has no action to perform and must clear the EP_Sel bit. This clears the STALL bit for this endpoint and allows the next transaction status to be written to the STAT_FLG register.
USB Transactions 13.3.2 Non-Isochronous IN (LH–>USB HOST) Transactions Non-isochronous IN transactions refer to USB transactions where data is moved from the local host to the USB host where the USB handshaking proto- cols are in effect and data transmission is guaranteed. These transactions are the IN transactions that occur on control, bulk, and interrupt endpoints.
USB Transactions Figure 13–4. Non-Isochronous IN Transaction Phases and Interrupts Successful data transfer to USB host (endpoint STAT_FLG.FIFO_En bit was set when token was received). STAT_FLG bits after interrupt IN Token Data Endpoint X TX interrupt After interrupt, endpoint TX FIFO is empty. No data transmitted by LH (endpoint STAT_FLG>FIFO_En bit was clear when STAT_FLG bits after token was received).
Page 876
USB Transactions 13.3.2.1 Non-Isochronous IN Endpoint Handshaking Per the USB spec for IN transactions, the USB host may only provide one of two handshakes to the USB function during the handshake phase: ACK or no handshake at all. The first indicates successful transfer (first case shown in Figure 13–4), and the second indicates that the host received a garbled data packet (last case shown in Figure 13–4).
Page 877
USB Transactions In response to the endpoint interrupt, the local host must read the EPN_STAT register to identify the endpoint causing the interrupt, then write a 1 to the inter- rupt bit to clear it. The local host must set EP_Num to the endpoint number, EP_Dir to 1 (to signal an IN endpoint), and EP_Sel to 1, then read the endpoint status.
USB Transactions Except for control endpoint 0, separate endpoint halt bits are defined for each direction; so for a given endpoint number, the TX can be halted when the RX is not. Packet Errors If an error (CRC, bit stuffing or PID check) occurs during the token packet of a USB IN transaction to a non-isochronous endpoint, the USB block ignores the transaction.
USB Transactions side of the USB module is allowed to write to the background RX FIFO, and the local host is allowed to read to the foreground RX FIFO. The designations foreground and background are swapped at each start of frame (SOF). Isochronous endpoint FIFOs in the background are always enabled to the USB, while the foreground FIFOs are enabled to the local host.
USB Transactions 13.3.3.2 Isochronous OUT Transaction Error Conditions If the local host fails to read all of the data in the isochronous OUT endpoint foreground FIFO by the time that the foreground and background FIFOs are switched (at the next SOF), the endpoint FIFO that is being switched to the background is flushed and the Data_Flush bit is asserted for the duration of the next frame.
USB Transactions Because the USB transaction for the isochronous endpoint can occur at any time during the 1-ms USB frame, the USB interface implements a double buff- ering of the endpoint transmit data FIFO. The endpoint includes two FIFOs, each of which is the length of the configured isochronous endpoint. At all times, one of the two FIFOs is foreground and the other is background.
USB Transactions 13.3.4.1 Isochronous IN Endpoint Handshaking Because isochronous endpoint transactions have no handshake packets, the STALL, the NAK, and the ACK bits for isochronous endpoints always return 0. Because there is no handshake, there is no endpoint-specific interrupt to the local host to report handshake results for isochronous endpoints.
USB Transactions Figure 13–7. Stages and Transaction Phases of Autodecoded Control Transfers Autodecode control write transfer–correct status (set address, clear/set device/interface feature). Setup Stage Status Stage Setup Status Completion Command Token Token Status Interrupt occurs/status flags are not updated. Autodecode control read transfers-–request error (due to wrong setup data).
USB Transactions Figure 13–8. Stages and Transaction Phases of Non-Autodecoded Control Transfers Non-autodecode control write transfers-–correct status Data Stage (Occurs 0 or more times, Setup Stage depending on the amount of data) Status Stage Setup Command Status Completion Command Token Token Data Token...
Page 885
USB Transactions Non-autodecoded control read and control write transfers are sets of transac- tions that occur on endpoint 0, have specific USB protocol meaning, and are not handled automatically by the core. The USB function block automatically provides an ACK handshake for the setup stage transaction, but the data and status stage transaction handshaking is accomplished using the normal RX and TX control bits that affect transaction handshaking.
Page 886
USB Transactions When a setup token is identified, the USB decode module must monitor the setup stage data packet, decode it, and determine if it is an autodecoded or a non-autodecoded transfer and a control read or a control write. If it is a valid non-autodecoded request, the setup FIFO is immediately cleared and control of the FIFO is immediately taken away from the local host (if the local host had control of the FIFO).
Page 887
USB Transactions 13.3.5.2 Autodecoded Control Read Transfers Autodecoded control reads include the standard device request to get the end- point and device status. These control read transfers access information that is kept in registers inside the USB module, so local host code is not involved in filling the read data into the TX FIFO.
Page 888
USB Transactions 13.3.5.3 Non-Autodecoded Control Write Transfers Non-autodecoded control write transfers include the set/clear endpoint feature, set configuration, set interface, set descriptor, and class- or vendor- specific control write transfers. Non-autodecoded control write transfers consist of two or three stages (setup, data (optional), and status). The setup stage of a valid non-autodecoded control write transfer consists of one SETUP transaction from USB host to USB device.
Page 889
USB Transactions Specific Local Host Required Actions If the device receives a valid set endpoint halt feature request, it must set the appropriate Set_Halt control bit. If the device receives a valid clear endpoint halt feature request, it must set the appropriate Reset_EP bit to clear halt condition, set FIFO flags, and reset data PID to DATA0 for the endpoint.
Page 890
USB Transactions Status stage handshaking is controlled by the endpoint 0’s FIFO_En and Stall_Cmd bits. Successful completion of a non-autodecoded control write transfer is indicated by the USB function module returning a zero-length data payload for the data phase of the status stage and an ACK handshake from the host for the handshake phase of the status stage.
Page 891
USB Transactions The data stage of a control read transfer consists of one or more IN transac- tions. Transaction handshaking and interrupt generation apply as for non- isochronous, non-control IN endpoints; the local host can cause NAK, STALL, or ACK signaling for the data stage transactions. At endpoint 0 TX general USB interrupts, local host code must move more data to the endpoint 0 FIFO until the last bytes of the requested data has been provided.
USB Transactions Successful completion of non-autodecoded control read transfers is indicated by the host sending an OUT token followed by an empty packet and the USB function module responding with ACK. If the data packet sent by the USB host during the status stage of a control read request is not empty, the OUT trans- action is accepted by the core, but OUT data is not put into the endpoint 0 RX FIFO.
Page 893
USB Transactions Table 13–25. Autodecoded Versus Non-Autodecoded Control Requests (Continued) Device Behavior if Request Recipient Status LH Required Action Device not Configured CLEAR/SET Device Autodecoded None The core handles the FEATURE (DS_Chg interrupt is asserted to request. the local host after any the R_WK_OK bit modification).
Page 894
USB Transactions Table 13–25. Autodecoded Versus Non-Autodecoded Control Requests (Continued) Device Behavior if Request Recipient Status LH Required Action Device not Configured SET_ Non-autode- The local host must stall the Command is passed to the DESCRIPTOR coded command (via the Stall_Cmd local host.
Page 895
USB Transactions Transactions on endpoints other than zero are ignored if the device is not configured (addressed state). If some endpoints are not used by the interface currently set, transactions on these endpoints are not ignored; the local host must set the Halt feature for the endpoint.
Device Initialization 13.4 Device Initialization To allow communication between the device and a USB host, the local host must configure the device by filling the configuration registers. For each endpoint, the local host must write to dedicated register: Endpoint size Whether or not double buffering is allowed for endpoint Endpoint type (isochronous or non-isochronous) Address of the pointer...
Device Initialization Figure 13–9. Example of RAM Organization Setup Data (8 bytes) EP0_ptr EP0_Size Endpoint0 Data EP1_RX_ptr EP1_RX_Size or 2*EP1_RX_Size (if Endpoint1 RX Data Double Buffering or ISO) EP2_RX_ptr EP2_RX_Size or 2*EP2_RS_Size (if Endpoint2 RX Data Double Buffering or ISO) EP3_RX_ptr EP15_RX_ptr EP15_RX_Size or...
Device Initialization Figure 13–10. Device Configuration Routine Enter Device Configuration Routine Configured endpoint values must match values returned in descriptors during the enumeration phase. Endpoint Configuration After a USB reset, all IRQ_EN registers except DS_Chg are cleared. They must be re- Fill IRQ_EN register with enabled.
Device Initialization Figure 13–11. Endpoint Configuration Routine Enter Endpoint Configuration Routine Set Ptr_flag to 8 Fill EP0 register with – EP0_Size – EP0_ptr=Ptr_flag Ptr_flag = Ptr_flag + EP0_Size Fill EPn_RX register with: Another Any OUT Ptr_flag = – EPn_RX_Valid = 1 Endpoint n is OUT endpoint endpoint to...
Preparing for Transfers 13.5 Preparing for Transfers To avoid NAK handshakes for the first transaction on an endpoint, the local host must prepare the endpoint FIFO for receiving or transferring data. After the first transaction, the FIFO is enabled during the interrupt handling. For receive endpoints, this phase consists of enabling the FIFO to receive data from the USB host.
Preparing for Transfers Figure 13–12. Prepare for USB RX Transfer Routine This enables both Prepare for USB FIFOs if double-buffering RX transfers Note: This applies to all non- is used. routine ISO endpoints, with or without DMA. Write EP_NUM register: –...
Preparing for Transfers Figure 13–13. Prepare for TX Transfer on Endpoint n Routine Prepare for USB TX Transfer on Endpoint n routine This does not apply to TX endpoints using DMA, which are enabled when TXDMAn.Start is set by the LH. Write EP_NUM register: –...
Interrupt Service Routine (ISR) Flowcharts 13.6 Interrupt Service Routine (ISR) Flowcharts The flowcharts in this section give general operational guidelines for USB ISR processing. System-architecture-specific details are left to the engineers who write the local host and USB host code. One USB-specific interrupt register is provided (IRQ_SRC) to keep track of the interrupts to handle.
Interrupt Service Routine (ISR) Flowcharts an ACKed transaction. If double buffering is used for an endpoint, the status flag register is updated if there is zero or one interrupt pending for the endpoint and is not updated if there are already two interrupts pending on the endpoint. The local host does not need to set the Nak_En bit during normal operation.
Interrupt Service Routine (ISR) Flowcharts Figure 13–14. General USB Interrupt ISR Source Parsing Flowchart Enter General USB The interrupt must be cleared within the device state changed handler. USB Device State Changed Handler IRQ_SRC.Chg EP0 RX IRQ_SRC. IRQ_SRC.EP0_RX EP0_RX = 1 Handler to clear the IT.
Interrupt Service Routine (ISR) Flowcharts Figure 13–15. Setup Interrupt Handler Setup stage handler Application-specific Clear control action to cancel any flags. ongoing transfer Parse command wlength_count = wlenght Is the request SYSCON2.Stall_Cm legal and d to 1 to stall next supported? EP0 transaction.
Interrupt Service Routine (ISR) Flowcharts 13.6.4 Endpoint 0 RX Interrupt Handler The endpoint 0 RX portion of the general USB interrupt handler, shown in Figure 13–17, must handle general USB interrupts related to control OUT transactions on endpoint 0. Notice that no EP0 interrupt is generated for autodecoded control transfers.
Interrupt Service Routine (ISR) Flowcharts Figure 13–18. Prepare for Control Write Status Stage Routine Prepare for control This actions include: write stage status Reset-relevant endpoints if request is clear routine endpoint feature, set config, or set interface. Set halt for relevant endpoints if request is set endpoint feature, set config, or set interface.
Interrupt Service Routine (ISR) Flowcharts Figure 13–20. Prepare for Control Read Status Stage Routine Prepare for control read status stage routine Application- specific actions to determine control read action and status result Write EP_NUM register: Set CTRL.Clr_EP to – EP_NUM.EP_Num = 0 Want to respond 1, then set –...
Interrupt Service Routine (ISR) Flowcharts 13.6.6 Device States Changed Handler This section describes how USB device states and transitions states are decoded by the USB function and how they can be handled. The state machine (see Figure 13–21) moves the USB function device from one state to another state with respect to USB1.1 specification.
Interrupt Service Routine (ISR) Flowcharts Figure 13–21. USB Function Device State Transitions ATTACHED USB RESET ‡ SET_ADDRESS 0 USB RESET ‡ SET_CONFIGURATION Remote wake α † up enabled DEFAULT SET_ADDRESS 0 SUSPEND USB RESET SET_ADDRESS < > 0 ‡ Remote wake up enabled SET_ADDRESS <...
Interrupt Service Routine (ISR) Flowcharts Figure 13–22. Typical Operation for USB Device State Changed Interrupt Handler Device state changed handler Read DEVSTAT register (new value), read DS_mem (previous value). Attached/ DEVSTAT. umattached ATT changed? Device state must be handler at least attached at this point.
Interrupt Service Routine (ISR) Flowcharts 13.6.7 Device States Attached/Unattached Handler The device attached/unattached interrupt (Figure 13–23) occurs either when the device etects it is connected to the USB host or Hub (VBUS is on) or when it becomes disconnected (VBUS is off). The local host can use this interrupt to put the evice into deep sleep or to initialize any application-specific informa- tion relating to the USB device.
Interrupt Service Routine (ISR) Flowcharts 13.6.8 USB Reset Interrupt Handler When a USB reset occurs, the USB module generates a general USB interrupt to the local host (see Figure 13–24 and Figure 13–25). The local host responds to this interrupt by performing the following operations: Cancels any ongoing USB transaction and/or control transfer handling Clears any copies that the application has of configuration number or of alternate interface numbers...
Interrupt Service Routine (ISR) Flowcharts Figure 13–24. USB Reset Handler Flowchart I USB reset handler Inform application that the USB DEVSTAT. USB_Reset reset has completed = 1? and that device is in default state. Clear endpoint’s transaction and control transfer flags. Application- Application- specific actions...
Interrupt Service Routine (ISR) Flowcharts Figure 13–25. USB Reset Handler Flowchart II USB reset handler Inform application that the USB DEVSTAT. USB_Reset reset has completed = 1 ? and that device is in default state. Clear endpoint transaction and control transfer flags. Application- Application- specific actions...
Interrupt Service Routine (ISR) Flowcharts Figure 13–26. Typical Operation for USB Suspend/Resume General USB Interrupt Handler Suspend/resume handler Inform Set IRQ_SRC.DS application that DEVSTAT.SUS _Chg = 1 device is = 1? entering to clear the IT. suspend. Read DEVSTAT.R_Wk_ Inform OK value.
Interrupt Service Routine (ISR) Flowcharts 13.6.11 Non-Isochronous, Non-Control OUT Endpoint Receive Interrupt Handler Figure 13–28 shows the operations necessary to handle non-isochronous, non-control OUT endpoint-specific receive interrupts. This flowchart shows two different RX transaction handshaking interrupts. There is a third interrupt handshaking possibility when NAK interrupts are enabled, which is not depicted here.
Interrupt Service Routine (ISR) Flowcharts Figure 13–29. Read Non-Isochronous RX FIFO Data Flowchart Read non-ISO RX FIFO data STAT_FLG. Set FIFO not full and DB EPn_RX.EPn_RX_ non_ISO FIFO to 1. Size or DB _Empty = 1? = 1? STAT_FLG. Read received bytes EPn_RX.EPn_RX_ Non_ISO_FIFO count in...
Interrupt Service Routine (ISR) Flowcharts Figure 13–30. Non-Isochronous Non-control Endpoint Transmit Interrupt Handler TX data that was previously placed in the endpoint’s TX FIFO remains in the application’s buffer until that data is properly Non-ISO TX handler sent to the USB host and receives an ACK. Caution: If double-buffer is used, the local host must retire (NAK disabled from its buffer the first packet that was written into TX FIFO.
Interrupt Service Routine (ISR) Flowcharts Figure 13–31. Write Non-Isochronous TX FIFO Data Flowchart Write non-ISO TX FIFO data The loop count must be set to 0 for sending an empty data packet. Set loop count to # bytes in application’s TX buffer.
Interrupt Service Routine (ISR) Flowcharts Figure 13–32. SOF Interrupt Handler Flowchart SOF ISR entry Application- specific SOF timing handling Write EP_NUM register: Any ISO RX – EP_NUM.EP_Num = n endpoint ISO RX – EP_NUM.EP_Dir = 0 configured? Handler – EP_NUM.EP_Sel = 1 (EPn) –...
Interrupt Service Routine (ISR) Flowcharts Figure 13–33. Read Isochronous RX FIFO Data Flowchart ISO RX handler Application- specific actions STAT_FLG. to handle case Data_Flush for data flush Application- specific actions STAT_FLG. to handle ISO_Error unrecovered ISO packet Application- specific actions to handle STAT_FLG.
Interrupt Service Routine (ISR) Flowcharts Figure 13–34. Write Isochronous TX FIFO Data Flowchart ISO TX handler When a Missed_in occurs, missed data are from TWO frames previous). Application- specific actions to handle Wish to resend CTRL.Cir_EP to STAT_FLG. missed data? missed in data Miss_In clear the current...
Interrupt Service Routine (ISR) Flowcharts 13.6.14 Summary of USB-Related Interrupts Table 13–26. USB Interrupt Type by Endpoint Type General USB IRQs EP-Specific IRQs Control Control Bulk or Bulk or (EP0) (EP0) Interrupt Interrupt Setup (Isochronous) (EP0) Other Interrupt Type √ √...
DMA Operation 13.7 DMA Operation The USB function module provides support for six DMA channels. Three receive DMA channels are reserved for OUT transfers (isochronous or non- isochronous) and three transmit DMA channels are reserved for IN transfers (isochronous or non-isochronous). It is not possible to operate DMA trans- actions on control EP0.
DMA Operation After an end of transfer interrupt, the local host must set the Set_FIFO_ En for the endpoint to reenable the channel. The local host must not initiate a new RX DMA transfer until it receives an end-of-transfer interrupt. Transactions count interrupt (the RXn_Cnt) This interrupt performs watermark control.
DMA Operation Figure 13–36. Non-Isochronous RX DMA Start Routine Endpoints assigned to a DMA Non-ISO RXDMA[0, 1, 2] channel must have been configured start routine during endpoint configuration phase. Assign non-ISO endpoint −−> EP number number to DMA channel n. RXDMA_CFG.
DMA Operation Figure 13–37. Non-Isochronous RX DMA EOT Interrupt Handler Non-ISO RX DMA EOT handler Read endpoint number in DMAN_STAT. DMAn_RX_IT_src register. Read DMAN_STAT. DMAn_RX_SB register to be informed of an odd number of bytes for last transaction. Inform the application that the RX DMA transfer on channel n is completed.
DMA Operation Figure 13–38. Non-Isochronous RX DMA Transaction Count Interrupt Handler Non-ISO RX DMA count handler Read channel number n in DMAN_STAT. DMAn_RX_IT_src register. Inform the application that the RX DMA transfer on channel n has sent RXDMAn.RXn_TC transaction count without detecting an EOT.
DMA Operation 13.7.3 Isochronous OUT (USB HOST −> LH) DMA Transactions During isochronous transfers to a DMA-operated OUT endpoint, a request to the local host DMA controller is generated every 1-ms frame when an isochro- nous data packet is received with no error. There is no interrupt associated with DMA transfer to isochronous OUT endpoints.
DMA Operation 13.7.4 Transmit DMA Channels Overview Transmit DMA channels are programmed via the three TXDMA control regis- ters. Each channel can be assigned to a given endpoint number by assigning a nonzero value in TXDMAn_EP (a 0 value means the DMA channel is deselected).
DMA Operation The size of the file to transfer (FTZ) can be assimilated conceptually as a concatenation of three arguments as shown in Figure 13–41. Figure 13–41. File Transfer Size FTZ (File transfer size) XSWL EOTB XSWL (Extra software FBT (Full buffer EOTB (End of transfer Loop –...
DMA Operation Figure 13–42. Non-Isochronous TX DMA DMA Start Routine Non-ISO TXDMA[0, 1, 2] start routine Assign non-ISO endpoint number to DMA channel n. EP number −−> TXDMA_CFG. TXDMAn_EP. LH DMA write access must point to TXDCHn.TXDATn in response to DMA Application-specific channel n request.
DMA Operation Figure 13–43. Non-Isochronous TX DMA Done Interrupt Handler Non-ISO TX DMA done handler Read the endpoint umber n in DMAN_STAT. DMAn_TX_IT_src register. IRQ_SRC.TXn_Done = 1 to clear the IT. Inform the application that EOTn = 1? the TX DMA transfer is completed.
DMA Operation 13.7.6 Isochronous IN (USB HOST −> LH) DMA Transactions For isochronous endpoints (Figure 13–44), the transfer size counter (TXn_TSC) corresponds to the number of bytes to transmit. The programmed size must not exceed the programmed buffer size of the endpoint; otherwise the results are unpredictable.
DMA Operation Figure 13–44. Isochronous TX DMA Start Routine ISO TXDMA[0,1, 2] start routine Assign ISO endpoint number to DMA channel n. EP number −−> TXDMA_CFG. TXDMAn_EP LH DMA write access must point to TXDCHn.TXDATn in response to DMA Application-specific channel n request.
DMA Operation 13.7.8 Note on DMA Channel Deconfiguration It is recommended that the local host wait for an EOT (RX) or a done (TX) in- terrupt before disabling the channel by writing a value 0 in TX/RXDMA_CFG register. However, if needed by the application, the local host can deselect the endpoint number in the TX/RXDMA_CFG register during a DMA transfer.
Power Management 13.8 Power Management The flowchart in Figure 13–45 shows the values assigned to USB function signals concerned with power management in the functioning of the device state. These signals are: PUEN_O Pullup enable signal, which always reflects the Pullup_En register bit. SHUTOFF_O Power circuitry shutoff signal, controlled by the core and the SOFF_Dis bit.
Power Management Figure 13–45. Power Management Signal Values Device not powered not attached to USB Power on USB cable inserted PUEN_O = 0 SUSPEND_O = 1 No power † SHUTOFF_O = 1 DS_WAKE_REQ_ON = 1 LH sets SYSCON1. Pullup_En. USB cable inserted PUEN_O = 1 PUEN_O = 0 SUSPEND_O = 1...
Chapter 14 Universal Serial Bus Host This chapter describes the universal serial bus (USB) host of the OMAP5910 multimedia processor. Topic Page 14.1 USB Host Controller ......... .
Interface Specification for USB, Release 1.0a, available through the Com- paq Computer Corporation web site, and hereafter called the OHCI Specifica- tion for USB. It is assumed that users of the OMAP5910 USB host controller are already familiar with the USB Specification and OHCI Specification for USB.
USB Host Controller OMAP5910 pins associated with the integrated USB transceiver are only available for use by the OMAP5910 USB host controller or OMAP5910 USB function controller and are not shared with any other peripherals. Figure 14–1 shows the OMAP5910 device with the USB host controller high- lighted.
USB Host Controller Figure 14–2. OMAP5910 USB Host Controller MPU public peripheral bus Peripheral UART 1 function controller INTH2 Peripheral protection Peripheral MPU Public peripheral interface Local Bus interface Local bus MPU’s controller Memory LB’s USB Host Controller controller Signals to/from other...
USB host controller interfaces to system software. This specification, in conjunction with the Universal Serial Bus Specification Version 1.1, define most of the USB functionality that the OMAP5910 USB host controller provides. The OHCI Specification for USB focuses on two main aspects of the hardware implementation of a USB host controller: its register set and the memory data structures that define the activity to appear on the USB bus.
Page 951
USB Open Host Controller Interface Functionality 14.2.2.2 Overcurrent Protection Input Pins Not Supported The OMAP5910 device does not provide any pins that allow the USB host con- troller OHCI RhPortStatus(n) overcurrent protection status bits to be directly controlled by external hardware.
EDs. If any of these pointers are NULL when the corresponding list enable bit is set, the OMAP5910 USB host control- ler attempts to access using the local bus virtual address of 0, which causes an unrecoverable error.
¶ This register provides control and status for the OMAP5910 pins associated with USB port 1 for some HMC_MODE values. # This register provides control and status for the OMAP5910 pins associated with USB port 2 for some HMC_MODE values.
Page 954
¶ This register provides control and status for the OMAP5910 pins associated with USB port 1 for some HMC_MODE values. # This register provides control and status for the OMAP5910 pins associated with USB port 2 for some HMC_MODE values.
Reserved Reserved Remote wake-up enable. This bit has no effect in OMAP5910. The OMAP5910 USB host controller does not provide a processor wake-up mechanism. Remote wake up connected. This bit has no effect in OMAP5910. The OMAP5910 USB host controller does not provide a processor wake-up mechanism.
Page 956
USB Host Controller Registers Table 14–3. HC Operating Mode Register (HcControl) (Continued) Reset Name Value Description Type Value 7–6 HCFS Host controller functional state: USBReset USBResume USBOperational USBSuspend A transition to USBOperational causes SOF generation to begin in 1 ms. The USB host controller may automatically transition from USBSuspend to USBResume if a downstream resume is received.
Page 957
USB Host Controller Registers Table 14–3. HC Operating Mode Register (HcControl) (Continued) Reset Name Value Description Type Value Isochronous enable Enables processing of isochronous EDs. Isochronous EDs are not processed. The USB host controller checks this bit every time it finds an isochronous ED in the periodic list.
Ownership change request This bit is set by the host controller driver to gain ownership of the host controller. OMAP5910 does not support SMI interrupts, so no ownership change interrupt occurs. Bulk list filled The host controller driver must set this bit if it modifies the bulk list to include new TDs.
Reset Name Description Type Value Reserved Reserved Ownership change The OMAP5910 USB host controller does not implement ownership change interrupts. 29 –7 Reserved Reserved RHSC Root hub status change When 1 indicates a root hub status change has occurred. Write of 0 has no effect.
Write of 0 has no effect. Write of 1 clears this bit. The HC interrupt enable register enables various OHCI interrupt sources to generate interrupts to the OMAP5910 level 2 interrupt handler. Table 14–6. HC Interrupt Enable Register (HcInterruptEnable) Reset...
Page 961
RHSC Root hub status change When 1 and MIE is 1, allows root hub status change interrupts to propagate to the OMAP5910 level 2 interrupt controller. When 0, or when MIE is 0, root hub status change interrupts do not propagate.
Page 962
A write of 1 sets this bit. Scheduling overrun When 1 and MIE is 1, allows scheduling overrun interrupts to propagate to the OMAP5910 level 2 interrupt controller. When 0, or when MIE is 0, scheduling overrun interrupts do not propagate.
Value Master interrupt enable Read always returns 0. Write of 0 has no effect. Write of 1 clears the HcInterruptEnable MIE bit. Ownership change This bit has no effect on OMAP5910. 29–7 Reserved Reserved RHSC Root hub status change Read always returns 0.
USB Host Controller Registers Table 14–7. HC Interrupt Disable Register (HcInterruptDisable) (Continued) Reset Name Description Type Value Write done head Read always returns 0. Write of 0 has no effect. Write of 1 clears the HcInterruptEnable WDH bit. Scheduling overrun Read always returns 0.
USB Host Controller Registers The HC head control register defines the local bus virtual address of the head ED of the control ED list. Table 14–10. HC Head Control Register (HcControlHeadED) Reset Name Description Type Value 31–4 CHED Local bus virtual address of head ED on the control ED list This field represents bits 31:4 of the local bus virtual address of the head ED on the control ED list.
USB Host Controller Registers The HC head bulk register defines the local bus virtual address of the head ED on the bulk ED list. Table 14–12. HC Head Bulk Register (HcBulkHeadED) Reset Name Description Type Value 31–4 BHED Local bus virtual address of head ED on the bulk ED list This field represents bits 31:4 of the local bus virtual address of the head ED on the bulk ED list.
USB Host Controller Registers The HC head done register defines the local bus virtual address of the current head of the done TD queue. Table 14–14. HC Head Done Register (HcDoneHead) Reset Name Description Type Value 31–4 Local bus virtual address of the last TD that was added to 0x0000000 the done queue.
USB Host Controller Registers The HC frame remaining register reports the number of full speed bit times remaining in the current frame. Table 14–16. HC Frame Remaining Register (HcFmRemaining) Reset Name Description Type Value Frame remaining toggle This bit is loaded with the frame interval toggle bit every time the USB host controller loads the frame interval field into the frame remaining field.
USB Host Controller Registers The HC periodic start register defines the position within the USB frame where EDs on the periodic list have priority over EDs on the bulk and control lists. Table 14–18. HC Periodic Start Register (HcPeriodicStart) Reset Name Description Type...
USB host controller driver is initialized. Because OMAP5910 does not provide a direct control from the USB host controller to switch VBUS on and off, this value must take into account any delays caused by other methods of controlling VBUS externally.
Page 971
The USB signal multiplexing mode and OMAP5910 top-level pin multiplexing features may place the OMAP5910 device in a mode where 0, 1, 2, or 3 of the USB host controller downstream ports are actually usable. This register reports three regardless of USB signal multiplexing mode and OMAP5910 top-level pin multiplexing mode.
PPCM bit 3 is the port power control mask for downstream port 3. PPCM bits 4 through 15 are reserved. OMAP5910 does not provide connections from the USB host controller to pins to provide external port power switching. Systems that implement port power switching must use other mechanisms to control port power.
USB Host Controller Registers The HC root hub status register reports the USB host controller root hub status. Table 14–22. HC Root Hub Status Register (HcRhStatus) Reset Name Description Type Value CRWE Clear remote wake-up enable Write of 0 has no effect. Write of 1 clears the device remote wake-up enable bit.
Page 974
(power switching mode = 1), a write of 1 turns off power to those ports whose corresponding PortPowerControlMask bit is 0. Because OMAP5910 does not provide signals from the USB host controller to external VBUS switching circuitry, this bit has no effect.
The HC port 1 status and control register reports and controls the state of USB host port 1. HcRhPortStatus1 can provide status and control for the OMAP5910 USB port associated with the OMAP5910 integrated USB trans- ceiver according to the HMC_MODE value. See Section 14.5, USB Pin Multiplexing.
Page 976
This bit indicates, when read as 1, that the port 1 power is enabled. When read as 0, port 1 power is not enabled. The OMAP5910 does not provide signals from the USB host controller to control external port power, so, if required, USB host port power control signals must be controlled through other means.
Page 977
When read as 1, indicates a port 1 port overcurrent condition has occurred. When 0, no port 1 port overcurrent condition has occurred. OMAP5910 does not provide inputs for signaling external overcurrent indication to the USB host controller. Overcurrent monitoring, if required, must be handled through some other mechanism.
Page 978
USB Host Controller Registers Table 14–23. HC Port 1 Status and Control Register (HcRhPortStatus1) (Continued) Reset Name Description Type Value PES/SPE Port 1 port enable status/set port enable When read as 1, indicates that port 1 is enabled. When read as 0, this bit indicates that port 1 is not enabled.
USB Host Controller Registers The HC port 2 status register reports and controls the state of USB host port 2. Depending on HMC_MODE value, HcRhPortStatus2 can provide status and control for the OMAP5910 USB Port 1 pins: CLK32K_OUT/USB1.SPEED BOOT/USB1.SUSP RST_HOST_OUT/USB1_SE0 MCBSP.CLK/USB1_TXEN...
Page 980
This bit indicates, when read as 1, that the port 2 power is enabled. When read as 0, port 2 power is not enabled. The OMAP5910 does not provide signals from the USB host controller to control external port power, so, if required, USB host port power control signals must be controlled through other means.
Page 981
When read as 1, indicates that a port 2 port overcurrent condition has occurred. When 0, no port 2 port overcurrent condition has occurred. The OMAP5910 does not provide inputs for signaling external overcurrent indication to the USB host controller. Overcurrent monitoring, if required, must be handled through some other mechanism.
Page 982
USB Host Controller Registers Table 14–24. HC Port 2 Status and Control Register (HcRhPortStatus2) (Continued) Reset Name Description Type Value PES/SPE Port 2 port enable status/set port enable When read as 1, indicates that port 2 is enabled. When read as 0, this bit indicates that port 2 is not enabled.
USB Host Controller Registers The HC port 3 status and control register reports and controls the state of USB host port 3. Depending on HMC_MODE value, HcRhPortStatus2 can provide status and control for the OMAP5910 USB port 2 pins: MCSI2.CLK/USB2_SUSP UART2.RTS/USB2_SE0 MCSI2.DOUT/USB2.TXEN...
Page 984
This bit indicates, when read as 1, that the port 3 power is enabled. When read as 0, port 3 power is not enabled. The OMAP5910 does not provide signals from the USB host controller to control external port power, so, if required, USB host port power control signals must be controlled through other means.
Page 985
When read as 1, indicates that a port 3 port overcurrent condition has occurred. When 0, no port 3 port overcurrent condition has occurred. The OMAP5910 does not provide inputs for signaling external overcurrent indication to the USB host controller. Overcurrent monitoring, if required, must be handled through some other mechanism.
Page 986
USB Host Controller Registers Table 14–25. HC Port 3 Status and Control Register (HcRhPortStatus3) (Continued) Reset Name Description Type Value PES/SPE Port 3 port enable status/set port enable When read as 1, indicates that port 3 is enabled. When read as 0, this bit indicates that port 3 is not enabled.
USB Host Controller Registers The host UE address register reports the local bus virtual address of the last local bus access which caused an unrecoverable error (UE). This register has no meaning until an unrecoverable error has occurred. It also has no meaning if the USB host controller issues an unrecoverable error because the offset checking fault occurred while processing an isochronous TD.
USB Host Controller Registers The host UE status register reports the local bus cycle type for the last unre- coverable error that occurred. This register has no meaning until an unrecov- erable error has occurred. It also has no meaning if the USB host controller issues an unrecoverable error because the offset checking fault occurred while processing an isochronous TD.
This bit has no effect on MPU, DSP, or DMA controller accesses to local bus slave peripherals. The host revision register returns the revision number for the OMAP5910 USB host controller. This register is not defined by the OHCI specification.
14.3.2 Endianism and USB Host Controller Registers The OMAP5910 USB host controller assumes that all MPU accesses to its reg- isters are 32-bit accesses. This restriction means that the host controller driver software may operate in either big-endian or little-endian without having to per- form endian conversion on USB host controller register accesses.
14.4 USB Host Controller Interrupt Sources 14.4.1 OHCI Interrupts The OMAP5910 USB host controller provides an interrupt output to the MPU level 2 interrupt handler on its IRQ_06 interrupt input. This is a level-sensitive interrupt signal, and the MPU level 2 interrupt handler IRQ_06 must be programmed as a level-sensitive input.
OHCI Root Hub Status Change The OHCI root hub status change interrupt is supported as described in the OHCI Specification for USB. The OMAP5910 does not provide a connection between the USB host controller and USB port overcurrent detection hard- ware, so the root hub status change interrupt does not occur due to a port over- current event.
USB Pin Multiplexing 14.5 USB Pin Multiplexing OMAP5910 USB signal multiplexing provides five main types of signaling: USB host and USB function with USB transceivers, USB host and USB func- tion without USB transceivers, and UART1. This section describes first gener-...
USB host controller or with USB transceivers that use TXD+ and TXD– signaling. Because OMAP5910 does not provide a pin that connects to the USB host controller port power control registers, some other mechanism must be used if VBUS switching is required.
USB function controller are removed. The transceiverless link logic signaling system is not suitable for use across a cable. It is intended only for use when the OMAP5910 device is used with an external USB integrated circuit which is on the same board.
OMAP5910 transceiverless link logic. Figure 14–6 shows OMAP5910 used as a USB function controller, with the top portion of the diagram showing a transceiver-based solution and the bottom portion showing a transceiverless solution using the OMAP5910 transceiverless link logic.
14.5.4 USB Signal Multiplexing Mode Diagrams The OMAP5910 USB signal multiplexing mechanisms provide a wide variety of options for bringing USB functionality to the OMAP5910 pins. These options are listed in Table 14–30 and are shown in Figure 14–7 through Figure 14–31.
† CONF_MOD_USB_HOST_HMC_MODE_R values that select UART 1 bring UART1 CTS, RX, and TX signals to pins that can, in other CONF_MOD_USB_HOST_HMC_MODE_R values, be used for USB. ‡ CONF_MOD_USB_HOST_HMC_MODE_R 7 provides an internal signal path from six of the USB-related OMAP5910 input pins to six of the USB-related OMAP5910 output pins.
Page 999
† CONF_MOD_USB_HOST_HMC_MODE_R values that select UART 1 bring UART1 CTS, RX, and TX signals to pins that can, in other CONF_MOD_USB_HOST_HMC_MODE_R values, be used for USB. ‡ CONF_MOD_USB_HOST_HMC_MODE_R 7 provides an internal signal path from six of the USB-related OMAP5910 input pins to six of the USB-related OMAP5910 output pins.
USB Pin Multiplexing Figure 14–7. OMAP5910 With CONF_MOD_USB_HOST_HMC_MODE_R Set to 0 Level GPIO00/ USB.VBUS * translator USB host USB singal USB.PUEN controller multiplexing Host port 1 Transient USB0.DP USB0.DM suppressor transceiver Host port 2 CLK3 2K _OUT ** /USB1.SPEED Host port 3 MPU_BOOT** /USB1.SUSP...