Hello,
Is there any example of a running ESP32-S3 with an SDIO SD card as a mass storage device?
I tried to look for Adafruit TinyUSB https://github.com/adafruit/Adafruit_TinyUSB_Arduino but it seems that it doesn't support SDIO.
Example to use ESP32-S3 as MSC with SDIO SD card
Re: Example to use ESP32-S3 as MSC with SDIO SD card
You can check this thread regarding connecting esp32-s3 to the sd card in 4-bit sdio protocolhttps://esp32.com/viewtopic.php?t=28377
Re: Example to use ESP32-S3 as MSC with SDIO SD card
Thank you for your response. I already know how to read/write to SD card using SDIO interface. Here is a working Example https://github.com/espressif/arduino-es ... C_Test.ino
I am looking at how to make the ESP32S3 connected to an SD card via SDIO to be recognized as a USB mass storage device and easily read the folders and files stored on it. The SPI is there, but I need it to be in an SDIO connection with the SD card.
I am looking at how to make the ESP32S3 connected to an SD card via SDIO to be recognized as a USB mass storage device and easily read the folders and files stored on it. The SPI is there, but I need it to be in an SDIO connection with the SD card.
-
- Posts: 5
- Joined: Fri Nov 26, 2021 4:25 pm
Re: Example to use ESP32-S3 as MSC with SDIO SD card
I'm also interested in doing the same (connect sd card as USB mass storage with ESP32-S3 with Arduino framework). If you succeded in doing it, please tell us
-
- Posts: 836
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Example to use ESP32-S3 as MSC with SDIO SD card
Very rough and largely untested. I'll need to set up an sdio config to adapt it to sdio.
https://github.com/lbernstone/SD2USBMSC ... USBMSC.ino
https://github.com/lbernstone/SD2USBMSC ... USBMSC.ino
-
- Posts: 836
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Example to use ESP32-S3 as MSC with SDIO SD card
New functions added to SD_MMC.h to support this:
https://github.com/espressif/arduino-es ... USBMSC.ino
If someone has a 4-bit sdio rig set up, I'd be interested to know what sort of transfer rates you get versus 1-bit.
https://github.com/espressif/arduino-es ... USBMSC.ino
If someone has a 4-bit sdio rig set up, I'd be interested to know what sort of transfer rates you get versus 1-bit.
Re: Example to use ESP32-S3 as MSC with SDIO SD card
wbadry:
Are you looking for something like being able to load whichever program you want from an SD card?
Just SD card access, which is what Ibernstone posted the link for, basically gives you ReadFromLBA and WriteToLBA, but no file handling. That takes an operating system.
Are you looking for something like being able to load whichever program you want from an SD card?
Just SD card access, which is what Ibernstone posted the link for, basically gives you ReadFromLBA and WriteToLBA, but no file handling. That takes an operating system.
-
- Posts: 836
- Joined: Mon Jul 22, 2019 3:20 pm
Re: Example to use ESP32-S3 as MSC with SDIO SD card
The previous posted program will act as a USB-MSC client (as OP asked). The USB host (most likely a PC) will provide the OS and filesystem that accesses the disk lun. I was able to transfer a 100MB file in under 2 minutes using 1-bit SDIO. I'd expect at least double that rate with 4-bit, but I'm not sure if USB will be the bottleneck.
Who is online
Users browsing this forum: joebro391 and 33 guests