mcuee / libusbk

libusbk official github repo
79 stars 37 forks source link

Invalid: Lower performance for High Bandwidth High Speed Interrupt OUT Endpoint compare to Cypress Cyusb3 #48

Closed mcuee closed 1 year ago

mcuee commented 1 year ago

Speed from libusbK.

Idealy the speed should be 12MB/sec for the high bandwidth high speed Interrupt IN/OUT endpoint when bInterval = 2 (250us).

3072 B / 250 us = 120,288 Bytes/sec.

PS C:\libusbK-dev-kit_release> .\klist

Loading USB ID's maintained by Stephen J. Gowdy <linux.usb.ids@gmail.com>..

 1. EZ-USB (Cypress Semiconductor Corp.) [Connected]
    Service              : WinUSB
    ClassGUID            : {88BAE032-5A81-49F0-BC3D-A4FF138216D6}
    DeviceID             : USB\VID_04B4&PID_1004\6&8694159&0&3
    DeviceInterfaceGUID  : {B89F58FD-B8D4-D215-4D39-0CBD5FC94C6C}
    SymbolicLink         : \\?\usb#vid_04b4&pid_1004#6&8694159&0&3#{b89f58fd-b8d4-d215-4d39-0cbd5fc94c6c}
    DevicePath           : \\?\usb#vid_04b4&pid_1004#6&8694159&0&3#{b89f58fd-b8d4-d215-4d39-0cbd5fc94c6c}
    SerialNumber         : 6&8694159&0&3
    BusNumber            : 0
    DeviceAddress        : 3

Select device (1-1) :1

Loading driver api..
Getting descriptors..

-Device:
  bLength             :18
  bDescriptorType     :0x01
  bcdUSB              :0x0200
  bDeviceClass        :0x00 (Defined at Interface level)
  bDeviceSubClass     :0x00
  bDeviceProtocol     :0x00
  bMaxPacketSize0     :64
  idVendor            :0x04B4 (Cypress Semiconductor Corp.)
  idProduct           :0x1004
  bcdDevice           :0x0000
  iManufacturer       :1 (Cypress)
  iProduct            :2 (EZ-USB)
  iSerialNumber       :0
  bNumConfigurations  :1
!End Device
-Configuration:
  bLength             :9
  bDescriptorType     :0x02
  wTotalLength        :32
  bNumInterfaces      :1
  bConfigurationValue :0x01
  iConfiguration      :0
  bmAttributes        :0x80
  MaxPower            :50 (100ma)
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x00
    bNumEndpoints       :2
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x02
      bmAttributes        :0x03 (Interrupt)
      wMaxPacketSize      :1024 X 3 (3072 bytes)
      bInterval           :0x02
   !End Endpoint
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x86
      bmAttributes        :0x03 (Interrupt)
      wMaxPacketSize      :1024 X 3 (3072 bytes)
      bInterval           :0x02
   !End Interface
 !End Configuration
 -MSOSV1:
    bDescriptorType     :0x08
    bLength             :02
    bMS_VendorCode      :0x00
    qwSignature         :
 !End MSOSV1
PS C:\libusbK-dev-kit_release> .\kBench.exe list notestselect mode=async
device-count=1
1. EZ-USB (USB\VID_04B4&PID_1004\6&8694159&0&3) [WinUSB]
Select device (1-1) :1

opened EZ-USB (USB\VID_04B4&PID_1004\6&8694159&0&3)..
Loop Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 1004h
        DevicePath      : \\?\usb#vid_04b4&pid_1004#6&8694159&0&3#{b89f58fd-b8d4-d215-4d39-0cbd5fc94c6c}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 00h
        Num Endpoints   : 2
        Priority        : 0
        Read Size       : 4096
        Write Size      : 4096
        Buffer Count    : 1
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Interrupt Read (Ep86h) Maximum Packet Size: 3072
Interrupt Write (Ep02h) Maximum Packet Size: 3072

While the test is running:
Press 'Q' to quit
Press 'T' for test details
Press 'I' for status information
Press 'R' to reset averages

Press 'Q' to exit, any other key to begin..
Avg. Bytes/s: 10217361.02 Transfers: 6008 Bytes/s: 10217361.02
Avg. Bytes/s: 10220688.83 Transfers: 12070 Bytes/s: 10224672.79
Avg. Bytes/s: 10230490.22 Transfers: 18076 Bytes/s: 10250240.00
Avg. Bytes/s: 10235536.74 Transfers: 24083 Bytes/s: 10250752.00
Avg. Bytes/s: 10237243.47 Transfers: 30084 Bytes/s: 10244096.00
Avg. Bytes/s: 10213852.43 Transfers: 36095 Bytes/s: 10098393.70
Avg. Bytes/s: 10237089.84 Transfers: 42100 Bytes/s: 10379413.85
Avg. Bytes/s: 10242299.69 Transfers: 48105 Bytes/s: 10279478.11
Avg. Bytes/s: 10225146.27 Transfers: 54113 Bytes/s: 10089826.77
Avg. Bytes/s: 10240310.16 Transfers: 60118 Bytes/s: 10379413.85
Avg. Bytes/s: 10238514.73 Transfers: 66182 Bytes/s: 10221189.04
Avg. Bytes/s: 10233624.97 Transfers: 72244 Bytes/s: 10180535.43
Avg. Bytes/s: 10234192.07 Transfers: 78246 Bytes/s: 10241024.00
Avg. Bytes/s: 10235042.93 Transfers: 84251 Bytes/s: 10246144.00
Avg. Bytes/s: 10235678.61 Transfers: 90253 Bytes/s: 10244608.00
Avg. Bytes/s: 10235245.96 Transfers: 96252 Bytes/s: 10228736.00
Avg. Bytes/s: 10236155.57 Transfers: 102259 Bytes/s: 10250752.00
Avg. Bytes/s: 10236879.26 Transfers: 108263 Bytes/s: 10249216.00
Avg. Bytes/s: 10235380.72 Transfers: 114315 Bytes/s: 10208982.38
Avg. Bytes/s: 10235125.51 Transfers: 120321 Bytes/s: 10230718.42
Avg. Bytes/s: 10240170.16 Transfers: 126379 Bytes/s: 10341376.00
waiting for Ep86h thread..
stopped Ep86h thread.   ExitCode=0
stopped Ep02h thread.   ExitCode=0
Loop Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 1004h
        DevicePath      : \\?\usb#vid_04b4&pid_1004#6&8694159&0&3#{b89f58fd-b8d4-d215-4d39-0cbd5fc94c6c}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 00h
        Num Endpoints   : 2
        Priority        : 0
        Read Size       : 4096
        Write Size      : 4096
        Buffer Count    : 1
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Interrupt Read (Ep86h) Maximum Packet Size: 3072
        Total Bytes     : 45186048
        Total Transfers : 88254
        Avg. Bytes/sec  : 2046654.95
        Elapsed Time    : 22.08 seconds

Interrupt Write (Ep02h) Maximum Packet Size: 3072
        Total Bytes     : 180736000
        Total Transfers : 44125
        Avg. Bytes/sec  : 8186248.75
        Elapsed Time    : 22.08 seconds

Press any key to exit..

FW source codes -- minor modifiction from Cypress BulkSrcSink to use Interrupt Endpoint.

Take note WIndows will not be able to enumerate the device if bInterval = 1 for both Interrupt IN/OUT endpoint in this case.

Int_src_3072.zip

mcuee commented 1 year ago

1) Interrupt OUT Endpoint Speed when bInterval = 1 (125us).

PS C:\libusbK-dev-kit_release> .\kBench.exe list notestselect mode=async write
device-count=1
1. EZ-USB (USB\VID_04B4&PID_1004\6&8694159&0&3) [WinUSB]
Select device (1-1) :1

opened EZ-USB (USB\VID_04B4&PID_1004\6&8694159&0&3)..
Write Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 1004h
        DevicePath      : \\?\usb#vid_04b4&pid_1004#6&8694159&0&3#{b89f58fd-b8d4-d215-4d39-0cbd5fc94c6c}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 00h
        Num Endpoints   : 2
        Priority        : 0
        Read Size       : 4096
        Write Size      : 4096
        Buffer Count    : 1
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Interrupt Write (Ep02h) Maximum Packet Size: 3072

While the test is running:
Press 'Q' to quit
Press 'T' for test details
Press 'I' for status information
Press 'R' to reset averages

Press 'Q' to exit, any other key to begin..
Avg. Bytes/s: 6506834.65 Transfers: 1614 Bytes/s: 6506834.65
Avg. Bytes/s: 6584888.89 Transfers: 3241 Bytes/s: 6664192.00
Avg. Bytes/s: 6933050.40 Transfers: 5105 Bytes/s: 7634944.00
Avg. Bytes/s: 7441338.65 Transfers: 7296 Bytes/s: 8974336.00
Avg. Bytes/s: 8138105.26 Transfers: 9966 Bytes/s: 10936320.00
Avg. Bytes/s: 7910127.66 Transfers: 11618 Bytes/s: 6766592.00
Avg. Bytes/s: 7738183.47 Transfers: 13283 Bytes/s: 6719054.19
Avg. Bytes/s: 7595949.79 Transfers: 14923 Bytes/s: 6611653.54
Avg. Bytes/s: 7735631.26 Transfers: 17086 Bytes/s: 8859648.00
Avg. Bytes/s: 7819376.93 Transfers: 19180 Bytes/s: 8577024.00
Avg. Bytes/s: 7744005.79 Transfers: 20916 Bytes/s: 6998677.17
Avg. Bytes/s: 7701619.47 Transfers: 22710 Bytes/s: 7239629.56
Avg. Bytes/s: 7640766.13 Transfers: 24368 Bytes/s: 6894586.80
Avg. Bytes/s: 7861771.27 Transfers: 27021 Bytes/s: 10706096.55
Avg. Bytes/s: 7854605.65 Transfers: 28914 Bytes/s: 7753728.00
Avg. Bytes/s: 7878138.08 Transfers: 30924 Bytes/s: 8232960.00
stopped Ep02h thread.   ExitCode=0
Write Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 1004h
        DevicePath      : \\?\usb#vid_04b4&pid_1004#6&8694159&0&3#{b89f58fd-b8d4-d215-4d39-0cbd5fc94c6c}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 00h
        Num Endpoints   : 2
        Priority        : 0
        Read Size       : 4096
        Write Size      : 4096
        Buffer Count    : 1
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Interrupt Write (Ep02h) Maximum Packet Size: 3072
        Total Bytes     : 135417856
        Total Transfers : 33061
        Avg. Bytes/sec  : 7921952.50
        Elapsed Time    : 17.09 seconds

Press any key to exit..

Cypress CyStream Utility

Higher Speed for the OUT endpoint: 24000 KB/sec is the expected when bInterval = 1 Screenshot 2023-05-20 213900

2) Interrupt IN Endpoint Speed when bInterval = 1 (125us)

PS C:\libusbK-dev-kit_release> .\kBench.exe list notestselect mode=async read
device-count=1
1. EZ-USB (USB\VID_04B4&PID_1004\6&8694159&0&3) [WinUSB]
Select device (1-1) :1

opened EZ-USB (USB\VID_04B4&PID_1004\6&8694159&0&3)..
Read Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 1004h
        DevicePath      : \\?\usb#vid_04b4&pid_1004#6&8694159&0&3#{b89f58fd-b8d4-d215-4d39-0cbd5fc94c6c}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 00h
        Num Endpoints   : 2
        Priority        : 0
        Read Size       : 4096
        Write Size      : 4096
        Buffer Count    : 1
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Interrupt Read (Ep86h) Maximum Packet Size: 3072

While the test is running:
Press 'Q' to quit
Press 'T' for test details
Press 'I' for status information
Press 'R' to reset averages

Press 'Q' to exit, any other key to begin..
Avg. Bytes/s: 4118373.98 Transfers: 7915 Bytes/s: 4118373.98
Avg. Bytes/s: 3969969.23 Transfers: 15624 Bytes/s: 3828329.78
Avg. Bytes/s: 4007185.41 Transfers: 23597 Bytes/s: 4082176.00
Avg. Bytes/s: 4016298.88 Transfers: 31495 Bytes/s: 4043776.00
Avg. Bytes/s: 3968992.25 Transfers: 39000 Bytes/s: 3782047.24
Avg. Bytes/s: 3844572.94 Transfers: 45399 Bytes/s: 3227869.95
Avg. Bytes/s: 3821397.67 Transfers: 52589 Bytes/s: 3681280.00
Avg. Bytes/s: 3808437.48 Transfers: 59849 Bytes/s: 3717120.00
Avg. Bytes/s: 3812322.79 Transfers: 67356 Bytes/s: 3843584.00
Avg. Bytes/s: 3774002.78 Transfers: 74168 Bytes/s: 3432818.90
Avg. Bytes/s: 3770480.56 Transfers: 81463 Bytes/s: 3735040.00
Avg. Bytes/s: 3744026.53 Transfers: 88204 Bytes/s: 3451392.00
Avg. Bytes/s: 3680739.86 Transfers: 93902 Bytes/s: 2917376.00
Avg. Bytes/s: 3660643.44 Transfers: 100539 Bytes/s: 3398144.00
Avg. Bytes/s: 3586682.58 Transfers: 105625 Bytes/s: 2563023.62
Avg. Bytes/s: 3589318.07 Transfers: 112713 Bytes/s: 3629056.00
stopped Ep86h thread.   ExitCode=0
Read Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 1004h
        DevicePath      : \\?\usb#vid_04b4&pid_1004#6&8694159&0&3#{b89f58fd-b8d4-d215-4d39-0cbd5fc94c6c}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 00h
        Num Endpoints   : 2
        Priority        : 0
        Read Size       : 4096
        Write Size      : 4096
        Buffer Count    : 1
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Interrupt Read (Ep86h) Maximum Packet Size: 3072
        Total Bytes     : 60808704
        Total Transfers : 118767
        Avg. Bytes/sec  : 3557520.86
        Elapsed Time    : 17.09 seconds

Press any key to exit..

Same not good speed for the IN endpoint, even with bInterval = 1. Screenshot 2023-05-20 214256 Int_src_3072_mod1.zip Int_src_3072_mod.zip

mcuee commented 1 year ago

Increase the buffersize and buffercount will help.

PS C:\libusbK-dev-kit_release> .\klist

Loading USB ID's maintained by Stephen J. Gowdy <linux.usb.ids@gmail.com>..

 1. EZ-USB (Cypress Semiconductor Corp.) [Connected]
    Service              : WinUSB
    ClassGUID            : {88BAE032-5A81-49F0-BC3D-A4FF138216D6}
    DeviceID             : USB\VID_04B4&PID_1004\5&586B51A&0&1
    DeviceInterfaceGUID  : {B89F58FD-B8D4-D215-4D39-0CBD5FC94C6C}
    SymbolicLink         : \\?\usb#vid_04b4&pid_1004#5&586b51a&0&1#{b89f58fd-b8d4-d215-4d39-0cbd5fc94c6c}
    DevicePath           : \\?\usb#vid_04b4&pid_1004#5&586b51a&0&1#{b89f58fd-b8d4-d215-4d39-0cbd5fc94c6c}
    SerialNumber         : 5&586B51A&0&1
    BusNumber            : 0
    DeviceAddress        : 1

Select device (1-1) :1

Loading driver api..
Getting descriptors..

-Device:
  bLength             :18
  bDescriptorType     :0x01
  bcdUSB              :0x0200
  bDeviceClass        :0x00 (Defined at Interface level)
  bDeviceSubClass     :0x00
  bDeviceProtocol     :0x00
  bMaxPacketSize0     :64
  idVendor            :0x04B4 (Cypress Semiconductor Corp.)
  idProduct           :0x1004
  bcdDevice           :0x0000
  iManufacturer       :1 (Cypress)
  iProduct            :2 (EZ-USB)
  iSerialNumber       :0
  bNumConfigurations  :1
!End Device
-Configuration:
  bLength             :9
  bDescriptorType     :0x02
  wTotalLength        :32
  bNumInterfaces      :1
  bConfigurationValue :0x01
  iConfiguration      :0
  bmAttributes        :0x80
  MaxPower            :50 (100ma)
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x00
    bNumEndpoints       :2
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x02
      bmAttributes        :0x03 (Interrupt)
      wMaxPacketSize      :1024 X 3 (3072 bytes)
      bInterval           :0x01
   !End Endpoint
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x86
      bmAttributes        :0x03 (Interrupt)
      wMaxPacketSize      :1024 X 3 (3072 bytes)
      bInterval           :0x04
   !End Interface
 !End Configuration
 -MSOSV1:
    bDescriptorType     :0x08
    bLength             :02
    bMS_VendorCode      :0x00
    qwSignature         :
 !End MSOSV1

PS C:\libusbK-dev-kit_release> .\kBench.exe list mode=async write notestselect buffersize=196608 buffercount=8
device-count=1
1. EZ-USB (USB\VID_04B4&PID_1004\5&586B51A&0&1) [WinUSB]
Select device (1-1) :1

opened EZ-USB (USB\VID_04B4&PID_1004\5&586B51A&0&1)..
Write Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 1004h
        DevicePath      : \\?\usb#vid_04b4&pid_1004#5&586b51a&0&1#{b89f58fd-b8d4-d215-4d39-0cbd5fc94c6c}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 00h
        Num Endpoints   : 2
        Priority        : 0
        Read Size       : 196608
        Write Size      : 196608
        Buffer Count    : 8
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Interrupt Write (Ep02h) Maximum Packet Size: 3072

While the test is running:
Press 'Q' to quit
Press 'T' for test details
Press 'I' for status information
Press 'R' to reset averages

Press 'Q' to exit, any other key to begin..
Avg. Bytes/s: 23560462.81 Transfers: 116 Bytes/s: 23560462.81
Avg. Bytes/s: 23386838.71 Transfers: 236 Bytes/s: 23221417.32
Avg. Bytes/s: 23390026.81 Transfers: 355 Bytes/s: 23396352.00
Avg. Bytes/s: 23347200.00 Transfers: 475 Bytes/s: 23221417.32
Avg. Bytes/s: 23326372.88 Transfers: 595 Bytes/s: 23244295.57
Avg. Bytes/s: 23370693.27 Transfers: 715 Bytes/s: 23592960.00
Avg. Bytes/s: 23349122.46 Transfers: 835 Bytes/s: 23221417.32
Avg. Bytes/s: 23355003.36 Transfers: 954 Bytes/s: 23396352.00
Avg. Bytes/s: 23361733.17 Transfers: 1075 Bytes/s: 23414929.13
Avg. Bytes/s: 23369426.36 Transfers: 1196 Bytes/s: 23437998.03
Avg. Bytes/s: 23389633.70 Transfers: 1316 Bytes/s: 23592960.00
Avg. Bytes/s: 23359205.17 Transfers: 1435 Bytes/s: 23027905.51
Avg. Bytes/s: 23377079.06 Transfers: 1555 Bytes/s: 23592960.00
Avg. Bytes/s: 23392413.70 Transfers: 1675 Bytes/s: 23592960.00
Avg. Bytes/s: 23382452.79 Transfers: 1795 Bytes/s: 23244295.57
Avg. Bytes/s: 23395533.46 Transfers: 1915 Bytes/s: 23592960.00
Avg. Bytes/s: 23385193.76 Transfers: 2035 Bytes/s: 23221417.32
Avg. Bytes/s: 23376013.24 Transfers: 2155 Bytes/s: 23221417.32
Avg. Bytes/s: 23377076.71 Transfers: 2274 Bytes/s: 23396352.00
Avg. Bytes/s: 23387803.83 Transfers: 2394 Bytes/s: 23592960.00
Avg. Bytes/s: 23380913.53 Transfers: 2514 Bytes/s: 23244295.57
Avg. Bytes/s: 23390491.06 Transfers: 2634 Bytes/s: 23592960.00
waiting for Ep02h thread..
stopped Ep02h thread.   ExitCode=0
Write Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 1004h
        DevicePath      : \\?\usb#vid_04b4&pid_1004#5&586b51a&0&1#{b89f58fd-b8d4-d215-4d39-0cbd5fc94c6c}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 00h
        Num Endpoints   : 2
        Priority        : 0
        Read Size       : 196608
        Write Size      : 196608
        Buffer Count    : 8
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Interrupt Write (Ep02h) Maximum Packet Size: 3072
        Total Bytes     : 518062080
        Total Transfers : 2635
        Avg. Bytes/sec  : 23382473.37
        Elapsed Time    : 22.16 seconds

Press any key to exit..
mcuee commented 1 year ago

The Interrupt IN endpoint performance may be limited by the FW, so that both Cyusb and libusbK can not reach the expected results.

PS C:\libusbK-dev-kit_release> .\klist

Loading USB ID's maintained by Stephen J. Gowdy <linux.usb.ids@gmail.com>..

 1. EZ-USB (Cypress Semiconductor Corp.) [Connected]
    Service              : libusbK
    ClassGUID            : {ECFB0CFD-74C4-4F52-BBF7-343461CD72AC}
    DeviceID             : USB\VID_04B4&PID_1004\5&586B51A&0&1
    DeviceInterfaceGUID  : {DFAD334C-E1DA-12D4-816C-F6A425B3C58C}
    SymbolicLink         : \\?\usb#vid_04b4&pid_1004#5&586b51a&0&1#{dfad334c-e1da-12d4-816c-f6a425b3c58c}
    DevicePath           : \\?\usb#vid_04b4&pid_1004#5&586b51a&0&1#{dfad334c-e1da-12d4-816c-f6a425b3c58c}
    SerialNumber         : 5&586B51A&0&1
    BusNumber            : 0
    DeviceAddress        : 1

Select device (1-1) :1

Loading driver api..
Getting descriptors..

-Device:
  bLength             :18
  bDescriptorType     :0x01
  bcdUSB              :0x0200
  bDeviceClass        :0x00 (Defined at Interface level)
  bDeviceSubClass     :0x00
  bDeviceProtocol     :0x00
  bMaxPacketSize0     :64
  idVendor            :0x04B4 (Cypress Semiconductor Corp.)
  idProduct           :0x1004
  bcdDevice           :0x0000
  iManufacturer       :1 (Cypress)
  iProduct            :2 (EZ-USB)
  iSerialNumber       :0
  bNumConfigurations  :1
!End Device
-Configuration:
  bLength             :9
  bDescriptorType     :0x02
  wTotalLength        :32
  bNumInterfaces      :1
  bConfigurationValue :0x01
  iConfiguration      :0
  bmAttributes        :0x80
  MaxPower            :50 (100ma)
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x00
    bNumEndpoints       :2
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x02
      bmAttributes        :0x03 (Interrupt)
      wMaxPacketSize      :1024 X 3 (3072 bytes)
      bInterval           :0x04
   !End Endpoint
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x86
      bmAttributes        :0x03 (Interrupt)
      wMaxPacketSize      :1024 X 3 (3072 bytes)
      bInterval           :0x01
   !End Interface
 !End Configuration
 -MSOSV1:
    bDescriptorType     :0x08
    bLength             :02
    bMS_VendorCode      :0x00
    qwSignature         :
 !End MSOSV1
PS C:\libusbK-dev-kit_release> .\kBench.exe list mode=async read notestselect buffersize=3072 buffercount=8
device-count=1
1. EZ-USB (USB\VID_04B4&PID_1004\5&586B51A&0&1) [libusbK]
Select device (1-1) :1

opened EZ-USB (USB\VID_04B4&PID_1004\5&586B51A&0&1)..
Read Test Information
        Driver          : libusbK
        Vid / Pid       : 04B4h / 1004h
        DevicePath      : \\?\usb#vid_04b4&pid_1004#5&586b51a&0&1#{dfad334c-e1da-12d4-816c-f6a425b3c58c}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 00h
        Num Endpoints   : 2
        Priority        : 0
        Read Size       : 3072
        Write Size      : 3072
        Buffer Count    : 8
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Interrupt Read (Ep86h) Maximum Packet Size: 3072

While the test is running:
Press 'Q' to quit
Press 'T' for test details
Press 'I' for status information
Press 'R' to reset averages

Press 'Q' to exit, any other key to begin..
Avg. Bytes/s: 4060724.41 Transfers: 8058 Bytes/s: 4060724.41
Avg. Bytes/s: 4077968.25 Transfers: 16057 Bytes/s: 4095488.00
Avg. Bytes/s: 4089209.55 Transfers: 24088 Bytes/s: 4111872.00
Avg. Bytes/s: 4091027.89 Transfers: 32089 Bytes/s: 4096512.00
Avg. Bytes/s: 4080836.41 Transfers: 40099 Bytes/s: 4040512.32
Avg. Bytes/s: 4091076.11 Transfers: 48190 Bytes/s: 4142592.00
Avg. Bytes/s: 4088371.22 Transfers: 56271 Bytes/s: 4072314.96
Avg. Bytes/s: 4084506.51 Transfers: 64323 Bytes/s: 4057700.79
Avg. Bytes/s: 4085831.18 Transfers: 72324 Bytes/s: 4096512.00
Avg. Bytes/s: 4086841.70 Transfers: 80324 Bytes/s: 4096000.00
Avg. Bytes/s: 4091233.12 Transfers: 88401 Bytes/s: 4135424.00
Avg. Bytes/s: 4086546.78 Transfers: 96401 Bytes/s: 4035467.98
Avg. Bytes/s: 4090166.69 Transfers: 104475 Bytes/s: 4133888.00
Avg. Bytes/s: 4088589.19 Transfers: 112548 Bytes/s: 4068283.46
Avg. Bytes/s: 4089080.16 Transfers: 120548 Bytes/s: 4096000.00
Avg. Bytes/s: 4088435.53 Transfers: 128634 Bytes/s: 4078849.26
Avg. Bytes/s: 4091660.76 Transfers: 136727 Bytes/s: 4143616.00
Avg. Bytes/s: 4092070.02 Transfers: 144733 Bytes/s: 4099072.00
Avg. Bytes/s: 4092275.68 Transfers: 152733 Bytes/s: 4096000.00
Avg. Bytes/s: 4091598.71 Transfers: 160827 Bytes/s: 4078866.14
Avg. Bytes/s: 4089025.12 Transfers: 168840 Bytes/s: 4038047.24
Avg. Bytes/s: 4089502.01 Transfers: 176847 Bytes/s: 4099584.00
Avg. Bytes/s: 4089893.44 Transfers: 184852 Bytes/s: 4098560.00
Avg. Bytes/s: 4090210.02 Transfers: 192855 Bytes/s: 4097536.00
waiting for Ep86h thread..
stopped Ep86h thread.   ExitCode=0
Read Test Information
        Driver          : libusbK
        Vid / Pid       : 04B4h / 1004h
        DevicePath      : \\?\usb#vid_04b4&pid_1004#5&586b51a&0&1#{dfad334c-e1da-12d4-816c-f6a425b3c58c}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 00h
        Num Endpoints   : 2
        Priority        : 0
        Read Size       : 3072
        Write Size      : 3072
        Buffer Count    : 8
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Interrupt Read (Ep86h) Maximum Packet Size: 3072
        Total Bytes     : 98741760
        Total Transfers : 192855
        Avg. Bytes/sec  : 4090210.02
        Elapsed Time    : 24.14 seconds

Press any key to exit..
mcuee commented 1 year ago

BTW, for high bandwidth isoc endpoint, kBench performs great. It will also automatically suggest the buffer size.

C:\libusbK-dev-kit_Release> .\kList.exe

Loading USB ID's maintained by Stephen J. Gowdy <linux.usb.ids@gmail.com>..

 1. WinUsb Device (WinUsb Device) [Connected]
    Service              : WINUSB
    ClassGUID            : {88BAE032-5A81-49F0-BC3D-A4FF138216D6}
    DeviceID             : USB\VID_0424&PID_2740\D&127B8A6A&0&5
    DeviceInterfaceGUID  : {b35924d6-3e16-4a9e-9782-5524a4b79bac}
    SymbolicLink         : \\?\usb#vid_0424&pid_2740#d&127b8a6a&0&5#{b35924d6-3e16-4a9e-9782-5524a4b79bac}
    DevicePath           : \\?\usb#vid_0424&pid_2740#d&127b8a6a&0&5#{b35924d6-3e16-4a9e-9782-5524a4b79bac}
    SerialNumber         : D&127B8A6A&0&5
    BusNumber            : 0
    DeviceAddress        : 5

 2. CY-Stream (Cypress Semiconductor Corp.) [Connected]
    Service              : WinUSB
    ClassGUID            : {88BAE032-5A81-49F0-BC3D-A4FF138216D6}
    DeviceID             : USB\VID_04B4&PID_00F1\5&E9F3E45&0&2
    DeviceInterfaceGUID  : {97A0090B-0329-07F7-C2BD-7BA7A223756D}
    SymbolicLink         : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&2#{97a0090b-0329-07f7-c2bd-7ba7a223756d}
    DevicePath           : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&2#{97a0090b-0329-07f7-c2bd-7ba7a223756d}
    SerialNumber         : 5&E9F3E45&0&2
    BusNumber            : 0
    DeviceAddress        : 2

Select device (1-2) :2

Loading driver api..
Getting descriptors..

-Device:
  bLength             :18
  bDescriptorType     :0x01
  bcdUSB              :0x0200
  bDeviceClass        :0x00 (Defined at Interface level)
  bDeviceSubClass     :0x00
  bDeviceProtocol     :0x00
  bMaxPacketSize0     :64
  idVendor            :0x04B4 (Cypress Semiconductor Corp.)
  idProduct           :0x00F1
  bcdDevice           :0x0000
  iManufacturer       :1 (Cypress)
  iProduct            :2 (CY-Stream)
  iSerialNumber       :0
  bNumConfigurations  :1
!End Device
-Configuration:
  bLength             :9
  bDescriptorType     :0x02
  wTotalLength        :135
  bNumInterfaces      :1
  bConfigurationValue :0x01
  iConfiguration      :0
  bmAttributes        :0xA0 (Self-Powered)
  MaxPower            :50 (100ma)
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x00
    bNumEndpoints       :1
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x82
      bmAttributes        :0x02 (Bulk)
      wMaxPacketSize      :512
      bInterval           :0x00
   !End Endpoint
 !End Interface
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x01
    bNumEndpoints       :1
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x02
      bmAttributes        :0x02 (Bulk)
      wMaxPacketSize      :512
      bInterval           :0x00
   !End Endpoint
 !End Interface
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x02
    bNumEndpoints       :2
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x82
      bmAttributes        :0x02 (Bulk)
      wMaxPacketSize      :512
      bInterval           :0x00
   !End Endpoint
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x06
      bmAttributes        :0x02 (Bulk)
      wMaxPacketSize      :512
      bInterval           :0x00
   !End Endpoint
 !End Interface
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x03
    bNumEndpoints       :1
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x82
      bmAttributes        :0x01 (Isochronous, No Synchonization, Data Endpoint)
      wMaxPacketSize      :1024 X 3 (3072 bytes)
      bInterval           :0x01
   !End Endpoint
 !End Interface
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x04
    bNumEndpoints       :1
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x02
      bmAttributes        :0x01 (Isochronous, No Synchonization, Data Endpoint)
      wMaxPacketSize      :1024 X 3 (3072 bytes)
      bInterval           :0x01
   !End Endpoint
 !End Interface
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x05
    bNumEndpoints       :1
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x82
      bmAttributes        :0x01 (Isochronous, No Synchonization, Data Endpoint)
      wMaxPacketSize      :1024
      bInterval           :0x01
   !End Endpoint
 !End Interface
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x06
    bNumEndpoints       :2
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x82
      bmAttributes        :0x01 (Isochronous, No Synchonization, Data Endpoint)
      wMaxPacketSize      :1024
      bInterval           :0x01
   !End Endpoint
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x06
      bmAttributes        :0x01 (Isochronous, No Synchonization, Data Endpoint)
      wMaxPacketSize      :1024
      bInterval           :0x01
   !End Interface
 !End Configuration
 -MSOSV1:
    bDescriptorType     :0x0D
    bLength             :02
    bMS_VendorCode      :0x00
    qwSignature         :
 !End MSOSV1

C:\libusbK-dev-kit_Release> .\kbench list notestselect altf=6 buffersize=16384 buffercount=3
device-count=2
1. WinUsb Device (USB\VID_0424&PID_2740\D&127B8A6A&0&5) [WinUSB]
2. CY-Stream (USB\VID_04B4&PID_00F1\5&E9F3E45&0&2) [WinUSB]
Select device (1-2) :2

opened CY-Stream (USB\VID_04B4&PID_00F1\5&E9F3E45&0&2)..
Loop Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 00F1h
        DevicePath      : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&2#{97a0090b-0329-07f7-c2bd-7ba7a223756d}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 06h
        Num Endpoints   : 2
        Priority        : 0
        Read Size       : 16384
        Write Size      : 16384
        Buffer Count    : 3
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Isochronous Read (Ep82h) Maximum Packet Size: 1024
Isochronous Write (Ep06h) Maximum Packet Size: 1024

While the test is running:
Press 'Q' to quit
Press 'T' for test details
Press 'I' for status information
Press 'R' to reset averages

Press 'Q' to exit, any other key to begin..
Avg. Bytes/s: 16318464.00 Transfers: 996 Bytes/s: 16318464.00 ISO-Packets (Total/Good/Bad):16032/16032/0
Avg. Bytes/s: 16335238.10 Transfers: 2010 Bytes/s: 16351748.03 ISO-Packets (Total/Good/Bad):32256/32256/0
Avg. Bytes/s: 16373135.28 Transfers: 3014 Bytes/s: 16449536.00 ISO-Packets (Total/Good/Bad):48320/48320/0
Avg. Bytes/s: 16396239.04 Transfers: 4019 Bytes/s: 16465920.00 ISO-Packets (Total/Good/Bad):64400/64400/0
Avg. Bytes/s: 16370996.92 Transfers: 5020 Bytes/s: 16271118.11 ISO-Packets (Total/Good/Bad):80416/80416/0
Avg. Bytes/s: 16362270.56 Transfers: 6024 Bytes/s: 16320012.09 ISO-Packets (Total/Good/Bad):96480/96480/0
Avg. Bytes/s: 16360750.39 Transfers: 7037 Bytes/s: 16351716.26 ISO-Packets (Total/Good/Bad):112688/112688/0
Avg. Bytes/s: 16390108.11 Transfers: 8050 Bytes/s: 16596992.00 ISO-Packets (Total/Good/Bad):128896/128896/0
Avg. Bytes/s: 16385807.79 Transfers: 9064 Bytes/s: 16351748.03 ISO-Packets (Total/Good/Bad):145120/145120/0
Avg. Bytes/s: 16387256.29 Transfers: 10065 Bytes/s: 16400384.00 ISO-Packets (Total/Good/Bad):161136/161136/0
Avg. Bytes/s: 16385478.97 Transfers: 11079 Bytes/s: 16367858.13 ISO-Packets (Total/Good/Bad):177360/177360/0
waiting for Ep82h thread..
stopped Ep82h thread.   ExitCode=0
waiting for Ep06h thread..
stopped Ep06h thread.   ExitCode=0
Loop Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 00F1h
        DevicePath      : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&2#{97a0090b-0329-07f7-c2bd-7ba7a223756d}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 06h
        Num Endpoints   : 2
        Priority        : 0
        Read Size       : 16384
        Write Size      : 16384
        Buffer Count    : 3
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Isochronous Read (Ep82h) Maximum Packet Size: 1024
        Total Bytes     : 90767360
        Total Transfers : 5540
        Avg. Bytes/sec  : 8193478.97
        Elapsed Time    : 11.08 seconds

Isochronous Write (Ep06h) Maximum Packet Size: 1024
        Total Bytes     : 90783744
        Total Transfers : 5541
        Avg. Bytes/sec  : 8194957.93
        Elapsed Time    : 11.08 seconds

Press any key to exit..

C:\libusbK-dev-kit_Release> .\kbench list notestselect altf=3 read buffersize=24576 buffercount=6
device-count=2
1. WinUsb Device (USB\VID_0424&PID_2740\D&127B8A6A&0&5) [WinUSB]
2. CY-Stream (USB\VID_04B4&PID_00F1\5&E9F3E45&0&2) [WinUSB]
Select device (1-2) :2

opened CY-Stream (USB\VID_04B4&PID_00F1\5&E9F3E45&0&2)..
Read Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 00F1h
        DevicePath      : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&2#{97a0090b-0329-07f7-c2bd-7ba7a223756d}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 03h
        Num Endpoints   : 1
        Priority        : 0
        Read Size       : 24576
        Write Size      : 24576
        Buffer Count    : 6
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Isochronous Read (Ep82h) Maximum Packet Size: 3072

While the test is running:
Press 'Q' to quit
Press 'T' for test details
Press 'I' for status information
Press 'R' to reset averages

Press 'Q' to exit, any other key to begin..
Avg. Bytes/s: 24526848.00 Transfers: 998 Bytes/s: 24526848.00 ISO-Packets (Total/Good/Bad):8008/8008/0
Avg. Bytes/s: 24723456.00 Transfers: 2012 Bytes/s: 24920064.00 ISO-Packets (Total/Good/Bad):16120/16120/0
Avg. Bytes/s: 24559702.92 Transfers: 3014 Bytes/s: 24237354.33 ISO-Packets (Total/Good/Bad):24136/24136/0
Avg. Bytes/s: 24569880.48 Transfers: 4015 Bytes/s: 24600576.00 ISO-Packets (Total/Good/Bad):32144/32144/0
Avg. Bytes/s: 24590698.56 Transfers: 5019 Bytes/s: 24674304.00 ISO-Packets (Total/Good/Bad):40176/40176/0
Avg. Bytes/s: 24580074.95 Transfers: 6032 Bytes/s: 24527574.38 ISO-Packets (Total/Good/Bad):48280/48280/0
Avg. Bytes/s: 24614449.15 Transfers: 7042 Bytes/s: 24821760.00 ISO-Packets (Total/Good/Bad):56360/56360/0
Avg. Bytes/s: 24609594.63 Transfers: 8058 Bytes/s: 24576000.00 ISO-Packets (Total/Good/Bad):64488/64488/0
Avg. Bytes/s: 24608597.77 Transfers: 9059 Bytes/s: 24600576.00 ISO-Packets (Total/Good/Bad):72496/72496/0
Avg. Bytes/s: 24600424.57 Transfers: 10072 Bytes/s: 24527574.38 ISO-Packets (Total/Good/Bad):80600/80600/0
Avg. Bytes/s: 24591529.16 Transfers: 11085 Bytes/s: 24503433.07 ISO-Packets (Total/Good/Bad):88704/88704/0
Avg. Bytes/s: 24586160.41 Transfers: 12099 Bytes/s: 24527622.05 ISO-Packets (Total/Good/Bad):96816/96816/0
Avg. Bytes/s: 24583498.97 Transfers: 13113 Bytes/s: 24551787.19 ISO-Packets (Total/Good/Bad):104928/104928/0
waiting for Ep82h thread..
stopped Ep82h thread.   ExitCode=0
Read Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 00F1h
        DevicePath      : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&2#{97a0090b-0329-07f7-c2bd-7ba7a223756d}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 03h
        Num Endpoints   : 1
        Priority        : 0
        Read Size       : 24576
        Write Size      : 24576
        Buffer Count    : 6
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Isochronous Read (Ep82h) Maximum Packet Size: 3072
        Total Bytes     : 322289664
        Total Transfers : 13114
        Avg. Bytes/sec  : 24585373.71
        Elapsed Time    : 13.11 seconds

Press any key to exit..
C:\libusbK-dev-kit_Release> .\kbench list notestselect altf=4 write buffersize=24576 buffercount=6
device-count=2
1. WinUsb Device (USB\VID_0424&PID_2740\D&127B8A6A&0&5) [WinUSB]
2. CY-Stream (USB\VID_04B4&PID_00F1\5&E9F3E45&0&2) [WinUSB]
Select device (1-2) :2

opened CY-Stream (USB\VID_04B4&PID_00F1\5&E9F3E45&0&2)..
Write Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 00F1h
        DevicePath      : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&2#{97a0090b-0329-07f7-c2bd-7ba7a223756d}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 04h
        Num Endpoints   : 1
        Priority        : 0
        Read Size       : 24576
        Write Size      : 24576
        Buffer Count    : 6
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Isochronous Write (Ep02h) Maximum Packet Size: 3072

While the test is running:
Press 'Q' to quit
Press 'T' for test details
Press 'I' for status information
Press 'R' to reset averages

Press 'Q' to exit, any other key to begin..
Avg. Bytes/s: 24750651.78 Transfers: 992 Bytes/s: 24750651.78 ISO-Packets (Total/Good/Bad):7960/7960/0
Avg. Bytes/s: 24687427.71 Transfers: 1994 Bytes/s: 24625152.00 ISO-Packets (Total/Good/Bad):15976/15976/0
Avg. Bytes/s: 24567808.00 Transfers: 2999 Bytes/s: 24333871.92 ISO-Packets (Total/Good/Bad):24016/24016/0
Avg. Bytes/s: 24643584.00 Transfers: 4011 Bytes/s: 24870912.00 ISO-Packets (Total/Good/Bad):32112/32112/0
Avg. Bytes/s: 24571100.48 Transfers: 5015 Bytes/s: 24285732.28 ISO-Packets (Total/Good/Bad):40144/40144/0
Avg. Bytes/s: 24571925.05 Transfers: 6030 Bytes/s: 24576000.00 ISO-Packets (Total/Good/Bad):48264/48264/0
Avg. Bytes/s: 24614449.15 Transfers: 7042 Bytes/s: 24870912.00 ISO-Packets (Total/Good/Bad):56360/56360/0
Avg. Bytes/s: 24606540.57 Transfers: 8057 Bytes/s: 24551811.02 ISO-Packets (Total/Good/Bad):64480/64480/0
Avg. Bytes/s: 24570576.63 Transfers: 9061 Bytes/s: 24285732.28 ISO-Packets (Total/Good/Bad):72512/72512/0
Avg. Bytes/s: 24593095.50 Transfers: 10070 Bytes/s: 24797184.00 ISO-Packets (Total/Good/Bad):80584/80584/0
Avg. Bytes/s: 24591529.16 Transfers: 11085 Bytes/s: 24576000.00 ISO-Packets (Total/Good/Bad):88704/88704/0
Avg. Bytes/s: 24592278.19 Transfers: 12086 Bytes/s: 24600576.00 ISO-Packets (Total/Good/Bad):96712/96712/0
Avg. Bytes/s: 24596671.05 Transfers: 13089 Bytes/s: 24649728.00 ISO-Packets (Total/Good/Bad):104736/104736/0
waiting for Ep02h thread..
stopped Ep02h thread.   ExitCode=0
Write Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 00F1h
        DevicePath      : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&2#{97a0090b-0329-07f7-c2bd-7ba7a223756d}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 04h
        Num Endpoints   : 1
        Priority        : 0
        Read Size       : 24576
        Write Size      : 24576
        Buffer Count    : 6
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Isochronous Write (Ep02h) Maximum Packet Size: 3072
        Total Bytes     : 321699840
        Total Transfers : 13090
        Avg. Bytes/sec  : 24598550.24
        Elapsed Time    : 13.08 seconds

Press any key to exit..
mcuee commented 1 year ago

The Interrupt IN endpoint performance may be limited by the FW, so that both Cyusb and libusbK can not reach the expected results.

Indeed. I just modified Cystream FW to use Interrupt Endpoint instead of Isochronous Endpoint and now I can get expected results from both Cyusb Cystream utility and libusbK kBench utility.

C:\libusbK-dev-kit_Release> .\klist

Loading USB ID's maintained by Stephen J. Gowdy <linux.usb.ids@gmail.com>..

 1. WinUsb Device (WinUsb Device) [Connected]
    Service              : WINUSB
    ClassGUID            : {88BAE032-5A81-49F0-BC3D-A4FF138216D6}
    DeviceID             : USB\VID_0424&PID_2740\D&127B8A6A&0&5
    DeviceInterfaceGUID  : {b35924d6-3e16-4a9e-9782-5524a4b79bac}
    SymbolicLink         : \\?\usb#vid_0424&pid_2740#d&127b8a6a&0&5#{b35924d6-3e16-4a9e-9782-5524a4b79bac}
    DevicePath           : \\?\usb#vid_0424&pid_2740#d&127b8a6a&0&5#{b35924d6-3e16-4a9e-9782-5524a4b79bac}
    SerialNumber         : D&127B8A6A&0&5
    BusNumber            : 0
    DeviceAddress        : 5

 2. CY-Stream (Cypress Semiconductor Corp.) [Connected]
    Service              : WinUSB
    ClassGUID            : {88BAE032-5A81-49F0-BC3D-A4FF138216D6}
    DeviceID             : USB\VID_04B4&PID_00F1\5&E9F3E45&0&2
    DeviceInterfaceGUID  : {97A0090B-0329-07F7-C2BD-7BA7A223756D}
    SymbolicLink         : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&2#{97a0090b-0329-07f7-c2bd-7ba7a223756d}
    DevicePath           : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&2#{97a0090b-0329-07f7-c2bd-7ba7a223756d}
    SerialNumber         : 5&E9F3E45&0&2
    BusNumber            : 0
    DeviceAddress        : 2

Select device (1-2) :2

Loading driver api..
Getting descriptors..

-Device:
  bLength             :18
  bDescriptorType     :0x01
  bcdUSB              :0x0200
  bDeviceClass        :0x00 (Defined at Interface level)
  bDeviceSubClass     :0x00
  bDeviceProtocol     :0x00
  bMaxPacketSize0     :64
  idVendor            :0x04B4 (Cypress Semiconductor Corp.)
  idProduct           :0x00F1
  bcdDevice           :0x0000
  iManufacturer       :1 (Cypress)
  iProduct            :2 (CY-Stream)
  iSerialNumber       :0
  bNumConfigurations  :1
!End Device
-Configuration:
  bLength             :9
  bDescriptorType     :0x02
  wTotalLength        :135
  bNumInterfaces      :1
  bConfigurationValue :0x01
  iConfiguration      :0
  bmAttributes        :0xA0 (Self-Powered)
  MaxPower            :50 (100ma)
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x00
    bNumEndpoints       :1
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x82
      bmAttributes        :0x02 (Bulk)
      wMaxPacketSize      :512
      bInterval           :0x00
   !End Endpoint
 !End Interface
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x01
    bNumEndpoints       :1
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x02
      bmAttributes        :0x02 (Bulk)
      wMaxPacketSize      :512
      bInterval           :0x00
   !End Endpoint
 !End Interface
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x02
    bNumEndpoints       :2
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x82
      bmAttributes        :0x02 (Bulk)
      wMaxPacketSize      :512
      bInterval           :0x00
   !End Endpoint
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x06
      bmAttributes        :0x02 (Bulk)
      wMaxPacketSize      :512
      bInterval           :0x00
   !End Endpoint
 !End Interface
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x03
    bNumEndpoints       :1
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x82
      bmAttributes        :0x03 (Interrupt)
      wMaxPacketSize      :1024 X 3 (3072 bytes)
      bInterval           :0x01
   !End Endpoint
 !End Interface
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x04
    bNumEndpoints       :1
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x02
      bmAttributes        :0x03 (Interrupt)
      wMaxPacketSize      :1024 X 3 (3072 bytes)
      bInterval           :0x01
   !End Endpoint
 !End Interface
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x05
    bNumEndpoints       :1
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x82
      bmAttributes        :0x03 (Interrupt)
      wMaxPacketSize      :1024
      bInterval           :0x01
   !End Endpoint
 !End Interface
 -Interface:
    bLength             :9
    bDescriptorType     :0x04
    bInterfaceNumber    :0x00
    bAlternateSetting   :0x06
    bNumEndpoints       :2
    bInterfaceClass     :0xFF (Vendor Specific Class)
    bInterfaceSubClass  :0x00
    bInterfaceProtocol  :0x00
    iInterface          :0
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x82
      bmAttributes        :0x03 (Interrupt)
      wMaxPacketSize      :1024
      bInterval           :0x01
   !End Endpoint
   -Endpoint:
      bLength             :7
      bDescriptorType     :0x05
      bEndpointAddress    :0x06
      bmAttributes        :0x03 (Interrupt)
      wMaxPacketSize      :1024
      bInterval           :0x01
   !End Interface
 !End Configuration
 -MSOSV1:
    bDescriptorType     :0x0D
    bLength             :02
    bMS_VendorCode      :0x00
    qwSignature         :
 !End MSOSV1

C:\libusbK-dev-kit_Release> .\kbench list notestselect altf=3 read buffersize=3072 buffercount=4
device-count=2
1. WinUsb Device (USB\VID_0424&PID_2740\D&127B8A6A&0&5) [WinUSB]
2. CY-Stream (USB\VID_04B4&PID_00F1\5&E9F3E45&0&2) [WinUSB]
Select device (1-2) :2

opened CY-Stream (USB\VID_04B4&PID_00F1\5&E9F3E45&0&2)..
Read Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 00F1h
        DevicePath      : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&2#{97a0090b-0329-07f7-c2bd-7ba7a223756d}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 03h
        Num Endpoints   : 1
        Priority        : 0
        Read Size       : 3072
        Write Size      : 3072
        Buffer Count    : 4
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Interrupt Read (Ep82h) Maximum Packet Size: 3072

While the test is running:
Press 'Q' to quit
Press 'T' for test details
Press 'I' for status information
Press 'R' to reset averages

Press 'Q' to exit, any other key to begin..
Avg. Bytes/s: 24357888.00 Transfers: 7929 Bytes/s: 24357888.00
Avg. Bytes/s: 24082285.71 Transfers: 15804 Bytes/s: 23811023.62
Avg. Bytes/s: 24071809.02 Transfers: 23633 Bytes/s: 24050688.00
Avg. Bytes/s: 23958095.24 Transfers: 31445 Bytes/s: 23620535.43
Avg. Bytes/s: 23900366.95 Transfers: 39266 Bytes/s: 23671046.31
Avg. Bytes/s: 23819049.45 Transfers: 46886 Bytes/s: 23408640.00
Avg. Bytes/s: 23857039.78 Transfers: 54851 Bytes/s: 24083149.61
Avg. Bytes/s: 23766077.98 Transfers: 62502 Bytes/s: 23133732.28
Avg. Bytes/s: 23815359.40 Transfers: 70384 Bytes/s: 24213504.00
Avg. Bytes/s: 23760675.25 Transfers: 78073 Bytes/s: 23271534.98
Avg. Bytes/s: 23794865.89 Transfers: 86055 Bytes/s: 24134551.18
Avg. Bytes/s: 23697598.02 Transfers: 93533 Bytes/s: 22632922.17
Avg. Bytes/s: 23580598.13 Transfers: 100870 Bytes/s: 22184314.96
Avg. Bytes/s: 23536937.98 Transfers: 108345 Bytes/s: 22963200.00
Avg. Bytes/s: 23463294.32 Transfers: 115766 Bytes/s: 22438299.21
Avg. Bytes/s: 23437475.77 Transfers: 123268 Bytes/s: 23046144.00
Avg. Bytes/s: 23460047.52 Transfers: 131138 Bytes/s: 23819349.75
Avg. Bytes/s: 23411236.63 Transfers: 138486 Bytes/s: 22573056.00
Avg. Bytes/s: 23436087.55 Transfers: 146384 Bytes/s: 23880566.93
Avg. Bytes/s: 23444450.60 Transfers: 154190 Bytes/s: 23602393.70
stopped Ep82h thread.   ExitCode=259
Read Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 00F1h
        DevicePath      : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&2#{97a0090b-0329-07f7-c2bd-7ba7a223756d}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 03h
        Num Endpoints   : 1
        Priority        : 0
        Read Size       : 3072
        Write Size      : 3072
        Buffer Count    : 4
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Interrupt Read (Ep82h) Maximum Packet Size: 3072
        Total Bytes     : 497568768
        Total Transfers : 161969
        Avg. Bytes/sec  : 23465797.40
        Elapsed Time    : 21.20 seconds

Press any key to exit..
C:\libusbK-dev-kit_Release> .\kbench list notestselect altf=4 write buffersize=3072 buffercount=4
device-count=2
1. WinUsb Device (USB\VID_0424&PID_2740\D&127B8A6A&0&5) [WinUSB]
2. CY-Stream (USB\VID_04B4&PID_00F1\5&E9F3E45&0&2) [WinUSB]
Select device (1-2) :2

opened CY-Stream (USB\VID_04B4&PID_00F1\5&E9F3E45&0&2)..
Write Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 00F1h
        DevicePath      : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&2#{97a0090b-0329-07f7-c2bd-7ba7a223756d}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 04h
        Num Endpoints   : 1
        Priority        : 0
        Read Size       : 3072
        Write Size      : 3072
        Buffer Count    : 4
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Interrupt Write (Ep02h) Maximum Packet Size: 3072

While the test is running:
Press 'Q' to quit
Press 'T' for test details
Press 'I' for status information
Press 'R' to reset averages

Press 'Q' to exit, any other key to begin..
Avg. Bytes/s: 22612992.00 Transfers: 7361 Bytes/s: 22612992.00
Avg. Bytes/s: 22890666.67 Transfers: 15022 Bytes/s: 23163968.50
Avg. Bytes/s: 22055176.78 Transfers: 21768 Bytes/s: 20397354.33
Avg. Bytes/s: 22128761.90 Transfers: 29044 Bytes/s: 22351872.00
Avg. Bytes/s: 22519275.61 Transfers: 36997 Bytes/s: 24070557.64
Avg. Bytes/s: 22736965.77 Transfers: 44756 Bytes/s: 23835648.00
Avg. Bytes/s: 22923217.90 Transfers: 52704 Bytes/s: 24031748.03
Avg. Bytes/s: 23013379.55 Transfers: 60515 Bytes/s: 23640780.30
Avg. Bytes/s: 22945586.25 Transfers: 67806 Bytes/s: 22397952.00
Avg. Bytes/s: 23048825.84 Transfers: 75734 Bytes/s: 23971275.59
Avg. Bytes/s: 23159727.81 Transfers: 83758 Bytes/s: 24261543.31
Avg. Bytes/s: 23145524.78 Transfers: 91354 Bytes/s: 22990061.08
Avg. Bytes/s: 23124508.64 Transfers: 98919 Bytes/s: 22873700.79
Avg. Bytes/s: 23123311.79 Transfers: 106441 Bytes/s: 23107584.00
Avg. Bytes/s: 23181720.63 Transfers: 114256 Bytes/s: 24007680.00
Avg. Bytes/s: 23243158.51 Transfers: 122246 Bytes/s: 24158740.16
Avg. Bytes/s: 23285624.04 Transfers: 130163 Bytes/s: 23961600.00
Avg. Bytes/s: 23297127.01 Transfers: 137811 Bytes/s: 23494656.00
Avg. Bytes/s: 23259176.99 Transfers: 145279 Bytes/s: 22580409.45
Avg. Bytes/s: 23276623.74 Transfers: 152965 Bytes/s: 23611392.00
Avg. Bytes/s: 23314195.16 Transfers: 160915 Bytes/s: 24061477.83
stopped Ep02h thread.   ExitCode=259
Write Test Information
        Driver          : WinUSB
        Vid / Pid       : 04B4h / 00F1h
        DevicePath      : \\?\usb#vid_04b4&pid_00f1#5&e9f3e45&0&2#{97a0090b-0329-07f7-c2bd-7ba7a223756d}
        Device Speed    : High
        Interface #     : 00h
        Alt Interface # : 04h
        Num Endpoints   : 1
        Priority        : 0
        Read Size       : 3072
        Write Size      : 3072
        Buffer Count    : 4
        Display Refresh : 1000 (ms)
        Transfer Timeout: 5000 (ms)
        Retry Count     : 0
        Verify Data     : Off

Interrupt Write (Ep02h) Maximum Packet Size: 3072
        Total Bytes     : 518645760
        Total Transfers : 168830
        Avg. Bytes/sec  : 23359264.96
        Elapsed Time    : 22.20 seconds

Press any key to exit..
mcuee commented 1 year ago

Original Cystream FW (Bulk and Isoc Endpoints) with minor modification to make it work with boards without I2C EEPROM. CyStreamer_noI2C.zip

My modification to use Bulk and Interrupt Endpoints, CyStreamer_noI2C_bulk_intr.zip

Test board: cheap board from online stores like AliExpress, it should with other boards as well. 1PCS-EZ-USB-FX2LP-CY7C68013A-USB-logic-analyzer-core-board jpg_Q90 jpg_

Official Cypress CY3689 is also inexpensive. https://www.infineon.com/cms/en/product/evaluation-boards/cy3689/ CY3689_0 png_1892450672