Changing the default SDIO pins in Arduino IDE to connect ESP32S3 to SD Card

Hi Everyone
I want to connect SD card to ESP32S3 via SDIO interface.
But limitations in PCB design, I had to change the default pins SDIO.
I wanted to use arduino ide for programming, is there a way to change the default SDIO pins in arduino to my custom pins?

to connect a micro SD card to a ESP32_S3_DevKit_1 I used the default pins

// ESP32_S3_DevKit_1 connections
// ESP32_S3 SCK pin GPIO12  to SD card  SCK
// ESP32_S3 MISO pin GPIO13  to SD card  MISO
// ESP32_S3 MOSI pin GPIO11  to SD card  MOSI
// ESP32_S3 SS  pin GPIO 10   to SD card SS
// connect ESP32_S3 GND and 3.3V to SD GND and 3V3

what pins do you wish to use?

1 Like

in arduino???? Do you mean you want to change your sketch to reflect new pins?

1 Like

Define the SPI pins you want to use and start SPI with;

SPI.begin(SCK, MISO, MOSI, CS);

2 Likes

I was able to setup the SD card via SPI and custom pins.
But for more speed I want to use SDIO protocol.
How can I change the SDIO pins in programming according to the designed board?

Do you mean using the SD_MMC.h driver ?

yes.

SD_MMC.setPins(MMCSCK, MMCCMD, MMCD0, MMCD1, MMCD2, MMCD2);

1 Like

Hello,
I am looking for using SD_MMC for the sdio access. Did the declaration below solve your problem?
For me, it is the same issue for the board feather ESP32S3 No PsRAM.

Hello
Yes, with this command

SD_MMC.setPins(MMC STOCK,MMC CMD,MMC0,MMCD1,MMCD2,MMCD2)

I was able to set the SDIO pins according to my custom pin.

Wich pin did you use for SCK, CMD, D0,D1,D2,D3?
Could you post the final working code please?
Did you add 10k pull-up on each pin?

According to ESP32S3 datasheet, any desired pin can be used for SDIO.

Yes, I used pull up resistor, but pay attention to the reference designs.
I'm just new starting to work with SD card and I'm still checking performance my board.