-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tinyusb_msc_storage: f_mkfs failed (14) (IEC-229) #79
Comments
@MatteoRodriguez thank you for the issue.
Does this mean that you could expose the eMMC memory through USB to USB host (PC)? |
Could you please clarify, what leads to the conclusion that allocation unit size is a problem? Allocation unit size, also known as cluster size, is often much larger than sector size. SD cards and eMMC chips formatted by PC will often have allocation unit size (cluster size) set to 16 kB or more. Could you please capture the logs at verbose level and upload them here as a .txt file? |
@tore-espressif yes. @igrr well, honestly, I am pretty new to SD Card and EMMC so my only clue comes from this part of the logs : log.txt |
Hi @MatteoRodriguez, I'm glad to hear you managed to get it working! We’ll make sure to include this in our future plans to improve the user experience for eMMC developers. However, we can’t commit to a specific timeline just yet. |
@tore-espressif well, I wouldn't say I got it working in a proper way as I first need to flash a code to format my emmc before I can flash my own code, but that will do the trick temporarily. No problem, I understand about the timeline, the main goal of this issue was first to check if it wasn't due to a misunderstanding from my side, and then to let you know as soon as possible about a potential bug/feature. I'll keep looking for a cleaner workaround with some esp_vfs_fat_sdmmc functions. I'll keep you updated. Any help/idea would be really appreciated. |
Error code 14 is |
Answers checklist.
Which component are you using? If you choose Other, provide details in More Information.
device/esp_tinyusb
ESP-IDF version.
v5.2.1
Development Kit.
esp32s3 custom board
Used Component version.
v1.4.4
More Information.
Hello,
I have a custom board with an ESP32-S3-WROOM-2 MON32R8V and an EMMC04G-MT32. I am trying to use tinyusb to make this board behave as a MSC device but I have a problem with the emmc. The tinyusb stack seems to fail to format and mount the emmc when there is no partition on it.
I am pretty sure it has nothing to do with the hardware. My whole code runs perfectly when I use the internal storage of the esp (it behaves as a MSC device). I tested the emmc example (using esp_vfs_fat_sdmmc_mount) and it can format and mount and use the emmc without any problem. I also tested the tusb_msc example and this one CANNOT format the emmc. And once the emmc has been formated, my code is working well.
As you can see on the log above, the code is able to talk with the emmc. But there is a conflict with the allocation unit size. I tried everything I could in menuconfig to set this parameter to 512 but I failed doing so. It feels to be hardcoded in the tinyusb library.
Or maybe I am missing some initializing steps with vfs_fat... Here are my initializing steps with tinyusb :
And this is the details of the storage_init_emmc function :
Thanks for your help.
The text was updated successfully, but these errors were encountered: