2023-04-28 07:26 AM
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
2023-04-28 08:42 AM
you have a hi-speed phy connected ?
what is the throughput you get ?
2023-05-01 11:02 PM
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
2024-06-28 05:17 AM - edited 2024-06-28 05:23 AM
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.