At this point the port is enabled for communication. Keep alive or SOF packets are sent on the port. If a
USB 2.0-capable device fails to initialize correctly, it is reported as a USB 1.1 device.
The Host Frame Interval Register (
hfir
) is updated with the corresponding PHY clock settings. The
hfir
, used for sending SOF packets, is in the Host Mode Registers (
host grp
) group.
7. The software driver must program the following registers in the Global Registers (
globgrp
) group, in
the order listed:
a. Receive FIFO Size Register (
grxfsiz
)—selects the size of the receive FIFO buffer
b. Non-periodic Transmit FIFO Size Register (
gnptxfsiz
)—selects the size and the start address of
the non-periodic transmit FIFO buffer for nonperiodic transactions
c. Host Periodic Transmit FIFO Size Register (
hptxfsiz
)—selects the size and start address of the
periodic transmit FIFO buffer for periodic transactions
8. System software initializes and enables at least one channel to communicate with the USB device.
Host Transaction
When configured as a host, the USB OTG controller pipes the USB transactions through one of two request
queues (one for periodic transactions and one for nonperiodic transactions). Each entry in the request queue
holds the SETUP, IN, or OUT channel number along with other information required to perform a
transaction on the USB link. The sequence in which the requests are written to the queue determines the
sequence of transactions on the USB link.
The host processes the requests in the following order at the beginning of each frame or microframe:
1. Periodic request queue, including isochronous and interrupt transactions
2. Nonperiodic request queue (bulk or control transfers)
The host schedules transactions for each enabled channel in round-robin fashion. When the host controller
completes the transfer for a channel, the controller updates the DMA descriptor status in the system memory.
For OUT transactions, the host controller uses two transmit FIFO buffers to hold the packet payload to be
transmitted. One transmit FIFO buffer is used for all nonperiodic OUT transactions and the other is used
for all periodic OUT transactions.
For IN transactions, the USB host controller uses one receive FIFO buffer for all periodic and nonperiodic
transactions. The controller holds the packet payload from the USB device in the receive FIFO buffer until
the packet is transferred to the system memory. The receive FIFO buffer also holds the status of each packet
received. The status entry holds the IN channel number along with other information, including received
byte count and validity status.
For generic hub operations, the USB OTG controller uses SPLIT transfers to communicate with slower-
speed devices downstream of the hub. For these transfers, the transaction accumulation or buffering is
performed in the generic hub, and is scheduled accordingly. The USB OTG controller ensures that enough
transmit and receive buffers are allocated when the downstream transactions are completed or when
accumulated data is ready to be sent upstream.
Altera Corporation
USB 2.0 OTG Controller
18-13
Host Transaction
cv_54018
2013.12.30