Description
Board
ESP32 Dev Board
Device Description
ESP32 Dev kit.
Micro SD card breakout board (3.3V).
Hardware Configuration
GPIO 5 connected to CS
GPIO 23 connected to MOSI
GPIO 18 connected to CLK
GPIO 19 connected to MISO
Version
v2.0.6
IDE Name
PlatformIO (VS Code)
Operating System
Ubuntu
Flash frequency
40Mhz
PSRAM enabled
no
Upload speed
921600
Description
Most SD cards will not connect. The sketch compiles and runs, but when trying to mount SD cards produces an error.
Using the SD library communicating by SPI most SD cards do not mount. I have five identical (same size, type, brand etc.) micro SD cards, one of them always connects and runs perfectly. The other four do not mount at all.
They all mount to my computer and have all been formatted as FAT32.
I have tried directly wiring up the SD cards and I get the same behaviour (four don't work and one does).
I have tried powering off a power supply to ensure that isn't the issue but the behaviour remains the same.
The error message that I get is:
ff_sd_initialize(): APP_OP_COND failed: 1
This is different to the error that I get when the SD cards are not connected which is:
ff_sd_initialize(): GO_IDLE_STATE failed
Sketch
#include "FS.h"
#include "SD.h"
#include "SPI.h"
void setup()
{
Serial.begin(115200);
}
void loop()
{
if (!SD.begin())
{
Serial.println("Card Mount Failed");
}
else
{
Serial.println("Worked");
}
delay(2000);
}
Debug Message
[ 72613][W][sd_diskio.cpp:550] ff_sd_initialize(): APP_OP_COND failed: 1
[ 72613][E][sd_diskio.cpp:805] sdcard_mount(): f_mount failed: (3) The physical drive cannot work
Other Steps to Reproduce
I have also reproduced this soldering the pins of a micro SD card adaptor to the ESP32 with the correct pull-ups. The behaviour is identical.
I have tried two different dev boards and the behaviour persists.
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.