Reserved Pad (4 Bytes)
Teardown Info (4 Bytes)
Required Information
(32 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)
Architecture
1656
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Universal Serial Bus 2.0 (USB) Controller
Figure 34-18. Teardown Descriptor Layout
Table 34-24. Teardown Descriptor Word 0
Bits
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 34-25. Teardown Descriptor Words 1-7
Bits
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 (TXGCR
n
).
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] fileld.
3. Check if the teardown descriptor has been received on the teardown queue: The completion queue
(Queues 24 or 25) is usually used as the Teardown queue when the Teardown descriptor has been
received, the descriptor address will be loaded onto CTRLD[24/25] 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.