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?
|