Page 1 of 1

Flash MSC over USB is not mounting back to application after unplugging USB cable

Posted: Tue Jul 23, 2024 10:58 pm
by Asanga
I tested the example tusb_msc over flash. IDF version is 5.2.2 and Module is ESP32-S3. Tested on Win10.
https://github.com/espressif/esp-idf/tr ... e/tusb_msc

The flash storage media is exposed to the application at the beginning. When connecting USB to Win PC, the PC recognized as MSC on Windows Explorer which Flash storage partition exposes to USB Host and does not expose to the application. Ejecting the media in Explorer returns the expose of flash storage media to application.

The problem is, the Flash storage partition doesn't expose (mount) back to application after disconnecting USB cable directly from the Host without ejecting it. Calling this function
tinyusb_msc_storage_mount(BASE+PATH)
does the mount to application side but couldn't find a way to detect USB cable disconnection event.

Also, after ejecting media from Win Explorer, the MSC is not showing the dismount of the media on the Explorer. The icon stay as mounted.

Thanks.