Skip to content
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

Open
3 tasks done
MatteoRodriguez opened this issue Oct 21, 2024 · 0 comments
Open
3 tasks done

tinyusb_msc_storage: f_mkfs failed (14) (IEC-229) #79

MatteoRodriguez opened this issue Oct 21, 2024 · 0 comments
Labels
Status: Opened Issue is new Type: Bug Bug in esp-usb

Comments

@MatteoRodriguez
Copy link

Answers checklist.

  • 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.

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.

image

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 :

image

And this is the details of the storage_init_emmc function :

image

Thanks for your help.

@MatteoRodriguez MatteoRodriguez added the Type: Bug Bug in esp-usb label Oct 21, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Oct 21, 2024
@github-actions github-actions bot changed the title tinyusb_msc_storage: f_mkfs failed (14) tinyusb_msc_storage: f_mkfs failed (14) (IEC-229) Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new Type: Bug Bug in esp-usb
Projects
None yet
Development

No branches or pull requests

2 participants