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.
ESP32S3 SD-card init problem
-
stefan.erni
- Valued Contributor
- Posts: 1216
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 225 times
- Been thanked: 240 times
-
BenR
- Matrix Staff
- Posts: 2182
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 595 times
- Been thanked: 785 times
Re: ESP32S3 SD-card init problem
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
stefan.erni
- Valued Contributor
- Posts: 1216
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 225 times
- Been thanked: 240 times
Re: ESP32S3 SD-card init problem
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?
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?
- Attachments
-
- 2026-04-23_17-28-22.PNG (77.5 KiB) Viewed 43 times
-
BenR
- Matrix Staff
- Posts: 2182
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 595 times
- Been thanked: 785 times
Re: ESP32S3 SD-card init problem
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.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel