- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to reconfigure the descriptors in the USBIsoSourceSink example because I want to increase the throughput in isochronous mode.
The isochronous throughput depends on
service interval = 1 (default) = each 125uS
maxpacketsize = 0x400 (default) = refer to USB spec, must be on 1024 for isochronous when we are going to set bMaxBurst (and we are)
bMaxBurst = MaxBurst -1, MaxBurst: The number of packets the endpoint can send or receive as part of a burst (range 1 - 16)
bmAttributes.mult = BurstMult -1, BurstMult: The number of bursts in the service interval (range 1 - 3 for isochronous)
This all combined leads to a value for wBytesPerinterval
In the USBIsoSourceSink example I changed the define CY_FX_EP_BURST_LENGTH from 1 to 2 to set the MaxBurst value in the endpoint descriptors. Ignoring the wBytesPerinterval (both ignoring and not ignoring this leads to the same results), I have trouble increasing the throughput and experience crashes of the driver.
What I observe is that it appears the API multiplies the wMaxPacketSize with the MaxBurst value
********** A **************
Original (decoded by USB Control Center / API):
CY_FX_EP_BURST_LENGTH = 1
<ENDPOINT>
Type="ISOC"
Direction="OUT"
Address="01h"
Attributes="01h"
MaxPktSize="1024" <<<<<<<<<< expected
DescriptorType="5"
DescriptorLength="7"
Interval="1"
<SUPER SPEED ENDPOINT COMPANION>
Type="SUPERSPEED_USB_ENDPOINT_COMPANION"
bMaxBurst="0" <<<<<<<<<<
Attributes="00h"
BytesPerInterval="400h"
</ENDPOINT>
********** B ***********
After changing MaxBurst from 1 to 2 (Note bMaxBurst = MaxBurst -1 = 1):
CY_FX_EP_BURST_LENGTH = 2
<ENDPOINT>
Type="ISOC"
Direction="OUT"
Address="01h"
Attributes="01h"
MaxPktSize="2048" <<<< multiplied by 2 (not expected)
DescriptorType="5"
DescriptorLength="7"
Interval="1"
<SUPER SPEED ENDPOINT COMPANION>
Type="SUPERSPEED_USB_ENDPOINT_COMPANION"
bMaxBurst="1" <<<<
Attributes="00h"
BytesPerInterval="400h"
</ENDPOINT>
Observation: MaxPktSize appears to be multiplied by MaxBurst
********** C ************
As a reference the decoding descriptor by "Thesycon USB Descriptor Dumper":
CY_FX_EP_BURST_LENGTH = 2
Endpoint Descriptor:
------------------------------
Value Valuename
0x07 bLength
0x05 bDescriptorType
0x01 bEndpointAddress (Out-Endpoint)
0x01 bmAttributes
Transfer Type: Isochronous-Transfer
Synchronization Type: None
Usage Type: Data
0x0400 wMaxPacketSize (1024 Bytes) <<<<< still 1024 (expected)
0x01 bInterval
Hex dump:
0x07 0x05 0x01 0x01 0x00 0x04 0x01
SuperSpeed Endpoint Companion Descriptor:
------------------------------
Value Valuename
0x06 bLength
0x30 bDescriptorType
0x01 bMaxBurst (2 packet(s)) <<<<
0x00 bmAttributes
0x0400 wBytesPerInterval (1024 Bytes)
observation: the wMaxPacketSize is reported unchanged and is 1024 bytes as specified by the firmware
********** D ************
After changing MaxBurst from 1 to 8 (Note bMaxBurst = MaxBurst -1 = 7):
CY_FX_EP_BURST_LENGTH = 8
<ENDPOINT>
Type="ISOC"
Direction="OUT"
Address="01h"
Attributes="01h"
MaxPktSize="8192" <<<< multiplied by 8 (not expected)
DescriptorType="5"
DescriptorLength="7"
Interval="1"
<SUPER SPEED ENDPOINT COMPANION>
Type="SUPERSPEED_USB_ENDPOINT_COMPANION"
MaxBurst="7" <<<<<
Attributes="00h"
BytesPerInterval="400h"
</ENDPOINT>
Observation: MaxPktSize appears to be multiplied by MaxBurst
********** E *************
As a reference the decoding descriptor by "Thesycon USB Descriptor Dumper":
CY_FX_EP_BURST_LENGTH = 8
Endpoint Descriptor:
------------------------------
Value Valuename
0x07 bLength
0x05 bDescriptorType
0x01 bEndpointAddress (Out-Endpoint)
0x01 bmAttributes
Transfer Type: Isochronous-Transfer
Synchronization Type: None
Usage Type: Data
0x0400 wMaxPacketSize (1024 Bytes) <<<<< expected
0x01 bInterval
Hex dump:
0x07 0x05 0x01 0x01 0x00 0x04 0x01
SuperSpeed Endpoint Companion Descriptor:
------------------------------
Value Valuename
0x06 bLength
0x30 bDescriptorType
0x07 bMaxBurst (8 packet(s)) <<<<<
0x00 bmAttributes
0x0400 wBytesPerInterval (1024 Bytes)
observation: the wMaxPacketSize is reported unchanged and is 1024 bytes as specified by the firmware
*********** F *************
So it appears the API multiplies the wMaxPacketSize with the MaxBurst value. Is this correct behaviour?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
note: changing the BurstMult value influences the reported maxpacketsize as well:
so the API reported maxpacketsize = wMaxPacketSize * MaxBurst * BurstMult
test: Specifying MaxBurst =3 and BurstMult = 3
****** A ****************
Dump from USB Control Center (= API)
<ENDPOINT>
Type="ISOC"
Direction="OUT"
Address="01h"
Attributes="01h"
MaxPktSize="9216" <<< = 1024 * 3 * 3
DescriptorType="5"
DescriptorLength="7"
Interval="1"
<SUPER SPEED ENDPOINT COMPANION>
Type="SUPERSPEED_USB_ENDPOINT_COMPANION"
bMaxBurst="2" <<<< MaxBurst = 3
Attributes="02h" <<<< BurstMult = 3
BytesPerInterval="400h"
</ENDPOINT>
****** B ****************
reference dump:
Endpoint Descriptor:
------------------------------
Value Valuename
0x07 bLength
0x05 bDescriptorType
0x01 bEndpointAddress (Out-Endpoint)
0x01 bmAttributes
Transfer Type: Isochronous-Transfer
Synchronization Type: None
Usage Type: Data
0x0400 wMaxPacketSize (1024 Bytes) <<< Expected
0x01 bInterval
Hex dump:
0x07 0x05 0x01 0x01 0x00 0x04 0x01
SuperSpeed Endpoint Companion Descriptor:
------------------------------
Value Valuename
0x06 bLength
0x30 bDescriptorType
0x02 bMaxBurst (3 packet(s)) <<<<<<
0x02 bmAttributes <<<<<<
0x0400 wBytesPerInterval (1024 Bytes)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
maxpacketsize is calculated as you said. It is, maxpacketsize = 1024*(bMaxBurst+1)*(Mult+1). You can see it in the USB3.0 specification document.
Regarding your problem, I'm running into the same. Particularly, I realized that when
maxpacketsize > 15360 the driver crashes, no matter whether this size is got increasing bMaxBurst or Mult. I tried changing bInterval but driver crashes anyway.
My host controller is Renesas. Does anybody know what is going wrong?.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was having the same problem. I was receiving this error "CyU3PSetEpConfig failed, Error code = 77" and sometimes "...Error code 64" any idea what this error code means? or better yet where I can find definitions for such codes? The code is an apiRetStatus.
Using a Burst Length of 16, Mult value of 3, and Bytes per Interval of 0x0C00 (which is the Max reservable bandwidth for Iso) I don't get the error anymore but when I load the firmware I get a "USB Controller Bandwidth Exceeded" I have the FX3 connected to a Asus PCIE USB3 card with two port I'm only using one, I'll be trying it on pc/laptop with a built in USB 3.0 port today. I also unplugged all unecessary usb peripherals all I'm using is mouse keyboad and Fx3. The device also doesn't show up on the Cypress USB Control Center, any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Changing the endpoint to 3 or 7 will fix the problem. Only endpoints 3 and 7 support multiple burst, Mult > 0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I too get the error "USB Controller Bandwidth Exceeded" as soon as the product of (Mult value * Burst Length) exceeds 16 for an isochronous IN transfer.
Bytes per Interval is set to (Mutl value * Burst Length * 1024)
I am using a renesas USB 3.0 Controller with Driver Version 2.1.28.0.
I am using Endpoint number 0x83 on the FX3, which should support that, but still get the error.
Is this an issue with the renesas driver? Whould using an other controller help?