SPI vs. SDIO on ESP32-S3 Thing Plus

Hello,

I am using SD_sdFat_Bench.ino as a reference, and it works fine on my board. However, while analyzing its code, I encountered two questions:

  1. The code uses SPI for communication with the SD card, whereas the board’s hardware overview mentions: “We chose to connect the SD card to the SDIO interface instead of the dedicated SPI bus.”
    Does this mean that both interfaces (SPI and SDIO) are connected to the SD card, or is SPI being used exclusively?
  2. The reference code uses the following SPI pin settings:

// ESP32-S3 Thing Plus
int pin_spiSCK = 38;
int pin_spiPICO = 34; // microSD SDI
int pin_spiPOCI = 39; // microSD SDO
int pin_spiCS = 33;

If I were to implement SPI functionality from scratch, how could I determine which GPIOs are dedicated to SPI on this board?

Thanks in advance.

Looks you’ll have to study the schematics, available on the page SparkFun Thing Plus - ESP32-S3. In there it shows the SD :

So there is the SDIO connection to the SD card. You can also control the SD-card with “normal” SPI. You need to start with the MicroSD connections to determine the SPI pins. Then find which ESP32 pin is connected to it.

Another option is to search Internet on “SD card connection”. it will show many pages which SD card connections map between SDIO and SPI.

It feels like backward engineering, but at least Sparkfun wrote a good example.

That is what I would do…

Ah, this is useful.
I was combing through the Hookup Guide and datasheet for answers but overlooked the schematics.

Thank you!