-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
switch between CDC and MSC device on esp32-s3 #2926
Comments
I have worked on the individual initialization sequences such that I can start either the CDC or the MSC, without having to adjust sdkconfig.
Is there a way i can accomplish this teardown without restarting the MCU? |
Hi @marchingband, The esp-idf is using the esp-tinyusb wrapper, which provides the configuration and and other things for the classes and simplify the final usage. For the MSC device there is also a way to insert and remove the media (without a media your device will be represented in the system as a SD card reader without a card). But for that, if you still want to use esp-idf, you need to use tinyusb component directly, as to provide media you need to use Otherwise, there is a version of So, there are several options to try it out. Maybe it will help you with your idea. |
@roma-jam thank you so much for your help. |
There is one bug(?) where the driver does not respect |
just realized this may simply be because of
In which case just ignore me heh. |
Related area
device stack?
Hardware specification
ESP32-S3
Is your feature request related to a problem?
I am working on a device where most of the time, the ESP32 is a USB serial device, but then sometimes, it needs to change into a MSC device for a while, and then back to serial again.
This is to allow users to upload config files, which they will only do sometimes, and which should not be active all the time.
I see the example in the esp-idf for composite cdc and msc device, but if I do not initialize the msc, then then the driver crashes.
Describe the solution you'd like
Is there a way to either
a) register as a composite device, but defer initialization of the msc device, and then later deinit it?
b) register as a CDC, then later deinit the CDC device, register as an MSC, init the MSC, and then back again?
Example code for this on ESP32, where menuconfig is so intimately connected to USB driver, would be deeply appreciated.
any tips appreciated really, I have not been able to find any info online, thank you!
I have checked existing issues, dicussion and documentation
The text was updated successfully, but these errors were encountered: