ESP32-C3/6 + microSD module?

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
a_foss
 
Posts: 1
Joined: Mon Feb 06, 2023 8:12 pm

ESP32-C3/6 + microSD module?

Post by a_foss »

Hello, first time poster here but tinkerer of several years.

Been eyeing the ESP32-C3 & C6 for a few days and wanted to confirm if it's possible to use either board with a microSD card module?

May seem like an odd question at first, almost any micro-controller should, but the problem is that every module I've looked at uses SPI for the interface and both boards state on their Adafruit product pages that "All available GPIO pins (except for the SPI bus for flash) are broken out to the pin headers on the board for easy interfacing and programming."

I couldn't find an example online anywhere that demonstrates this use case so I wanted to check-in with the forums and see if any of you might have some input on this.

Adafruit's QT Py ESP32-C3 has a paired module specifically for it and seems to have the SPI pins broken out, unlike the other 2 boards: https://www.adafruit.com/product/5683

Browsing through Adafruit's microSD modules I see there's one that can use an interface I'm not familiar with, SDIO: https://www.adafruit.com/product/4682

Looking at Espressif's docs on the C3 board seem to imply support for SDIO, the C6 board docs give a warning that it might not be fully supported yet: https://docs.espressif.com/projects/esp ... sdmmc.html

Of the examples given in the esp-idf github repo the sdspi example shows support for both C3 & C6 using pins 1, 4, 5, & 6: https://github.com/espressif/esp-idf/tr ... card/sdspi

Aside from the QT Py do any of you think it should be possible to use this SDIO enabled microSD module with the C3/6 board? Or am I over thinking this and might there be an easier way to add persistent storage to these RISC-V micro controllers?

Thanks for any input!

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32-C3/6 + microSD module?

Post by adafruit_support_mike »

The ESP32-C3 QT-Py can use an SD card.
a_foss wrote: Mon Feb 06, 2023 9:25 pm Browsing through Adafruit's microSD modules I see there's one that can use an interface I'm not familiar with, SDIO: https://www.adafruit.com/product/4682
Most of the data protocols SD cards use are proprietary.. you have to sign an NDA or pay fees to use them. SDIO is the freely available protocol. It can use one data pin (standard SPI) or four data pins (quad SPI):

https://prodigytechno.com/sdio-protocol/

I'm not sure if Espressif has code to support SDIO on the ESP32-C6 yet.. they tend to release chips early and build firmware/API support while early adopters work with the hardware. It gives them a lot of motivated testing and feedback, but means you have to accept nonexistent/incomplete feature support and the occasional obscure bug for the first couple of years a new chip is on the market.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”