Architecture
1661
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Universal Serial Bus 2.0 (USB) Controller
Case 2:
Enabled endpoint EP1-Tx is serviced at twice the rate as the other enabled endpoints (EP2-Rx
and EP2-Tx).
The number of entries/credit that has to be awarded to EP1-Tx has to be twice as much of the others.
Since only four entries/credits are required, two for EP1-Tx, one for EP2-Rx, and one for EP2-Tx, the use
of scheduler Table WORD[0] would still suffice. Even though several scenarios exist to programming the
order of service for this case, one scenario would be to allow EP1-Tx to be serviced back-to-back followed
by the other enabled endpoints. Program DMA_SCHED_CTRL.LAST_ENTRY with 3 (that is, 4 - 1).
Program WORD[0] (ENTRY0_CHANNEL = 1: ENTRY0_RXTX = 0; ENTRY1_CHANNEL = 1:
ENTRY1_RXTX = 0; ENTRY2_CHANNEL = 2: ENTRY2_RXTX = 1; ENTRY3_CHANNEL = 2:
ENTRY3_RXTX = 0).
34.2.8.8.3 Scheduler Operation
Once the scheduler is enabled it will begin processing the entries in the table and when appropriate
passing credits to the DMA controller to perform a Tx or Rx operation. The operation of the DMA controller
is as follows:
1. After the DMA scheduler is enabled it begins with the table index set to 0.
2. The scheduler reads the entry pointed to by the index and checks to see if the channel in question is
currently in a state where a DMA operation can be accepted. The following must both be true:
•
The DMA channel must be enabled.
•
The CPPI FIFO that the channel talks to has free space on TX (FIFO full signal is not asserted) or
a valid block on Rx (FIFO empty signal is not asserted).
3. If the DMA channel is capable of processing a credit to transfer a block, the DMA scheduler will issue
that credit via the DMA scheduling interface. These are the steps:
(a) The DMA controller may not be ready to accept the credit immediately and is provided a
sched_ready signal which is used to stall the scheduler until it can accept the credit. The DMA
controller only asserts the sched_ready signal when it is in the IDLE state.
(b) Once a credit has been accepted (indicated by sched_req and sched_ready both asserted), the
scheduler will increment the index to the next entry and will start at step 2.
4. If the channel in question is not currently capable of processing a credit, the scheduler will increment
the index in the scheduler table to the next entry and will start at step 2.
5. When the scheduler attempts to increment its index to the value programmed in the table size register,
the index will reset to 0.
34.2.8.9 CPPI DMA Transfer Interrupt Handling
The CPPI DMA 4.1 Interrupt handling mechanism does not go through the PDR interrupt handler built into
the core. The DMA interrupt line is directly routed to the Interrupt Dispatcher in a PDR compliant manner.
The DMA interrupt is not maskable. The firmware needs to use queues reserved by hardware as
Completion Queues, if required for the DMA interrupt to be generated on a completion of a transfer.
Queues 24 and 25 are reserved by hardware for DMA transmit operations and queues 26 and 27 are
reserved by hardware for DMA receive operations. If firmware uses these queues as Completion Queues,
an interrupt will be generated when the transfer completes. If you need not to generate an interrupt,
firmware is required to use queues that are not reserved as Completion Queues.