Texas Instruments OMAP5912 Reference Manual page 1404

Multimedia processor device overview and architecture
Hide thumbs Also See for OMAP5912:
Table of Contents

Advertisement

USB Device Controller
3.3.1
Non-Isochronous, Non-Control OUT Endpoint Handshaking Conditions
Acknowledged Transactions (ACK)
112
Universal Serial Bus (USB)
An endpoint CTRL.SET_FIFO_EN bit provides the main control for the
endpoint ability to allow successful OUT transaction data reception for the
endpoint. If at the beginning of an OUT transaction to an endpoint, the endpoint
STAT_FLG.FIFO_EN bit is 1, the USB module is allowed to accept the OUT
transaction data to the RX FIFO, and, when the transaction completes, the
USB module can return ACK to the PC to indicate that the data was received
correctly (this is the top case shown in Figure 4). If, however, the endpoint
STAT_FLG.FIFO_EN bit was 0 at the beginning of an OUT transaction to the
endpoint, the USB module returns NAK during the handshake phase to
indicate that the endpoint did not accept the data (the second case shown in
Figure 4).
The USB host need not send a whole RX FIFO worth of data to the endpoint
during an OUT transaction. In this case, the RX FIFO is not full when the
endpoint RX interrupt is generated. The MPU code must be careful not to read
too much data. MPU code must read RXFSTAT.RXF_COUNT value before
reading data from the RX FIFO.
At the end of an USB OUT transaction to an endpoint where the data is
accepted (ACKed), the hardware clears the endpoint STAT_FLG.FIFO_EN
bit. Once the MPU software has dealt with the OUT transaction data in the
endpoint RX FIFO, it must re-enable the endpoint OUT transaction reception
by setting the endpoint CTRL.SET_FIFO_EN bit. MPU software can use the
endpoint CTRL.SET_FIFO_EN bit as a receive flow control mechanism.
At completion of an OUT transaction to an endpoint, the USB module issues
an endpoint-specific interrupt to the MPU and STAT_FLG is updated. In
response to the endpoint interrupt, the MPU must read EPN_STAT register to
identify the endpoint causing the interrupt, then write a 1 to the interrupt bit to
clear it. The MPU must then set EP_NUM.EP_NUM to the endpoint number
and EP_NUM.EP_SEL to 1, and then read the endpoint status from
STAT_FLG. STAT_FLG.ACK is set to indicate that the endpoint received a
transaction to which the USB module signaled ACK handshaking.
If STAT_FLG.FIFO_EMPTY is cleared, the transaction sent 1 or more bytes
of data (but less than or equal to the physical size of the endpoint RX FIFO),
and the data is in the endpoint RX FIFO. The MPU knows the number of bytes
to read from RX FIFO by reading RXFSTAT.RXF_COUNT value. The MPU
can then read RX data from DATA register. Once the MPU has read the data
from the FIFO, it sets the CTRL.SET_FIFO_EN bit to allow the next USB OUT
SPRU761A

Advertisement

Table of Contents
loading

Table of Contents