Page 1 of 1

ESP32-S3 USB speed

Posted: Thu Jul 14, 2022 3:14 pm
by Langelot
Hello everyone,

I have just run some USB speed tests, for my system I need a TX speed of about 10 Mbits/s. I managed to get a speed of 4.25 Mbits/s. To reach this speed I set the CPU frequency to 240 MHz and the CDC FIFO size of TX channel to 20000 in menuconfig. I am sending 20000 bytes chunks of data.

I know that there is some overhead to expect and that 12 Mbits/s is not reachable but I thought it would be possible to reach an higher speed.

Is there anyone that knows if it is possible or not to improve this speed to about 10 Mbits/s ?

Thank you!

Re: ESP32-S3 USB speed

Posted: Fri Jul 15, 2022 2:29 am
by ESP_Sprite
FWIW, 10MBit is not possible. USB full speed max bulk packet size is 64 bytes, plus 13 bytes frame overhead means the overhead takes up 13% of your transfer. Additionally, 10% of bandwidth is reserved for control transfers. Furthermore, bitstuffing can add up to 16% overhead, but it's dependent on the data, and on random data it's more like 1% ish. That means you get a theoretical max of 12MBit*76%=9.1MBit/sec.

To be fair, you're still far from that, and I don't quite know how to improve on that speed, sorry.

Re: ESP32-S3 USB speed

Posted: Fri Jul 15, 2022 8:12 am
by Langelot
Thank you for your quick reply, it is very interesting to know what the theoretical max speed is. As you said I am still far from that.
I guess that someone from Espressif did some speed tests for validation purposes, could you or this person share the code and kconfig so that people can start from the Espressif speed optimised solution?
It would be great!
Thank you.