Page 1 of 1

Hardware integration with ESP32S3 Development board

Posted: Thu Jun 18, 2026 5:56 am
by ChiragGakare
I have a SD card module that is working fine with ESP32 module but dose not work with ESP32 S3 module. It shows SD card mounted failed and doesn't detect the SD Card Module. #include <SPI.h>

#include <SD.h>

#define SD_CS 10

void setup() {
Serial.begin(115200);

if (!SD.begin(SD_CS)) {
Serial.println("SD Card Mount Failed");
return;
}

Serial.println("SD Card Initialized");

File file = SD.open("/data.txt");

if (!file) {
Serial.println("Failed to open file");
return;
}

Serial.println("Reading file:");

while (file.available()) {
Serial.write(file.read());
}

file.close();
}

void loop() {
}
This the code I used to check the card detection.
Please suggest me a solution for this problem.

Re: Hardware integration with ESP32S3 Development board

Posted: Thu Jun 18, 2026 7:38 am
by Sprite
Moved ESP32-S31 -> Arduino

Re: Hardware integration with ESP32S3 Development board

Posted: Thu Jun 18, 2026 8:57 am
by krzychb
Maybe you need to adjust other SPI pins (sck, miso, mosi) for ESP32-S3, see https://github.com/espressif/arduino-es ... t-spi-pins

Re: Hardware integration with ESP32S3 Development board

Posted: Thu Jun 18, 2026 3:05 pm
by lbernstone
The SD_Test example demonstrates how to set the pins for non-default configurations.
If you have all 4 data lines connected on the SD, I'd recommend using SD_MMC, as SDIO will be much more performant than SPI.

Re: Hardware integration with ESP32S3 Development board

Posted: Sat Jun 20, 2026 3:43 am
by horace99
which specific ESP32S3 module are you using?
with the ESP32-S3-DevKitC-1 I used the following to connect a SD module

MOSI: 11
MISO: 13
SCK: 12
SS: 10

Re: Hardware integration with ESP32S3 Development board

Posted: Sat Jun 20, 2026 1:07 pm
by lichurbagan
On ESP32-S3 the default SPI pins may not match the pins used by your SD card module. Unlike many ESP32 boards, you often need to define the SPI pins manually.

Try something like this:

Code: Select all

#include <SPI.h>
#include <SD.h>

#define SD_CS   10
#define SD_MOSI 11
#define SD_MISO 13
#define SD_SCK  12

SPIClass spi = SPIClass(FSPI);

void setup() {
  Serial.begin(115200);

  spi.begin(SD_SCK, SD_MISO, SD_MOSI, SD_CS);

  if (!SD.begin(SD_CS, spi, 4000000)) {
    Serial.println("SD Card Mount Failed");
    return;
  }

  Serial.println("SD Card Initialized");
}

void loop() {}
Also check that the SD module is compatible with 3.3V logic. Some modules work on older ESP32 boards but fail on ESP32-S3 due to pin mapping or level-shifter issues. Here's a similar project: https://www.pcbway.com/project/sharepro ... d916b.html

So first confirm: CS, MOSI, MISO, and SCK pins are correctly wired and explicitly defined in code.