Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > wPacketSize in the endpoint descriptor appears to be multiplied by MaxBurst by the USB3 API

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



wPacketSize in the endpoint descriptor appears to be multiplied by MaxBurst by the USB3 API
Moderator:
RSKV

Post Reply
Follow this topic



wPacketSize in the endpoint descriptor appears to be multiplied by MaxBurst by the USB3 API

dtromp_nl posted on 03 Apr 2012 2:58 AM PST
Senior Member
11 Forum Posts

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?

 




Re: wPacketSize in the endpoint descriptor appears to be multiplied by MaxBurst by the USB3 API

dtromp_nl posted on 03 Apr 2012 03:12 AM PST
Senior Member
11 Forum Posts

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)

 



Re: wPacketSize in the endpoint descriptor appears to be multiplied by MaxBurst by the USB3 API

IRod posted on 04 Apr 2012 06:30 AM PST
Senior Member
11 Forum Posts

 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,



Re: wPacketSize in the endpoint descriptor appears to be multiplied by MaxBurst by the USB3 API

MadMax_805 posted on 13 Apr 2012 10:05 AM PST
Member
10 Forum Posts

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?



Re: wPacketSize in the endpoint descriptor appears to be multiplied by MaxBurst by the USB3 API

MadMax_805 posted on 13 Apr 2012 12:37 PM PST
Member
10 Forum Posts

 Changing the endpoint to 3 or 7 will fix the problem. Only endpoints 3 and 7 support multiple burst, Mult > 0.



Re: wPacketSize in the endpoint descriptor appears to be multiplied by MaxBurst by the USB3 API

pj24 posted on 13 Aug 2012 06:32 AM PST

1 Forum Post

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?

 

 






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.