You're forgotten how many bits make up a PID field already? Well don't be tooĪlarmed. So by now we should know the sort of things which make up a USB packet.
Which provide a capability or function such as a Printer, Zip Drive, Scanner, Therefore makes references to USB functions which can be seen as USB devices Hub or Host Controller IC device, or a USB peripheral device. When we think of a USB device, we think of a USB peripheral, but a USB deviceĬould mean a USB transceiver device used at the host or peripheral, a USB
± 500ns on a full speed bus or every 125 µs The SOF packet consisting of an 11-bit frame number is sent by the host every 1ms Handshake Packets have the following format,
Out - Informs the USB device that the host wishes to send information.In - Informs the USB device that the host wishes to read information.Token packets indicate the type of transaction to follow, data packets contain the payload, handshake packets are used for acknowledging data or reporting errors and start of frame packets indicate the start of a new frame. Signalled by a Single Ended Zero (SE0) for approximately 2 bit times followed by a J for 1 bit time. All token packets have a 5 bit CRC while data packets have a 16 bit CRC.Įnd of packet. (4 endpoints max)Ĭyclic Redundancy Checks are performed on the data within the packet payload. Have 2 additional endpoints on top of the default pipe. The endpoint field is made up of 4 bits, allowing 16 possible endpoints. Address 0 is not valid, as any device which is not yet assigned an address must respond to packets sent to address zero. Being 7 bits in length allows for 127 devices to be supported.
The address field specifies which device the packet is designated for. There are 4 bits to the PID, however to insure it is received correctly, the 4 bits are complemented and repeated, making an 8 bit PID in total. The following table shows the possible values. This field is used to identify the type of packet that is being sent. The last two bits indicate where the PID fields starts. The sync field is 8 bits long at low and full speed orģ2 bits long for high speed and is used to synchronise the clock of the receiver with that of the USB packets consist of the following fields,Īll packets must start with a sync field. Successfully, or if the endpoint is stalled or not available to accept data.ĭata on the USBus is transmitted LSBit first. The next packet is generally a data packetĬarrying the payload and is followed by an handshaking packet, reporting if the data or token was received Read or write and what the device’s address and designated endpoint is. The first packet,Īlso called a token is generated by the host to describe what is to follow and whether the data transaction will be a Status Packet (Used to acknowledge transactions and to provide a means of error correction)Īs we have already discussed, USB is a host centric bus.
Unlike RS-232 and similar serial interfaces where the format of data being sent is not defined, USB is made up of