USB data transmission type

Source: Internet
Author: User

The USB data transmission type isDescription from the perspective of USB system software management. Transmission refers to one or more bus transactions for information transmission between the customer's software and its functional modules. The transmission type depends on the data flow between the customer software and its functional modules. USB defines four transmission types to meet the needs for different types of data transmission on the bus.

Example:

(Ensure data integrity) (Ensure Response Time)

Control Transmission

Control transmission is a transmission mode that is used by the USB system software to configure and control the device. Designers can also use this method as needed. Each USB device has a default control transmission channel (endpoint 0), which is used to receive control commands from the host USB system software.

A control transmission generally consists of three stages. First, in the setup phase, the host sends a setup transaction transmission command to the device, specifying the operations required by the host. The data stage is followed by several data transactions. The transmission direction and data content are defined by the setup package. This phase is unavailable if the setup package does not require data transaction transmission. The last is the state phase, which consists of a State transaction transmission, which is the status information returned by the device for successful transmission.

In control transmission, data transmission is bidirectional, that is, an endpoint 0 can receive and send data. There can be multiple data transactions in the data phase, but the data packets of each data transaction cannot be larger than the data payload ). For full-speed devices, the maximum data load is 8B, 16B, 32B, or 64b. For low-speed devices, the maximum is 8B. In the data phase, if the data packet of a Data transaction is smaller than the data effective load, the communication parties default that it is the last data transaction in the data phase, which determines how the data phase ends.

Control Transmission Batch Transfer

 

Batch Transmission

Batch transmission is mainly used when a large amount of data needs to be transmitted between the host and the device without synchronization. Only full-speed devices can perform batch transmission. Different from control transmission, it is unidirectional (that is, a certain endpoint can only accept or send data), and the format is not so strict. Similarly, the batch transmission mode also has valid data load rules, which can be 8B, 16B, 32B, or 64b. When the data packet of a Data transaction is less than the valid data load, the communication ends by default.

Depending on the number of bytes required for transmission, batch transmission can be composed of any data transaction. The Protocol stipulates that the PID of the data packet for the first data transaction of each batch transmission should be data0, followed by the inverse of data1/data0. Therefore, before a new batch transmission, the host should initialize the PID of the endpoint to be communicated to data0 through control transmission.

Interrupted transmission

Interrupt transmission is suitable for communications with a periodic but small amount of data. It is also unidirectional. General applications include the keyboard, mouse, and hub status table. The host periodically queries the device's endpoints and communicates with each other. If the transmission in the current cycle fails, the next cycle will be re-transmitted. It can be seen that the interrupted transmission can guarantee a certain amount of bandwidth. When an endpoint is determined to be transmitted in interrupted transmission mode, the system must determine its cycle and effective data load during configuration. The full-speed device period ranges from 1 ms to 255 ms, and the effective data load does not exceed 64 B. The low-speed period ranges from 10 ms to 255 ms, and the effective data load does not exceed 8B.

One interrupted transmission contains one or more input/output transactions. The transaction structure of each interrupted transmission is the same as that of batch transmission. what is different is that it is carried out periodically. The host queries the corresponding endpoint periodically only when the transmission is interrupted (that is, when the transmission is interrupted.

The interrupted transmission is more suitable for low-speed devices such as the mouse. The data packets of these devices are not large, and the frequency of new data generated by the device due to motion is not high. Therefore, the host can query data for a long period of time, this reduces the CPU usage time.

Synchronous Transmission

Synchronous transmission (or real-time transmission) is an important and special transmission mode of USB. When an endpoint is declared as a synchronous transmission endpoint, the USB system ensures that it has a fixed transmission rate, which makes it very suitable for audio devices requiring a certain transmission rate. Unlike other transmission modes, synchronous transmission does not fail/retry (failure/retry), so it cannot correct the error in transmission. Because the error code in the video compression code stream seriously affects image reconstruction, this transmission method cannot be applied to the video compression storage system. USB also provides effective data load for synchronous transmission, which is usually configured during device initialization. The USB protocol sets its valid data load to 0 ~ 1023b.

USB device category:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.