USB Transactions
13-52
13.3 USB Transactions
There is an interrupt to the local host at the end of a USB transaction if the local
host has actions to perform. Isochronous transactions are an exception,
because isochronous interrupt information is available at start of frame inter-
rupts. The local host ISR code determines which endpoint and direction
caused the interrupt and acts appropriately. The following sections describe
in detail the activities surrounding USB transactions that are not part of a DMA
transfer. Cases where a transaction occurs before the previous one has been
handled by the local host are not taken into account in this section. The infor-
mation is organized so that each section deals with one type and direction of
transaction, such as non-isochronous, non-setup OUT transactions, non-
isochronous IN transactions, isochronous OUT transactions, isochronous IN
transactions, etc. This allows each section to focus only on a specific style of
transaction without adding in the confusion of special cases related to other
styles.
13.3.1 Non-Isochronous, Non-Setup OUT (USB HOST –> LH) Transactions
Non-isochronous, non-setup OUT transactions refer to USB transactions
where data is moved from the USB host to the local host and where the USB
handshaking protocols are in effect and data transmission is guaranteed.
These types of transactions apply to all OUT transactions on bulk and interrupt
endpoint types, and to non-setup transactions on control endpoints.
Figure 13–3 shows the various USB protocol conditions that can occur during
non-isochronous, non-setup OUT transactions. The diagram shows the three
phases that can occur in an OUT transaction, the direction of information flow
for each phase, when endpoint interrupts are generated, and the resulting
STAT_FLG bits for the endpoint. The top three cases show the normal USB
handshaking: ACK (good data received), NAK (device not ready to receive
data), and STALL (device in a condition where the endpoint cannot handle
OUT transactions). The last case shows an abnormal case where the token
packet or the data packet was received with errors. The RX FIFO only contains
valid receive data under the first, ACK, case.