-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32-S3 - Arduino v3.1 - USBCDC Hangs and misses chunks of data for for large serial transmits #10836
Comments
@SuGlider can look into this, but could you try with the HWCDC instead? If Serial is all you need, HWCDC might do better |
@me-no-dev thanks for the reply! Is there a way to use |
Nop. HWCDC is exclusivelly a CDC/JTAG implementation in silicon. It can't work in any other way. ESP32-S3 has USB OTG mode for a full USB Class mode software implementation. |
Yeah, that's what I was worried about, I have to use the USB OTG mode. At least we have full control via software on what happens. Have you managed to replicate the issue with the instructions provided or is there something I can do meanwhile to help you guys with the process? I'll be happy to provide support if able. |
@TheCrypt0 - Thanks for the support. I'll set up an environment for replicate and debug the issue. |
In my project I use HWCDC, and sometimes it also misses packets. ((( |
Hey @SuGlider apologies for bothering you again, have you been able to replicate the issue? It seems like it's affecting others as well. Thanks! |
Hi, I'm on vacation right now and I shall return to work in the beginning of February. This issue is in top place for investigation. |
Board
ESP32-S3
Device Description
Custom ESP32-S3 keyboard but it should work on any ESP32-S3 devkit with USB connection.
Hardware Configuration
N.A.
Version
v3.1.0
IDE Name
Arduino IDE
Operating System
macOS
Flash frequency
80MHz
PSRAM enabled
no
Upload speed
921600
Description
I’m currently porting my project to the latest version of the Arduino Core but I'm experiencing data loss when using the USBCDC implementation with large chunks of data. It seems that the data is not reliably received and a buffer overflow occurs.
This seems to be related and exactly what I am experiencing: https://www.esp32.com/viewtopic.php?t=38858
Downgrading to 2.0.17 makes the code work again.
I suspect the issue might be related to how data is queued or buffered internally within the USBCDC implementation. If there are known limitations or configurations that could mitigate this issue, I’d really appreciate any guidance or suggestion.
I've provided an example that computes the SHA1 of the sent data to confirm integrity.
Sketch
Debug Message
Other Steps to Reproduce
Open an Arduino Serial monitor and paste the following text into the Message box (No Line Ending, 115200 baud).
Expect the SHA1 being:
128DA61AA85A72155E5229129D83E6044181FB0A
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: