All Categories


Pages

The Type Of Data Field In The USB Packet

USB interface is a token-based bus protocol, and the PC host mastered all the master of the bus. In other words, all communication is done by the PC host to activate and execute. In addition, since USB does not consume any PC interrupt vector, DMA, or any input / output resource, it is necessary to pass a rigorous protocol to communicate with each other to perform the various commands. Of course, in the USB communication protocol, not only the token packet only, but also contains the data packets, handshake packets and special packets and so on. Therefore, we must first introduce the format of the various data fields in the USB packet type and describe it.

Different packet types, containing different numbers and morphological data fields. The specifications and structure of the various data fields are described in the following order. And through the composition of different forms of data fields, you can form the desired packet type.

The information contained in the packet is between 1 and 3 074 bytes. The first byte is always a packet identifier (PID) that defines the meaning of the remaining information bytes. And the last part of the packet is the end of the packet EOP (End-of-Packet) identifier.

However, it should be noted that the USB serial transmission is sent first LSB, and then sent in order, until the highest MSB so far, as shown in Figure 1. The meaning of PID [0: 3] and PID [0: 3] will be explained later.

Figure 1 packet format

First, introduce the first and the data fields that each packet contains: Synchronize the column data fields.

1. Synchronization Sequence (SYNC) data field

The SYNC field consists of 8 bits, which are used as a preamble for each data packet backup computer to usb drive generate synchronization and will start the PLL. Therefore, its value is fixed at: 00000001. This field can only be used for transmission when idle. The start of the packet is set by the bus transition from the J state to the K state. Most of the transfer process is driven by the transmitter at the next available bit time and used to generate a SYNC sequence. And the other end of the receiver can use this sequence, it received the clock and the received data transmission process, both to be reconciled, so you can ensure that the information part of the packet is received reliably. The SYNC sequence ends with 2 K states, and at the next bit time, the packet is passed.

In addition, if for high-speed transmission, SYNC sequence will be generated by the PC host, and which contains the 09-bit SYNC (KJ KJKJ ... KJKK). Although these SYNC sequences will consume several signals due to hub blocking, at least the 12-bit SYNC sequence can be received at the last end of the device. And this is enough to lock the received clock and is used to generate the PLL. However, for low-speed / full-speed devices, only 8-bit SYNC sequences are required.

2. Packet Identifier (PID) data field

The PID field follows the SYNC field and is used to indicate the type of data packet. The PID field consists of a 4-bit identifier column and a check bar that is complementary to each other. In Table 3 and 2, the types of packets are listed, which can be classified into four types: token, data, handshake, or special. These four types can be defined by PID [0: 1] 2 bits. In addition, in each packet type, you can also through the PID [2: 3] 2 bits to define a different packet format. For example, in the token packet, but also broken down into OUT, IN, SETUP and SOF 4 packet format. In this case, you can push the class to the rest of the packet type. However, in the 2.0 specification, a few additional packet identifiers, which, data packet type added DATA2 and DATA3 two packet identifiers.





About the Author

Parthenia

Got nothing backup computer to usb drive tell about myself at all.
Yes!
Im a part of this site.
I just hope Im useful at all


Most Viewed - All Categories