Required Information
(32 Bytes)
Teardown Info (4 Bytes)
Reserved Pad (4 Bytes)
Reserved Pad (4 Bytes)
Reserved Pad (4 Bytes)
Reserved Pad (4 Bytes)
Reserved Pad (4 Bytes)
Reserved Pad (4 Bytes)
Reserved Pad (4 Bytes)
Functional Description
Figure 16-15. Teardown Descriptor Layout
Table 16-25. Teardown Descriptor Word 0 Bit Field Descriptions
Bits
Field Name
Description
31-27
Descriptor type
The teardown descriptor type is 19 decimal (13h)
26-17
Reserved
Reserved
16
TX_RX
Indicates whether teardown is a TX (0) or RX (1).
15-10
DMA number
Indicates the DMA number for this teardown.
9-6
Reserved
Reserved
5-0
Channel number
Indicates the channel number within the DMA that was torn down.
Table 16-26. Teardown Descriptor Words 1 to 7 Bit Field Descriptions
Bits
Field Name
Description
31-0
Reserved
Reserved
Teardown operation of an endpoint requires three operations. The teardown register in the CPPI DMA
must be written, the corresponding endpoint bit in TEARDOWN of the USB module must be set, and the
FlushFIFO bit in the Mentor USB controller Tx/RxCSR register must be set.
The following is the Transmit teardown procedure highlighting the steps required to be followed:
1. Set the TX_TEARDOWN bit in the CPPI DMA TX channel n global configuration register (TXGCRn).
2. Set the appropriate TX_TDOWN bit in the USBOTG controller’s USB teardown register (TEARDOWN).
Write Tx Endpoint Number to teardown to TEARDOWN[TX_TDOWN] field.
3. Check if the teardown descriptor has been received on the teardown queue: The completion queue
(see Queue Assignment table) is usually used as the Teardown Completion queue when the Teardown
descriptor has been received, the descriptor address will be loaded onto CTRLD[Completion Queue #]
register:
(a) If not, go to step 2
(b) If so, go to step 4
4. Set the appropriate TX_TDOWN bit in the USBOTG controller’s USB teardown register (TEARDOWN).
Set the bit corresponding to the Channel Number within TEARDOWN[TX_TDOWN] field.
5. Flush the TX FIFO in the Mentor OTG core: Set PERI_TXCSR[FLUSHFIFO] for the corresponding
Endpoint.
6. Re-enable the Tx DMA channel.
(a) Clear TXGCRn[TX_TEARDOWN and TX_ENABLE] bit.
(b) Set TXGCRn[TX_ENABLE] bit.
1741
SPRUH73H – October 2011 – Revised April 2013
Universal Serial Bus (USB)
Copyright © 2011–2013, Texas Instruments Incorporated