Universal Serial Bus (USB) Interface
USB Basics
USB08 Evaluation Board Designer Reference Manual
MOTOROLA Universal Serial Bus (USB) Interface 63
A USB transaction is a series of packets to transmit information between
a host and a device. A transaction is always initiated by sending a token
packet (SETUP, IN, or OUT). This packet is always sent by the host
because devices cannot initiate a USB transaction. The token packet
contains the address and the desired endpoint of the device.
SETUP and OUT packets are supplemented by a DATA packet from the
host, which contains up to eight bytes of data. The packets DATA0 and
DATA1 are always sent in an alternating sequence. This procedure is
called data toggle and serves for error protection. Following the data
packet, the device answers with a handshake packet. If the device coul d
receive the data, it sends an ACK packet. If the device was not
immediately ready, it sends a NAK packet signalling to the host that the
packet should be sent again at a later time. In the event of an error, the
device sends a STALL packet.
SETUP Transaction
OUT Transaction
Regarding IN transactions, the data packet is sent by the device and the
host closes the transaction with a handshake packet.
IN Transaction
Host Host Device
SETUP (ADDR,EP) DATA0 (D1..D8) ACK
Host Host Device
OUT (ADDR,EP) DATA0 (D1..D8) ACK
Host Device Host
IN (ADDR,EP) DATA0 (D1..D8) ACK