You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the component documentation ESP-IDF Components and the issue is not addressed there.
I am using target and esp-idf version as defined in component's idf_component.yml
I have searched the issue tracker for a similar issue and not found any related issue.
Which component are you using? If you choose Other, provide details in More Information.
device/esp_tinyusb
ESP-IDF version.
5.2.1
Development Kit.
ESP32-S3-DevKitC-1 clone
Used Component version.
1.4.4
More Information.
Hello.
Using the flash to MSC flow, the FATFS partition is not remounted after USB host is disconnected because of this abandoned TinyUSB bug: hathach/tinyusb#1592 .
The symptom is that my mount callback passed to tinyusb_msc_storage_init_spiflash() is never called besides startup when I call tinyusb_msc_storage_mount(), while no mount error message appears either.
I verified this is the issue by adding the callback in tusb_msc_storage.c as a copy/paste of tud_umount_cb():
// Invoked when device is unmountedvoidtud_umount_cb(void)
{
if (tinyusb_msc_storage_mount(s_storage_handle->base_path) !=ESP_OK) {
ESP_LOGW(TAG, "tud_umount_cb() mount Fails");
}
}
voidtud_suspend_cb(boolnone)
{
if (tinyusb_msc_storage_mount(s_storage_handle->base_path) !=ESP_OK) {
ESP_LOGW(TAG, "tud_umount_cb() mount Fails");
}
}
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
MSC: FATFS isn't remounted after USB disconnect
MSC: FATFS isn't remounted after USB disconnect (IEC-120)
Jun 9, 2024
clarify the version of tinyusb component version you are using (should be something like 0.15.x.x)
have you tired to launch original tusb_msc example from esp-idf ?
for device to be able to detect connect/disconnect events from usb, the several additional steps should be fulfilled (hardware resistor divider on Vbus + software configuration during tinyusb_driver_install() call. More information here: Self-Powered Device
I'm using esp_tinyusb 1.4.4 package. By digging into automatically downloaded components I find tinyusb version is 0.15.1. I use PlatformIO, it ships a crippled ESP-IDF, managing components is partly manual.
No. I didn't write any tinyusb code anyway: everything is handled by the call to tinyusb_msc_storage_init_spiflash().
You're absolutely right and I didn't even think of checking that VBUS detection is wired properly on the board. That obviously would explain why it thinks it has been suspended by a SE 0.
I will do necessary checks and get back to you, thanks for your help.
Answers checklist.
Which component are you using? If you choose Other, provide details in More Information.
device/esp_tinyusb
ESP-IDF version.
5.2.1
Development Kit.
ESP32-S3-DevKitC-1 clone
Used Component version.
1.4.4
More Information.
Hello.
Using the flash to MSC flow, the FATFS partition is not remounted after USB host is disconnected because of this abandoned TinyUSB bug: hathach/tinyusb#1592 .
The symptom is that my mount callback passed to
tinyusb_msc_storage_init_spiflash()
is never called besides startup when I calltinyusb_msc_storage_mount()
, while no mount error message appears either.I verified this is the issue by adding the callback in tusb_msc_storage.c as a copy/paste of tud_umount_cb():
The text was updated successfully, but these errors were encountered: