I am trying to use an SD Card with the ESP32-S3-WROOM-1-N16 on a custom PCB - ATTACHED Schematics below.
I have tried both the SD.h library and the SdFat.h.
PIN CONFIGURATION:
VSPI_MISO 40
VSPI_MOSI 41
VSPI_SCLK 39
VSPI_SS 38
f_mount failed: (3) The physical drive cannot work
Code: Select all
#include <Arduino.h>
#include <SPI.h>
#include <Mcp320x.h>
#define FS_NO_GLOBALS
#include <SdFat.h>
#include <FS.h>
#include <SPIFFS.h>
#define VSPI_MISO 40
#define VSPI_MOSI 41
#define VSPI_SCLK 39
#define VSPI_SS 38
SdFat *sdp;
/*
#define SPI_CS 42 // SPI slave select
#define ADC_VREF 5080 // 5.080 V Vref
#define ADC_CLK 1600000 // SPI clock 1.6MHz
#define CLK_PIN 39
#define MISO_PIN 40
#define MOSI_PIN 41
#define ALTERNATE_PINS
void setup() {
//initialise two instances of the SPIClass attached to VSPI and HSPI respectively
Serial.begin(115200);
sdp = new SdFat();
if(!sdp->begin(38, SD_SCK_MHZ(25))) { // ESP32 25 MHz limit
Serial.println("sdp->begin failed\n");
} else {
Serial.println("sdp->begin OK\n");
}
}
// the loop function runs over and over again until power down or reset
void loop() {
*/
}
Any ideas on how to get this up and running? The resistors that are pulling up the data lines have the value of 20kOhms, I've read on some posts that the recommended are 10kOhms, it should not make any difference really. Any suggestions?