Skip to main content
Visitor II
April 28, 2023
Question

Hello, I have a setup with ThreadX, NetX Duo and USBX. Implementing an CDC-ECM over USB2.0. The throughput we measure is rather low (at least not as expected with an USB2.0 480MBit/s).

  • April 28, 2023
  • 2 replies
  • 1265 views

What options or tuning is possible to increase the throughput for this IP over USB?

Goal is to at least transfer 64KiB each 20ms or better. (22MBit/s or greater)

(started from project STM32H735G-DK/Applications/USBX/Ux_Device_CDC_ECM on github from

Kind regards,

Jan

    This topic has been closed for replies.

    2 replies

    Super User
    April 28, 2023

    you have a hi-speed phy connected ?

    what is the throughput you get ?

    JCorn.3Author
    Visitor II
    May 2, 2023

    I use the STm32H753-eval2 and configured the USB OTG_HS (this board comes with an external hi-speed PHY).

    The host computer shows the USB link as 480MBit/s.

    The measurements I did shows that a 64KiB transfer takes 23.6 ms. (~22,2Mbit/s). (This is the transfer of the 64KiB buffer only. The TCP Connection setup is split off)

    This throughput leaves me no headroom for my use-case.

    For comparison: A transfer over wired Ethernet gives twice the throughput even at a link speed of 100Mbps. (16KiB → 3ms ==> ~44Mbps (wired ethernet is 100Mbps link))

    Kind regards,

    Jan

    Graduate II
    June 28, 2024

    480M is the signalling rate, not throughput. Additionally, USB "bulk" type transfers are limited by the spec to a theoretical max of 53MB/s (since bulk is "best-effort" and not allowed to take 100% of each frame). Older Cypress/Infineon  FX2LP appnotes have hard numbers for their demos, I don't recall exactly but I'm sure it's lower than 53MB/s. I don't have hard numbers for STM32.

    Note that this upper bound is for "raw" endpoint communication. CDC-ECM has several software abstraction layers on top of that, so you should perhaps expect significantly less. I'm not sure.