USB Mass Storage Class example doesn't create files
Posted: Fri Aug 25, 2023 6:34 am
I'm trying to write files into usb flash drive attached to ESP32S2 chip.
I used this example https://github.com/espressif/esp-idf/tr ... b/host/msc
USB stick formatted to FAT32 and succesfully detected by ESP32.
Below logs from chip:
I also see logs with text "Read from file: 'Hello World!'" That means file /usb/esp/test.txt was succesfully create.
But when I check content of flash drive on PC it's empty. No any files on flash drive.
I'm little bit confused about example description:
"Upon connection of USB stick, storage is mounted to Virtual filesystem." What it means. maybe something wrong with examples and writes file in internal flash of ESP?
How correctly write files to usb flash stick?
I used this example https://github.com/espressif/esp-idf/tr ... b/host/msc
USB stick formatted to FAT32 and succesfully detected by ESP32.
Below logs from chip:
Code: Select all
Device info:
Capacity: 3700 MB
Sector size: 512
Sector count: 7579007
PID: 0x4100
VID: 0x13FE
iProduct: Silicon-Power4G
iManufacturer: UFD 2.0
iSerialNumber: 12071453019E60027B7B402CB83
But when I check content of flash drive on PC it's empty. No any files on flash drive.
I'm little bit confused about example description:
"Upon connection of USB stick, storage is mounted to Virtual filesystem." What it means. maybe something wrong with examples and writes file in internal flash of ESP?
How correctly write files to usb flash stick?