How to resume fopen() functionality after SD used by USB MSC
Posted: Tue Sep 05, 2023 9:50 am
using ESP32-S3, I have setup the SD card and USB MSC using following API sequence at boot time:
esp_vfs_fat_sdmmc_mount();
tinyusb_msc_storage_init_sdmmc();
tinyusb_msc_storage_mount();
tinyusb_driver_install();
before it was plugged into PC, fopen() and all file operation is working fine. when plugged into PC, a USB MSC drive is form successfully, however, after unplugged from PC, all file operation (e.g. fopen()) still not working, looks like SD card is being occupied by TinyUSB MSC code. How can I resume the file operation in my app_main()? I have tried tinyusb_msc_storage_unmount() but it does not help.
esp_vfs_fat_sdmmc_mount();
tinyusb_msc_storage_init_sdmmc();
tinyusb_msc_storage_mount();
tinyusb_driver_install();
before it was plugged into PC, fopen() and all file operation is working fine. when plugged into PC, a USB MSC drive is form successfully, however, after unplugged from PC, all file operation (e.g. fopen()) still not working, looks like SD card is being occupied by TinyUSB MSC code. How can I resume the file operation in my app_main()? I have tried tinyusb_msc_storage_unmount() but it does not help.