-
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
USB Mass Storage Class example doesn't flash properly (IDFGH-10215) #11481
Comments
Hello @fulalas , what development board did you use? The symptoms indicate that you flash the program via USB-Serial-JTAG. USB features and USB-Serial-JTAG are mutually exclusive. Either you use USB for flashing of ESP32-S3, or you use USB-OTG features, such as the MSC driver |
Hi! I have the ESP32-S3-USB-OTG_SUB V2.0 one. Yeah, there's a USB dev and a USB-UART0 (mini-USB) ports. I'm not sure how to proceed. |
For this particular case, you have to use the USB-UART0 connector for program flashing, and the USB host connector for interfacing your flash drive. As you can see from the schematic you will need extra steps to configure your board for USB Host mode. We provide helper function in ESP32-S3-USB-OTG Board Support Package. I'm sorry for the inconvenience, we are working on more seamless experimenting with USB Host examples |
OK. I adapted the code to include the 2 methods you mentioned. This is the relevant part (hint:
It compiles and flashes to the device, however the output is stuck at |
Could you please set the second argument of this call |
I tried it, but the result is the same. :( |
I'm sorry I forgot one last thing: this call
|
I see now. It's working, finally! So the USB A connector powers the USB stick while the mini-USB is to flash the application? |
Correct, I'm happy it works now :) Can we close this issue? |
Sure. Thanks! |
Sorry to bring this up again, but is there any similar example using Rust? |
@porteux Regarding Rust no_std, you can find some examples with initial USB support here: https://github.com/esp-rs/esp-hal/tree/main/esp32s3-hal/examples If you're targeting Rust std with ESP-IDF, then it should be possible to use API from ESP-IDF, but no USB-related examples have been published by the community yet: https://github.com/esp-rs/esp-idf-hal/tree/master/examples |
@georgik, thanks a lot! |
Answers checklist.
IDF version.
v5.2-dev-703-gefe919275e
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-S3
Power Supply used.
USB
What is the expected behavior?
I compiled this project and successfully flashed it to /dev/ttyACM0, but then it seems the ESP32-S3 didn't restart properly (blank screen) and the build process got stuck waiting for the device to restart. I tried to unplug ESP32-S3 and plug again, but nothing changed. I can't flash the project anymore because /dev/ttyACM0 doesn't exist anymore (
A fatal error occurred: Could not open /dev/ttyACM0, the port doesn't exist
).What is the actual behavior?
The program should run and read the text file from the USB stick that is connected to ESP32-S3.
Steps to reproduce.
Just install the dev enviroment and build this project using
idf.py -p /dev/ttyACM0 flash monitor
Debug Logs.
No response
More Information.
I'm using Slackware 15.0.
The text was updated successfully, but these errors were encountered: