ESP32-S3 TinyUSB MSC Storage Not Readable Without Power Cycle

sangham
Posts: 1
Joined: Wed Sep 10, 2025 4:15 pm

ESP32-S3 TinyUSB MSC Storage Not Readable Without Power Cycle

Postby sangham » Wed Sep 10, 2025 4:30 pm

Hello Everyone,

I am working on an ESP32-S3 project where I use TinyUSB MSC + CDC to expose onboard flash storage to the PC.

SDK: ESP-IDF v5.x
Board: ESP32-S3-Mini-1
Filesystem: FAT (also tested LittleFS)
Partition: Custom partition table with storage partition

Questions:
1. How ESP32 can read the data from its created tinyUSB MSC drive without ejecting it and without power cycle.

The problem:
After flashing the firmware and connecting the ESP32-S3 to the PC, the MSC drive is detected, and I can add and delete files from the drive. But ESP32-S3 cat read the files unless the power cycle.

What I tried:
1. Mounted storage using tinyusb_msc_storage_mout.
2. Verified file operations with fopen, fwrite, fread → works fine right after boot.
3. Tested with stat() and file_exist() functions — results are correct only after fresh power cycle.
4. Tried both FATFS and LittleFS.
5. Partition table looks correct and matches storage config.
6. Logs show successful mount, but after eject/reconnect, read fails.

Thanks in advance!

Who is online

Users browsing this forum: Amazon [Bot], Baidu [Spider], Bing [Bot], Qwantbot and 3 guests