Page 1 of 1

ESP32S3 SD-card init problem

Posted: Thu Apr 23, 2026 3:10 pm
by stefan.erni
Hi Ben

I'm trying to initialize an SD card on a ESP32S3, but I keep getting a 255 return (no card) instead of 0 (card ok).
Is there something else I need to configure to make this work with the S3? With the ESP32 wroom32 This worked very well.
2026-04-23_16-01-33.PNG
2026-04-23_16-01-33.PNG (28.17 KiB) Viewed 74 times
2026-04-23_16-09-08.PNG
2026-04-23_16-09-08.PNG (117.21 KiB) Viewed 74 times

Re: ESP32S3 SD-card init problem

Posted: Thu Apr 23, 2026 4:40 pm
by BenR
Hi Stefan,

What type of card are you using? Not every card supports the 4-bit mode, maybe try the 1-bit mode and see if that works.

We are using the 4-bit mode on an ESP32S3 in house and it is working very well but we have to be careful about which cards we use.

All SDHC or SDXC cards are suppost to support 4-bit mode but this is not my experience.

Re: ESP32S3 SD-card init problem

Posted: Thu Apr 23, 2026 4:59 pm
by stefan.erni
Hi Ben

Glad to hear it's working for you.
I always use the same type of SD card—a 32GB SanDisk—for the 4-bit version.
It worked fine with the PIC32 and ESP32 WROOM.
I tried a different board—this time from SparkFun—and the card initialization caused problems there as well.
I checked the pins and they should be okay.

I think it's just a startup issue in my program?

Re: ESP32S3 SD-card init problem

Posted: Thu Apr 23, 2026 9:09 pm
by BenR
The esp may have a different return value for the init. I may simply be ignoring it. Might be worth seeing if the other functions work ok and ill have a gander at the code to check the return values.