Page 1 of 1

Esp32S3 : Is it possible to switch between USB CDC and MSC at runtime ?

Posted: Mon Sep 22, 2025 1:55 pm
by ThomasESP32
Good afternoon,


I am working with an Esp32S3 and I have found the example CDC MSC composite which works fine.
Now, I would like to know if it is possible to switch between CDC and MSC at runtime ?
If the answer is YES, is there any example ??

Best regards,

Thank you for your help,

Thomas TRUILHE

Re: Esp32S3 : Is it possible to switch between USB CDC and MSC at runtime ?

Posted: Mon Oct 13, 2025 8:55 am
by tore-espressif
No, not out-of-the box. We use TinyUSB as our USB device stack, which uses static configuration.

You can implement this feature by defining your own tud_descriptor_configuration_cb() and tud_descriptor_device_cb() TinyUSB callbacks. In the callbacks you can then return whatever configuration you want.