24th: ISO transmission of Superspeed/highspeed USB

Source: Internet
Author: User
Tags data structures

The driver example for USB ISO transmission in the WDK 7600.16385.1 is for USB2.0 and USB1.1, which is HS and FS.

This example is not very special, but it is interesting to USB2.0 's ISO-transmitted data segmentation algorithm.


According to MSDN reference article: http://msdn.microsoft.com/en-us/library/windows/hardware/hh406225.aspx < USB2.0 ISO transmission needs to vary according to the interval value of ISO EP, first, as shown in the table below

Interval Polling period (2INTERVAL-1)
1 1; Data is transferred every bus interval.
2 2; Data is transferred every second bus interval.
3 4; Data is transferred every fourth bus interval.
4 8; Data is transferred every eighth bus interval.
For full speed, polling period has been a frame once.
Second, as the following table, for different polling period, the number of transmission packets is also limited: Number of Packets for high
Polling Periodspeed/superspeed
1 Multiple of 8
2 Multiple of 4
3 Multiple of 2
4 Any

Third, for a URB, the ISO packet limit of full speed:255 high/super speed:1024

Thus, there is an algorithm for the USB2.0 ISO transmission in the WDK 7600.16385.1: But before looking at this algorithm, we mentioned several concepts: 1. Bus interval full speed:1ms, frame, high/super speed: 125us, Microframe
2. The concept of USB packet in Windows packet represents the amount of data transferred in a bus interval. Its determinants are determined by the EP descriptor on the USB device side. For full speed, each bus interval (frame) transmits a packet, which corresponds to an ISO transaction high speed, and each bus interval (micro frame) can transmit up to 3*1024 's packet super speed, the expression of this capability is described by the EP Descriptor with the EP Companion Descriptor: Up to 3*16*1024/microframe
How to get an EP packet Size:maximumpacketsize member exists in two data structures: usbd_pipe_information and wdf_usb_pipe_information.


Sources of Maximumpacketsize:
For full SPEEC EP, maximumpacketsize from the EP descriptor Wmaxpacketsize low 11-bit High SPEED:EP descriptor Wmaxpacketsize 11th, 12-bit representation, "append" The number of transaction, can be 0, 1, 2 SUPER Speed:usb_superspeed_endpoint_companion_descriptor members played a role: Mult: Represents the number of additional busrt, can be 0 , the
The number of Bmaxburst:burst, which is a new concept for USB3.0, can be 0-15 (representing 1-16 burst)
Wbytesperinterval: Must be less than or equal to ( Bmaxburst+1) * ( Mult+1) * wmaxpacketsize
WbytesperintervalIndicates the total number of bytes then the host can send or receive in a bus interval. Even though the maximum number of bytes per bus interval can be calculated as ( Bmaxburst+1) * ( Mult+1) * wmaxpacketsizeThe USB 3.0 specification recommends using the WbytesperintervalValue instead. The WbytesperintervalValue must is less than or equal to that calculated value. In fact, SUPER Speed's maximumpacketsize is wbytesperinterval.
Since the Windows USB stack has helped the upper USB client driver set up the maximumpacketsize, it will present: Important for a client driver the values described in  The preceding is to information only. The driver must always use the Maximumpacketsize value of the endpoint descriptor to determine the layout of the transfer Buffer.
The so-called layout of the transfer buffer, which I understand, is how to split the buffer into one ISO packet.
The article appears: Please note: ISO packet can be less than maximumpacketsize, but in fact, if the ISO packet is less than maximumpacketsize, the problems listed later will appear. The Maximumpacketsize value indicates the maximum permitted size of the isochronous packet. The client driver can set the size of each isochronous packet to any value less than the Maximumpacketsize value.

Now look at this algorithm: first, the  windows Driver Kit (WDK) 8.1 Samples has removed this algorithm from the Usbsamp example, the new example code, as long as the discovery does not meet

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.