What is a USB Transaction?

USB



In this article, we explain what a USB transaction is and the purpose of a transaction.

A USB transaction is a fully completed data exchange between a USB host and a USB device.

A USB transaction, in other words, is all the data that is required in order for a host and device to communicate with each other.

You definitely know that in order for two devices to exchange data, you have to send the data itself that you want exchanged.

However, when dealing with sending data with a USB, the data alone is not the only thing that can be sent for data exchange to occur.

The data itself would be sent in the data packet.

However, there must also be a token packet.

The token packet can establish whether the the host transmits the data to the device or the device transmits data to the host. There are also other features can be used depending on the transfer type used with the USB data transfer, but this is the basics.

Also, there is a handshake packet, which functions to serve as error checking. This is a packet that isn't sent by the transmitting device but is received by the transmitting device from the receiving device to confirm that the data was received without error.

So a USB transaction consists of a sequence of 3 (or 2) packets: the token packet, the data packet, and the handshake packet (isochronous transfer does not use error checking).

So the key to understand about USB transactions are they are the requirement in order to have data exchange between a USB host and a USB device.

The data itself (in the data packet) cannot be sent alone for data exchange to occur.

There must also be a token package specifying whether the data is coming into the USB host from the USB device or going out from the USB host to the USB device.

The transmitting device also must receive confirmation of an ACK value from the receiving device in the handshake packet in order to confirm that the data was received without error (this occurs in all USB transfer types except isochronous transfer which require no error checking).

So this is what a USB transaction and its vital purpose in data exchange for the USB communication protocol.



Related Resources





HTML Comment Box is loading comments...