Page 1 of 1
Example to use ESP32-S3 as MSC with SDIO SD card
Posted: Thu Mar 07, 2024 5:31 pm
by wbadry
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.
Re: Example to use ESP32-S3 as MSC with SDIO SD card
Posted: Fri Mar 08, 2024 3:44 pm
by liaifat85
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
Posted: Tue Mar 12, 2024 8:38 pm
by wbadry
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.
Re: Example to use ESP32-S3 as MSC with SDIO SD card
Posted: Thu May 16, 2024 8:31 am
by AyubowanPro
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
Re: Example to use ESP32-S3 as MSC with SDIO SD card
Posted: Fri May 17, 2024 7:41 pm
by lbernstone
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
Re: Example to use ESP32-S3 as MSC with SDIO SD card
Posted: Wed Jun 12, 2024 5:11 pm
by lbernstone
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.
Re: Example to use ESP32-S3 as MSC with SDIO SD card
Posted: Wed Jun 12, 2024 11:54 pm
by Rukbat
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.
Re: Example to use ESP32-S3 as MSC with SDIO SD card
Posted: Thu Jun 13, 2024 3:09 am
by lbernstone
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.