Preface Introduction Purpose of the Peripheral Features Features Not Supported Functional Block Diagram Supported Use Case Examples Industry Standard(s) Compliance Statement Peripheral Architecture Clock Control Signal Descriptions Indexed and Non-Indexed Registers USB PHY Initialization Dynamic FIFO Sizing USB Controller Host and Peripheral Modes Operation USB Controller Peripheral Mode Operation USB Controller Host Mode Operation DMA Operation...
Page 4
4.17 Transmit CPPI Masked Status Register (TCPPIMSKSR) 4.18 Transmit CPPI Raw Status Register (TCPPIRAWSR) 4.19 Transmit CPPI Interrupt Enable Set Register (TCPPIIENSETR) 4.20 Transmit CPPI Interrupt Enable Clear Register (TCPPIIENCLRR) 4.21 Receive CPPI Control Register (RCPPICR) 4.22 Receive CPPI Masked Status Register (RCPPIMSKSR) 4.23 Receive CPPI Raw Status Register (RCPPIRAWSR) 4.24...
Page 6
Functional Block Diagram Interrupt Service Routine Flow Chart CPU Actions at Transfer Phases Sequence of Transfer Service Endpoint 0 Flow Chart IDLE Mode Flow Chart TX Mode Flow Chart RX Mode Flow Chart Setup Phase of a Control Transaction Flow Chart IN Data Phase Flow Chart OUT Data Phase Flow Chart Completion of SETUP or OUT Data Phase Flow Chart...
Page 7
www.ti.com Receive CPPI DMA State Word 1 (RCPPIDMASTATEW1) Receive CPPI DMA State Word 2 (RCPPIDMASTATEW2) Receive CPPI DMA State Word 3 (RCPPIDMASTATEW3) Receive CPPI DMA State Word 4 (RCPPIDMASTATEW4) Receive CPPI DMA State Word 5 (RCPPIDMASTATEW5) Receive CPPI DMA State Word 6 (RCPPIDMASTATEW6) Receive CPPI Completion Pointer (RCPPICOMPPTR) Function Address Register (FADDR) Power Management Register (POWER)
Page 8
USB Pins PERI_TXCSR Register Bit Configuration for Bulk IN Transactions PERI_RXCSR Register Bit Configuration for Bulk OUT Transactions PERI_TXCSR Register Bit Configuration for Isochronous IN Transactions PERI_RXCSR Register Bit Configuration for Isochronous OUT Transactions Transmit Buffer Descriptor Word 0 Transmit Buffer Descriptor Word 1 Transmit Buffer Descriptor Word 2 Transmit Buffer Descriptor Word 3 Receive Buffer Descriptor Word 0...
Page 9
www.ti.com Transmit CPPI DMA State Word 4 (TCPPIDMASTATEW4) Field Descriptions Transmit CPPI DMA State Word 5 (TCPPIDMASTATEW5) Field Descriptions Transmit CPPI Completion Pointer (TCPPICOMPPTR) Field Descriptions Receive CPPI DMA State Word 0 (RCPPIDMASTATEW0) Field Descriptions Receive CPPI DMA State Word 1 (RCPPIDMASTATEW1) Field Descriptions Receive CPPI DMA State Word 2 (RCPPIDMASTATEW2) Field Descriptions Receive CPPI DMA State Word 3 (RCPPIDMASTATEW3) Field Descriptions Receive CPPI DMA State Word 4 (RCPPIDMASTATEW4) Field Descriptions...
Page 10
Transmit Hub Port (TXHUBPORT) Field Descriptions Receive Function Address (RXFUNCADDR) Field Descriptions Receive Hub Address (RXHUBADDR) Field Descriptions Receive Hub Port (RXHUBPORT) Field Descriptions Document Revision History List of Tables www.ti.com SPRUGH3 – November 2008 Submit Documentation Feedback...
About This Manual This document describes the universal serial bus (USB) controller in the TMS320DM357 Digital Media System-on-Chip (DMSoC). Notational Conventions This document uses the following conventions. Hexadecimal numbers are shown with the suffix h. For example, the following number is 40 hexadecimal (decimal 64): 40h.
Page 12
User's Guide. Describes the multimedia card (MMC)/secure digital (SD) card controller in the TMS320DM357 Digital Media System-on-Chip (DMSoC). The MMC/SD card is used in a number of applications to provide removable data storage. The MMC/SD controller provides an interface to external MMC and SD cards.
Page 13
SPRUG39 — TMS320DM357 DMSoC Video Processing Front End (VPFE) User's Guide. Describes the video processing front end (VPFE) in the TMS320DM357 Digital Media System-on-Chip (DMSoC) video processing subsystem. Included in the VPFE is the preview engine, CCD controller, resizer, histogram, and hardware 3A (H3A) statistic generator.
Introduction This document describes the universal serial bus (USB) controller in the TMS320DM357 Digital Media System-on-Chip (DMSoC). The controller supports high-speed USB peripheral mode and high-speed limited host-mode operations. The USB controller can be operated by ARM through the memory-mapped registers.
Introduction Supported Use Case Examples The USB supports the following user cases: Detailed information about the architecture and operation of the USB controller follows in Programming examples are also provided for each of the operational modes of the controller. User Case 1: An example of how to initialize the USB controller Example 1.
Page 17
www.ti.com User Case 2: An example of how to program the USB Endpoints in peripheral mode Example 2. Programming the USB Endpoints in Peripheral Mode // DMA channel number. Valid values are 0, 1, 2, or 3. int CHAN_NUM = 0; // Fifo sizes: uncomment the desired size.
Page 18
Introduction User Case 3: An example of how to program the USB endpoints in host mode Example 3. Programming the USB Endpoints in Host Mode // DMA channel number. Valid values are 0, 1, 2, or 3. int CHAN_NUM = 0; // Fifo sizes: uncomment the desired size.
Page 19
www.ti.com Example 3. Programming the USB Endpoints in Host Mode (continued) usbRegs->TXFIFOSZ = fifosize | ((double_buffer & 1)<<4); usbRegs->TXFIFOADDR = fifo_start_address + (1<<(fifosize+double_buffer)); usbRegs->RXMAXP = FIFO_MAXP; usbRegs->TXMAXP = FIFO_MAXP; //Configure the endpoint switch (device_speed) { case LOW_SPEED : type = (3<<6) | ((device_protocol & 3) << 4) | (device_ep & 0xf); break; case FULL_SPEED: type = (2<<6) | ((device_protocol &...
Page 20
Introduction User Case 4: An example of how to do host negotiation to support USB If the HOSTREQ bit in the DEVCTL register is set, host negotiation is performed by the hardware when the device enters suspend mode. The bit is cleared when host negotiation is complete. User Case 5: An example of how to program the USB DMA controller Example 4.
Page 21
www.ti.com Example 4. Programming the USB DMA Controller (continued) usbRegs->CHANNEL[i].RCPPIDMASTATEW6 = 0; tx_desc[i] = 0; rx_desc[i] = 0; // Routine to flush TX fifo. // Must call this routine twice for double-buffered FIFO void flush_tx_fifo(int ep) { int index_save; int status; index_save = usbRegs->INDEX;...
Introduction Example 4. Programming the USB DMA Controller (continued) // Increment descriptor counter tx_desc[ch]++; // Routine to start the RX DMA for a given channel void start_rx_dma(int ch) { int index_save; index_save = usbRegs->INDEX; // Must have at least 3 descriptors to receive anything if (rx_desc[ch] <...
www.ti.com Peripheral Architecture Clock Control Information related to clock generation and control for the USB peripheral will be added in a future revision of this document. Clocks for USB are generated based on a crystal oscillator on the M24XI and M24XO pins.
USB Controller Host and Peripheral Modes Operation USB PHY Initialization The following bits in USBPHY_CTL must be cleared to enable the USB controller: OSCPDWN and PHYPDWN. The following bits in USBPHY_CTL must be set to enable the level comparators: VBDTCTEN and VBUSENS.
USB Controller Host and Peripheral Modes Operation USB Controller Peripheral Mode Operation Soft connect - After a reset, the SOFTCONN bit of POWER register (bit 6) is cleared to 0. The controller will therefore appear disconnected until the software has set the SOFTCONN bit to 1. The application software can then choose when to set the PHY into its normal mode.
Page 27
www.ti.com Note: The Setup packet associated with any standard device request should include an 8-byte command. Any setup packet containing a command field of anything other than 8 bytes will be automatically rejected by the controller. 3.1.1.1 Zero Data Requests Zero data requests have all their information included in the 8-byte command and require no additional data to be transferred.
Page 28
USB Controller Host and Peripheral Modes Operation If the length of the data associated with the request (indicated by the wLength field in the command) is greater than the maximum packet size for endpoint 0, further data packets will be sent. In this case, PERI_CSR0 should be written to set the SERV_RXPKTRDY bit, but the DATAEND bit should not be set.
www.ti.com 3.1.1.4 Endpoint 0 States When the USB controller is operating as a peripheral device, the endpoint 0 control needs three modes – IDLE, TX and RX – corresponding to the different phases of the control transfer and the states endpoint 0 enters for the different phases of the transfer (described in later sections).
USB Controller Host and Peripheral Modes Operation Idle Sequence #1 Setup Unload device CPU actions req. and clear RxPktRdy Idle Sequence #2 Setup CPU actions No data phase Sequence #3 Setup Idle CPU actions Universal Serial Bus (USB) Controller Figure 4. Sequence of Transfer TX state IN data IN data...
Page 31
www.ti.com 3.1.1.5 Endpoint 0 Service Routine An Endpoint 0 interrupt is generated when: The controller sets the RXPKTRDY bit of PERI_CSR0 (bit 0) after a valid token has been received and data has been written to the FIFO. The controller clears the TXPKTRDY bit of PERI_CSR0 (bit 1) after the packet of data in the FIFO has been successfully transmitted to the host.
USB Controller Host and Peripheral Modes Operation Read endpoint 0 CSR * By default Universal Serial Bus (USB) Controller Figure 5. Service Endpoint 0 Flow Chart Service endpoint 0 Sent Clear SentStall bit stall Setup Set ServicedSetupEnd State = IDLE State = TX State...
www.ti.com 3.1.1.5.1 IDLE Mode IDLE mode is the mode the endpoint 0 control must select at power-on or reset and is the mode to which the endpoint 0 control should return when the RX and TX modes are terminated. It is also the mode in which the SETUP phase of control transfer is handled (as outlined in Decode command ServiceRxPktRdy...
USB Controller Host and Peripheral Modes Operation 3.1.1.5.2 TX Mode When the endpoint is in TX state all arriving IN tokens need to be treated as part of a data phase until the required amount of data has been sent to the host. If either a SETUP or an OUT token is received while the endpoint is in the TX state, this will cause a SetupEnd condition to occur as the core expects only IN tokens.
www.ti.com 3.1.1.5.3 RX Mode In RX mode, all arriving data should be treated as part of a data phase until the expected amount of data has been received. If either a SETUP or an IN token is received while the endpoint is in RX state, a SetupEnd condition will occur as the controller expects only OUT tokens.
Page 36
USB Controller Host and Peripheral Modes Operation 3.1.1.5.4 Error Handling A control transfer may be aborted due to a protocol error on the USB, the host prematurely ending the transfer, or if the software wishes to abort the transfer (e.g., because it cannot process the command). The controller automatically detects protocol errors and sends a STALL packet to the host under the following conditions: The host sends more data during the OUT Data phase of a write request than was specified in the...
www.ti.com 3.1.2 Bulk Transactions 3.1.2.1 Peripheral Mode: Bulk In Transactions A Bulk IN transaction is used to transfer non-periodic data from the USB peripheral device to the host. The following optional features are available for use with a Tx endpoint used in peripheral mode for Bulk IN transactions: Double packet buffering: When enabled, up to two packets can be stored in the FIFO awaiting transmission to the host.
Page 38
USB Controller Host and Peripheral Modes Operation 3.1.2.1.2 Operation When data is to be transferred over a Bulk IN pipe, a data packet needs to be loaded into the FIFO and the PERI_TXCSR register written to set the TXPKTRDY bit (bit 0). When the packet has been sent, the TXPKTRDY bit will be cleared by the USB controller and an interrupt generated so that the next packet can be loaded into the FIFO.
www.ti.com 3.1.2.2.1 Setup In configuring an Rx endpoint for Bulk OUT transactions, the RXMAXP register must be written with the maximum packet size (in bytes) for the endpoint. This value should be the same as the wMaxPacketSize field of the Standard Endpoint Descriptor for the endpoint. In addition, the relevant interrupt enable bit in the INTRRXE register should be set (if an interrupt is required for this endpoint) and the PERI_RXCSR register should be set as shown in Table 3.
Page 40
USB Controller Host and Peripheral Modes Operation 3.1.2.2.3 Error Handling If the software wants to shut down the Bulk OUT pipe, it should set the SENDSTALL bit (bit 5 of PERI_RXCSR). When the controller receives the next packet it will send a STALL to the host, set the SENTSTALL bit (bit 6 of PERI_RXCSR) and generate an interrupt.
www.ti.com 3.1.4 Isochronous Transactions 3.1.4.1 Isochronous IN Transactions An Isochronous IN transaction is used to transfer periodic data from the function controller to the host. The following optional features are available for use with a Tx endpoint used in Peripheral mode for Isochronous IN transactions: Double packet buffering: When enabled, up to two packets can be stored in the FIFO awaiting transmission to the host.
Page 42
USB Controller Host and Peripheral Modes Operation An interrupt is generated whenever a packet is sent to the host and the software may use this interrupt to load the next packet into the FIFO and set the TXPKTRDY bit in the PERI_TXCSR register (bit 0) in the same way as for a Bulk Tx endpoint.
www.ti.com 3.1.4.2.1 Setup In configuring an Rx endpoint for Isochronous OUT transactions, the RXMAXP register must be written with the maximum packet size (in bytes) for the endpoint. This value should be the same as the wMaxPacketSize field of the Standard Endpoint Descriptor for the endpoint. In addition, the relevant interrupt enable bit in the INTRRXE register should be set (if an interrupt is required for this endpoint) and the PERI_RXCSR register should be set as shown in Table 5.
USB Controller Host and Peripheral Modes Operation USB Controller Host Mode Operation Entry into Suspend mode. When operating as a host, the controller can be prompted to enter Suspend mode by setting the SUSPENDM bit in the POWER register. When this bit is set, the controller will complete the current transaction then stop the transaction scheduler and frame counter.
www.ti.com 3.2.1.1 Setup Phase For the SETUP Phase of a control transaction 1. Load the 8 bytes of the required Device request command into the Endpoint 0 FIFO. 2. Set SETUPPKT and TXPKTRDY (bits 3 and 1 of HOST_CSR0, respectively). Note: These bits must be set together.
Page 46
USB Controller Host and Peripheral Modes Operation 3. At the end of the attempt to send the data, the controller will generate an Endpoint 0 interrupt. The software should then read HOST_CSR0 to establish whether the RXSTALL bit (bit 2), the ERROR bit (bit 4) or the NAK_TIMEOUT bit (bit 7) has been set.
www.ti.com NAK limit reached Error count cleared NAK Timeout set Endpoint halted Interrupt generated 3.2.1.3 OUT Data Phase For the OUT Data Phase of a control transaction needs to: 1. Load the data to be sent into the endpoint 0 FIFO. 2.
USB Controller Host and Peripheral Modes Operation If NAK_TIMEOUT is set, it means that the controller has received a NAK response to each attempt to send the OUT token, for longer than the time set in the HOST_NAKLIMIT0 register. The controller can then be directed either to continue trying this transaction (until it times out again) by clearing the NAK_TIMEOUT bit or to abort the transaction by flushing the FIFO before clearing the NAK_TIMEOUT bit.
www.ti.com 3.2.1.4 IN Status Phase (following SETUP Phase or OUT Data Phase) For the IN Status Phase of a Control Transaction needs to: 1. Set the STATUSPKT and REQPKT bits of HOST_CSR0 (bit 6 and bit 5, respectively). 2. Wait while the controller sends an IN token and receives a response from the USB peripheral device. Figure 12.
Page 50
USB Controller Host and Peripheral Modes Operation 3. When the controller generates the Endpoint 0 interrupt, read HOST_CSR0 to establish whether the RXSTALL bit (bit 2), the ERROR bit (bit 4), the NAK_TIMEOUT bit (bit 7) or RXPKTRDY bit (bit 0) has been set.
www.ti.com Figure 13. Completion of IN Data Phase Flow Chart NAK limit reached Error count cleared NAK Timeout set Endpoint halted Interrupt generated SPRUGH3 – November 2008 Submit Documentation Feedback USB Controller Host and Peripheral Modes Operation Completion of IN data phase TxPktRdy and StatusPkt both set...
Page 52
USB Controller Host and Peripheral Modes Operation 3.2.2 Bulk Transactions 3.2.2.1 Host Mode: Bulk IN Transactions A Bulk IN transaction may be used to transfer non-periodic data from the external USB peripheral to the host. The following optional features are available for use with an Rx endpoint used in host mode to receive the data: Double packet buffering: When enabled, up to two packets can be stored in the FIFO on reception from the host.
Page 53
www.ti.com 3.2.2.1.2 Operation When Bulk data is required from the USB peripheral device, the software should set the REQPKT bit in the corresponding HOST_RXCSR register (bit 5). The controller will then send an IN token to the selected peripheral endpoint and waits for data to be returned. If data is correctly received, RXPKTRDY bit of HOST_RXCSR (bit 0) is set.
Page 54
USB Controller Host and Peripheral Modes Operation The HOST_TXINTERVAL register needs to be written with the required value for the NAK limit (2 - 215 frames/microframes), or cleared to 0 if the NAK timeout feature is not required. The relevant interrupt enable bit in the INTRTXE register should be set (if an interrupt is required for this endpoint).
Page 55
www.ti.com 3.2.4 Isochronous Transactions 3.2.4.1 Host Mode: Isochronous IN Transactions An Isochronous IN transaction is used to transfer periodic data from the USB peripheral to the host. The following optional features are available for use with an Rx endpoint used in Host mode to receive this data: Double packet buffering: When enabled, up to two packets can be stored in the FIFO on reception from the host.
Page 56
USB Controller Host and Peripheral Modes Operation FIFO unload requests will probably be irregular. If the data sink for the endpoint is going to some external hardware, it may be better to minimize the requirement for additional buffering by waiting until the end of each frame before unloading the FIFO.
www.ti.com 3.2.4.2.2 Operation The operation starts when the software writes to the FIFO and sets TXPKTRDY bit of HOST_TXCSR (bit 0). This triggers the controller to send an OUT token followed by the first data packet from the FIFO. An interrupt is generated whenever a packet is sent and the software may use this interrupt to load the next packet into the FIFO and set the TXPKTRDY bit in the HOST_TXCSR register (bit 0) in the same way as for a Bulk Tx endpoint.
USB Controller Host and Peripheral Modes Operation End of queue (EOQ) (only valid on EOP) Packet Length (only valid with SOP) Transmit buffer descriptors contain 16 bytes (4 words) and must begin on 16-byte aligned addresses. Transmit buffer descriptors may be linked together to form packets. Buffer descriptor SOP and EOP bits are used to delimit packets.
Page 59
www.ti.com Table 9. Transmit Buffer Descriptor Word 3 (continued) Bits Name Value 27:24 Reserved Zero Byte 22:16 Reserved 15:0 Packet Length Four different cases are possible for the number of buffers in a DMA packet: 1. Buffer Descriptor contains Start of Packet field and End of Packet field (1 buffer in DMA packet). 2.
USB Controller Host and Peripheral Modes Operation 3.3.1.4 Transmit Queue Figure 14 shows a Tx queue. Tx queue provide a logical queue of DMA packets for transmission through a channel. Each channel has one dedicated Tx queues. The queue has one associated Tx Queue Head Descriptor Pointer and one associated Tx Completion Pointer container in the channel Tx DMA state.
Page 61
www.ti.com clear the Ownership bit in the DMA packet’s SOP buffer descriptor and issue an interrupt to the processor by writing the DMA packet’s last buffer descriptor address to the queue’s Tx DMA State Completion Pointer (TCPPICOMPPTR register). When the last packet in a queue has been transmitted, the DMA controller sets the End Of Queue bit in the EOP buffer descriptor, clears the Ownership bit in the SOP Descriptor, zeroes the appropriate DMA state head descriptor pointer, and then issues a Tx interrupt to the host by writing address of the last buffer descriptor processed by the DMA controller to the queue’s...
Page 62
USB Controller Host and Peripheral Modes Operation RNDIS Mode Setup The setup of RNDIS mode DMA is similar to the default Transparent Mode as mentioned in the previous section. The following steps need to be taken for setting up RNDIS mode Tx DMA: After reset the software must write zeroes to all Tx DMA State registers (TCPPIDMASTATEW0, TCPPIDMASTATEW1, TCPPIDMASTATEW5).
www.ti.com 3.3.2.2 CPPI Receive Buffer Descriptor Rx buffer descriptors provide information about a single corresponding Rx data buffer. Every Rx buffer has a single Rx buffer descriptor that stores the following information: Pointer to the data buffer Pointer to the next buffer descriptor in the queue Buffer length and offset to the first valid byte of buffer data Start of DMA packet (SOP) indicator End of DMA packet (EOP) indicator...
USB Controller Host and Peripheral Modes Operation Field Value Description Ownership 27:24 Reserved Zero Byte 22:16 Reserved 15:0 Packet Length Four different cases are possible for the number of buffers in a DMA packet: 1. Buffer Descriptor contains Start of Packet field and End of Packet field (1 buffer in DMA packet) 2.
www.ti.com 3.3.2.4 Receive Queue Figure 15 shows an Rx Queue. Rx queue provide a logical queue of processor memory space for DMA packets to be received from DMA controller channel. Each channel has single Rx queue. There are no multiple queue as in transmit channels. Each queue has one associated Rx Queue Head Descriptor Pointer and one associated Rx Completion Pointer contained in the channel Rx DMA State.
Page 66
USB Controller Host and Peripheral Modes Operation The software enables packet reception on a given channel by writing the address of the first buffer descriptor in the queue (nonzero value) to the channel’s head descriptor pointer (RCCPIDMASTATEW1) in the channel’s Rx DMA state. When packet reception begins on a given channel, the DMA controller fills each Rx buffer with data in order starting with the first buffer and proceeding through the Rx queue.
Page 67
www.ti.com 3.3.2.6 Receive Abort Handling The DMA controller sets ‘Rx Abort’ bit used to identify Rx packets which were aborted due to lack of buffers. Software must take care to inspect any Rx SOP packet for this bit and ignore all the buffers in that packet as the packet is incomplete.
USB Controller Host and Peripheral Modes Operation If RXn_AUTOREQ (where n is the channel number) of AUTOREQ register is set with binary 11, IN tokens will be generated and sent to the target USB peripheral device even after the End Of DMA Packet is reached.
Page 69
www.ti.com Table 15. USB Interrupt Conditions (continued) Interrupt USB[3] USB[2] USB[1] USB[0] SPRUGH3 – November 2008 Submit Documentation Feedback USB Controller Host and Peripheral Modes Operation Description SOF started Reset Signaling detected (In Peripheral Mode) Babble detected (In Host Mode) Resume signaling detected Suspend Signaling detected Universal Serial Bus (USB) Controller...
USB Controller Host and Peripheral Modes Operation 3.4.1 USB Core Interrupts There are two methods available for software to access USB core interrupts, selectable by the UINT bit of CTRLR. The UINT bit cleared to 0 selects the PDR 2.0 compliant register set (INTSRCR, INTSETR, INTCLRR, INTMSKR, INTMSKSETR, INTMSKCLRR, INTMASKEDR).
Page 71
www.ti.com 3.5.1 TEST_SE0_NAK To enter the Test_SE0_NAK test mode, the software should set the Test_SE0-NAK bit by writing 0x01 to the TestMode register. The controller will then go into a mode in which it responds to any valid IN token with a NAK.
Page 72
USB Controller Host and Peripheral Modes Operation 3.5.4 TEST_PACKET To execute the Test_Packet, the software should: 1. Start a session (if the core is being used in Host mode). 2. Write the standard test packet (shown below) to the Endpoint 0 FIFO. 3.
Page 73
www.ti.com 3.5.6 FORCE_HOST The Force Host test mode enables the user to instruct the core to operate in Host mode, regardless of whether it is actually connected to any peripheral, i.e., the state of the CID input and the LINESTATE and HOSTDISCON signals are ignored.
USB Controller Host and Peripheral Modes Operation Reset Considerations The USB controller has two reset sources: hardware reset and the soft reset (RESET bit in CTRLR register). 3.6.1 Software Reset Considerations When the RESET bit in CTRLR is set, all the USB controller registers and DMA operations are reset. The bit is cleared automatically.
www.ti.com Registers Table 16 lists the memory-mapped registers for the universal serial bus (USB). See the device-specific data manual for the memory address of these registers. The base address is 01C6 4000h. Note: In some cases, a single register address can have different names or meanings depending on the mode (host/peripheral) or the setting of the index register.
Registers Table 16. Universal Serial Bus (USB) Registers (continued) Offset Acronym 546h PERI_RXCSR HOST_RXCSR 548h RXCOUNT 54Ah HOST_TXTYPE 54Bh HOST_TXINTERVAL 54Ch HOST_RXTYPE 54Dh HOST_RXINTERVAL Control Register (CTRLR) The Control Register (CTRLR) is shown in Reserved LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 17.
www.ti.com Status Register (STATR) The Status Register (STATR) is shown in LEGEND: R = Read only; -n = value after reset Table 18. Status Register (STATR) Field Descriptions Field Value Description 31-1 Reserved Reserved DRVVBUS Current DRVVBUS value. DRVVBUS value is logic 0 DRVVBUS value is logic 1 RNDIS Register (RNDISR) The RNDIS Register (RNDISR) is shown in...
Registers Auto Request Register (AUTOREQ) The Auto Request Register (AUTOREQ) is shown in Reserved LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 20. Auto Request Register (AUTOREQ) Field Descriptions Field Value Description 31-8 Reserved Reserved 0-3h RX endpoint 4 Auto Req enable.
www.ti.com USB Interrupt Source Register (INTSRCR) The USB Interrupt Source Register (INTSRCR) is shown in Figure 20. USB Interrupt Source Register (INTSRCR) Reserved Reserved LEGEND: R = Read only; -n = value after reset Table 21. USB Interrupt Source Register (INTSRCR) Field Descriptions Field Value Description...
Registers USB Interrupt Source Set Register (INTSETR) The USB Interrupt Source Set Register (INTSETR) is shown in Figure 21. USB Interrupt Source Set Register (INTSETR) Reserved Reserved LEGEND: R = Read only; W = Write only; -n = value after reset Table 22.
www.ti.com USB Interrupt Source Clear Register (INTCLRR) The USB Interrupt Source Clear Register (INTCLRR) is shown in Figure 22. USB Interrupt Source Clear Register (INTCLRR) Reserved Reserved LEGEND: R = Read only; W = Write only; -n = value after reset Table 23.
Registers USB Interrupt Mask Register (INTMSKR) The USB Interrupt Mask Register (INTMSKR) is shown in Figure 23. USB Interrupt Mask Register (INTMSKR) Reserved Reserved LEGEND: R = Read only; -n = value after reset Table 24. USB Interrupt Mask Register (INTMSKR) Field Descriptions Field Value Description...
www.ti.com USB Interrupt Mask Set Register (INTMSKSETR) The USB Interrupt Mask Set Register (INTMSKSETR) is shown in Figure 24. USB Interrupt Mask Set Register (INTMSKSETR) Reserved Reserved LEGEND: R = Read only; W = Write only; -n = value after reset Table 25.
Registers 4.10 USB Interrupt Mask Clear Register (INTMSKCLRR) The USB Interrupt Mask Clear Register (INTMSKCLRR) is shown in Figure 25. USB Interrupt Mask Clear Register (INTMSKCLRR) Reserved Reserved LEGEND: R = Read only; W = Write only; -n = value after reset Table 26.
www.ti.com 4.11 USB Interrupt Source Masked Register (INTMASKEDR) The USB Interrupt Source Masked Register (INTMASKEDR) is shown in Table Figure 26. USB Interrupt Source Masked Register (INTMASKEDR) Reserved Reserved LEGEND: R = Read only; -n = value after reset Table 27. USB Interrupt Source Masked Register (INTMASKEDR) Field Descriptions Field Value Description...
Registers 4.12 USB End of Interrupt Register (EOIR) The USB End of Interrupt Register (EOIR) is shown in Figure 27. USB End of Interrupt Register (EOIR) Reserved LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 28.
www.ti.com 4.14 Transmit CPPI Control Register (TCPPICR) The Transmit CPPI Control Register (TCPPICR) is shown in Figure 29. Transmit CPPI Control Register (TCPPICR) LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 30. Transmit CPPI Control Register (TCPPICR) Field Descriptions Field Value Description...
Registers 4.16 CPPI DMA End of Interrupt Register (CPPIEOIR) Note: This register was previously named TCPPIEOIR, and that name will continue to exist in the CSL for backward compatibility. The CPPI DMA End of Interrupt Register (CPPIEOIR) is shown in Figure 31.
www.ti.com 4.17 Transmit CPPI Masked Status Register (TCPPIMSKSR) The Transmit CPPI Masked Status Register (TCPPIMSKSR) is shown in Table Figure 32. Transmit CPPI Masked Status Register (TCPPIMSKSR) LEGEND: R = Read only; -n = value after reset Table 33. Transmit CPPI Masked Status Register (TCPPIMSKSR) Field Descriptions Field 31-4 Reserved...
Registers 4.19 Transmit CPPI Interrupt Enable Set Register (TCPPIIENSETR) The Transmit CPPI Interrupt Enable Set Register (TCPPIIENSETR) is shown in Table Figure 34. Transmit CPPI Interrupt Enable Set Register (TCPPIIENSETR) LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 35.
www.ti.com 4.21 Receive CPPI Control Register (RCPPICR) The Receive CPPI Control Register (RCPPICR) is shown in Figure 36. Receive CPPI Control Register (RCPPICR) LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 37. Receive CPPI Control Register (RCPPICR) Field Descriptions Field Value Description...
Registers 4.23 Receive CPPI Raw Status Register (RCPPIRAWSR) The Receive CPPI Raw Status Register (RCPPIRAWSR) is shown in Table Figure 38. Receive CPPI Raw Status Register (RCPPIRAWSR) LEGEND: R = Read only; -n = value after reset Table 39. Receive CPPI Raw Status Register (RCPPIRAWSR) Field Descriptions Field Value 31-4...
Registers 4.31 Transmit CPPI DMA State Word 1 (TCPPIDMASTATEW1) The Transmit CPPI DMA State Word 1 (TCPPIDMASTATEW1) is shown in Table Figure 46. Transmit CPPI DMA State Word 1 (TCPPIDMASTATEW1) SOP_DESCRIPTOR_PTR LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 47.
www.ti.com Table 48. Transmit CPPI DMA State Word 2 (TCPPIDMASTATEW2) Field Descriptions (continued) Field Reserved 4.33 Transmit CPPI DMA State Word 3 (TCPPIDMASTATEW3) The Transmit CPPI DMA State Word 3 (TCPPIDMASTATEW3) is shown in Table Figure 48. Transmit CPPI DMA State Word 3 (TCPPIDMASTATEW3) LEGEND: R/W = Read/Write;...
Registers Table 50. Transmit CPPI DMA State Word 4 (TCPPIDMASTATEW4) Field Descriptions (continued) Field 15-0 CURR_BUFFER_LENGTH 4.35 Transmit CPPI DMA State Word 5 (TCPPIDMASTATEW5) The Transmit CPPI DMA State Word 5 (TCPPIDMASTATEW5) is shown in Table Figure 50. Transmit CPPI DMA State Word 5 (TCPPIDMASTATEW5) LEGEND: R/W = Read/Write;...
www.ti.com Table 52. Transmit CPPI Completion Pointer (TCPPICOMPPTR) Field Descriptions Field Value 31-2 DESC_ADDR 0-3FFF FFFFh Reserved WRBK_MODE 4.37 Receive CPPI DMA State Word 0 (RCPPIDMASTATEW0) The Receive CPPI DMA State Word 0 (RCPPIDMASTATEW0) is shown in Table Figure 52. Receive CPPI DMA State Word 0 (RCPPIDMASTATEW0) Reserved R/W-0 LEGEND: R/W = Read/Write;...
Registers Figure 53. Receive CPPI DMA State Word 1 (RCPPIDMASTATEW1) LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 54. Receive CPPI DMA State Word 1 (RCPPIDMASTATEW1) Field Descriptions Field Value 31-2 RXQ_HEAD_PTR 0-1FFF FFFFh Reserved Universal Serial Bus (USB) Controller RXQ_HEAD_PTR...
www.ti.com 4.39 Receive CPPI DMA State Word 2 (RCPPIDMASTATEW2) The Receive CPPI DMA State Word 2 (RCPPIDMASTATEW2) is shown in Table Figure 54. Receive CPPI DMA State Word 2 (RCPPIDMASTATEW2) SOP_DESCRIPTOR_PTR LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 55.
Page 108
Registers www.ti.com Universal Serial Bus (USB) Controller SPRUGH3 – November 2008 Submit Documentation Feedback...
www.ti.com 4.41 Receive CPPI DMA State Word 4 (RCPPIDMASTATEW4) The Receive CPPI DMA State Word 4 (RCPPIDMASTATEW4) is shown in Table Figure 56. Receive CPPI DMA State Word 4 (RCPPIDMASTATEW4) LEGEND: R/W = Read/Write; -n = value after reset Table 57. Receive CPPI DMA State Word 4 (RCPPIDMASTATEW4) Field Descriptions Field Value 31-0...
Registers 4.43 Receive CPPI DMA State Word 6 (RCPPIDMASTATEW6) The Receive CPPI DMA State Word 6 (RCPPIDMASTATEW6) is shown in Table Figure 58. Receive CPPI DMA State Word 6 (RCPPIDMASTATEW6) LEGEND: R/W = Read/Write; -n = value after reset Table 59. Receive CPPI DMA State Word 6 (RCPPIDMASTATEW6) Field Descriptions Field 31-16 SOP_BUFFER_BYTECNT 15-0...
www.ti.com Table 60. Receive CPPI Completion Pointer (RCPPICOMPPTR) Field Descriptions (continued) Field Value RDBK_MODE 4.45 Function Address Register (FADDR) The Function Address Register (FADDR) is shown in Reserved LEGEND: R/W = Read/Write; -n = value after reset Table 61. Function Address Register (FADDR) Field Descriptions Field Value Description...
Registers Table 62. Power Management Register (POWER) Field Descriptions (continued) Field Value Description RESET This bit is set when Reset signaling is present on the bus. Note: This bit is Read/Write in Host Mode, but read-only in Peripheral Mode. RESUME Set to generate Resume signaling when the controller is in Suspend mode.
www.ti.com Figure 63. Interrupt Register for Receive Endpoints 1 to 4 (INTRRX) Reserved LEGEND: R = Read only; -n = value after reset Table 64. Interrupt Register for Receive Endpoints 1 to 4 (INTRRX) Field Descriptions Field Value Description 15-5 Reserved Reserved EP4RX...
www.ti.com 4.51 Interrupt Register for Common USB Interrupts (INTRUSB) The Interrupt Register for Common USB Interrupts (INTRUSB) is shown in Table 67. Reading this register causes all bits to be cleared. Note: Unless the UINT bit of CTRLR is set, do not read or write this register directly. Use the INTSRCR register instead.
Registers 4.52 Interrupt Enable Register for INTRUSB (INTRUSBE) The Interrupt Enable Register for INTRUSB (INTRUSBE) is shown in Note: Unless the UINT bit of CTRLR is set, do not read or write this register directly. Use the INTMSKSETR/INTMSKCLRR registers instead. Figure 67.
www.ti.com 4.53 Frame Number Register (FRAME) The Frame Number Register (FRAME) is shown in Reserved LEGEND: R = Read only; -n = value after reset Table 69. Frame Number Register (FRAME) Field Descriptions Field Value 15-11 Reserved 10-0 FRAMENUMBER 0-7FFh Last received frame number 4.54 Index Register for Selecting the Endpoint Status and Control Registers (INDEX) The Index Register for Selecting the Endpoint Status and Control Registers (INDEX) is shown in and described in...
Registers 4.55 Register to Enable the USB 2.0 Test Modes (TESTMODE) The Register to Enable the USB 2.0 Test Modes (TESTMODE) is shown in Table Figure 70. Register to Enable the USB 2.0 Test Modes (TESTMODE) FORCE_HOST FIFO_ACCESS FORCE_FS R/W-0 R/W-0 LEGEND: R/W = Read/Write;...
www.ti.com 4.56 Maximum Packet Size for Peripheral/Host Transmit Endpoint (TXMAXP) The Maximum Packet Size for Peripheral/Host Transmit Endpoint (TXMAXP) is shown in described in Table Figure 71. Maximum Packet Size for Peripheral/Host Transmit Endpoint (TXMAXP) Reserved LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 72.
Registers 4.57 Control Status Register for Endpoint 0 in Peripheral Mode (PERI_CSR0) The Control Status Register for Endpoint 0 in Peripheral Mode (PERI_CSR0) is shown in described in Table Figure 72. Control Status Register for Endpoint 0 in Peripheral Mode (PERI_CSR0) SERV_SETUPEND SERV_RXPKTRDY SENDSTALL...
www.ti.com 4.58 Control Status Register for Endpoint 0 in Host Mode (HOST_CSR0) The Control Status Register for Endpoint 0 in Host Mode (HOST_CSR0) is shown in described in Table Figure 73. Control Status Register for Endpoint 0 in Host Mode (HOST_CSR0) Reserved NAK_TIMEOUT STATUSPKT...
Registers 4.59 Control Status Register for Peripheral Transmit Endpoint (PERI_TXCSR) The Control Status Register for Peripheral Transmit Endpoint (PERI_TXCSR) is shown in described in Table Figure 74. Control Status Register for Peripheral Transmit Endpoint (PERI_TXCSR) Reserved MODE R/W-0 R/W-0 CLRDATATOG SENTSTALL SENDSTALL R/W-0...
www.ti.com 4.60 Control Status Register for Host Transmit Endpoint (HOST_TXCSR) The Control Status Register for Host Transmit Endpoint (HOST_TXCSR) is shown in described in Table Figure 75. Control Status Register for Host Transmit Endpoint (HOST_TXCSR) Reserved MODE R/W-0 NAK_TIMEOUT CLRDATATOG RXSTALL R/W-0 LEGEND: R/W = Read/Write;...
Registers 4.61 Maximum Packet Size for Peripheral Host Receive Endpoint (RXMAXP) The Maximum Packet Size for Peripheral Host Receive Endpoint (RXMAXP) is shown in described in Table Figure 76. Maximum Packet Size for Peripheral Host Receive Endpoint (RXMAXP) Reserved LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 77.
www.ti.com 4.62 Control Status Register for Peripheral Receive Endpoint (PERI_RXCSR) The Control Status Register for Peripheral Receive Endpoint (PERI_RXCSR) is shown in described in Table Figure 77. Control Status Register for Peripheral Receive Endpoint (PERI_RXCSR) Reserved DMAEN R/W-0 R/W-0 CLRDATATOG SENTSTALL SENDSTALL R/W-0...
Registers 4.63 Control Status Register for Host Receive Endpoint (HOST_RXCSR) The Control Status Register for Host Receive Endpoint (HOST_RXCSR) is shown in described in Table Figure 78. Control Status Register for Host Receive Endpoint (HOST_RXCSR) Reserved DMAEN R/W-0 CLRDATATOG RXSTALL REQPKT R/W-0 R/W-0...
Page 127
Registers www.ti.com SPRUGH3 – November 2008 Universal Serial Bus (USB) Controller Submit Documentation Feedback...
Registers 4.64 Count 0 Register (COUNT0) The Count 0 Register (COUNT0) is shown in Reserved LEGEND: R = Read only; -n = value after reset Table 80. Count 0 Register (COUNT0) Field Descriptions Field Value Description 15-7 Reserved Reserved EP0RXCOUNT 0-7Fh Indicates the number of received data bytes in the Endpoint 0 FIFO.
www.ti.com 4.66 Type Register (Host mode only) (HOST_TYPE0) The Type Register (Host mode only) (HOST_TYPE0) is shown in Figure 81. Type Register (Host mode only) (HOST_TYPE0) SPEED R/W-0 LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 82.
Registers Table 87. Receive Interval Register (Host mode only) (HOST_RXINTERVAL) Field Descriptions Field Value POLINTVL_NAKLIMIT 0-FFh 4.72 Configuration Data Register (CONFIGDATA) The configuration data register (CONFIGDATA) is shown in Figure 87. Configuration Data Register (CONFIGDATA) MPRXE MPTXE BIGENDIAN LEGEND: R = Read only; -n = value after reset Table 88.
Page 133
Registers www.ti.com SPRUGH3 – November 2008 Universal Serial Bus (USB) Controller Submit Documentation Feedback...
Registers 4.73 Transmit and Receive FIFO Register for Endpoint 0 (FIFO0) The Transmit and Receive FIFO Register for Endpoint 0 (FIFO0) is shown in Table Figure 88. Transmit and Receive FIFO Register for Endpoint 0 (FIFO0) LEGEND: R/W = Read/Write; -n = value after reset Table 89.
www.ti.com 4.74 Transmit and Receive FIFO Register for Endpoint 1 (FIFO1) The Transmit and Receive FIFO Register for Endpoint 1 (FIFO1) is shown in Table Figure 89. Transmit and Receive FIFO Register for Endpoint 1 (FIFO1) LEGEND: R/W = Read/Write; -n = value after reset Table 90.
Registers 4.76 Transmit and Receive FIFO Register for Endpoint 3 (FIFO3) The Transmit and Receive FIFO Register for Endpoint 3 (FIFO3) is shown in Table Figure 91. Transmit and Receive FIFO Register for Endpoint 3 (FIFO3) LEGEND: R/W = Read/Write; -n = value after reset Table 92.
www.ti.com 4.78 OTG Device Control Register (DEVCTL) The OTG Device Control Register (DEVCTL) is shown in Figure 93. OTG Device Control Register (DEVCTL) BDEVICE FSDEV LSDEV LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 94. OTG Device Control Register (DEVCTL) Field Descriptions Field Value Description...
Registers 4.83 Transmit Function Address (TXFUNCADDR) The Transmit Function Address (TXFUNCADDR) is shown in Figure 98. Transmit Function Address (TXFUNCADDR) Reserved LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 99. Transmit Function Address (TXFUNCADDR) Field Descriptions Field Value Description...
www.ti.com 4.86 Receive Function Address (RXFUNCADDR) The Receive Function Address (RXFUNCADDR) is shown in Figure 101. Receive Function Address (RXFUNCADDR) Reserved LEGEND: R/W = Read/Write; R = Read only; -n = value after reset Table 102. Receive Function Address (RXFUNCADDR) Field Descriptions Field Value Description...
Page 142
Registers www.ti.com Universal Serial Bus (USB) Controller SPRUGH3 – November 2008 Submit Documentation Feedback...
www.ti.com Appendix A Revision History Table A-1 lists the changes made since the previous version of this document. Reference Additions/Modifications/Deletions Section 1 Added note. Section 1.3 Added section. Section 2.4 Changed section. Section 3.1.1 Renamed section. Section 3.1.2.1 Renamed section. Section 3.1.2.2 Renamed section.
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. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.
Need help?
Do you have a question about the TMS320DM357 and is the answer not in the manual?
Questions and answers