I have problem getting sdcard to work work in my case.
I'm using custom SD_CS pin for sdcard (IO13).
I'm using 512MB microsd card. (same result with couple of them)
Here is test code:
Code: Select all
#include "FS.h"
#include "SD.h"
#include "SPI.h"
#define SD_SCK 18
#define SD_MISO 19
#define SD_MOSI 23
#define SD_CS 13
void setup()
{
Serial.begin(9600);
SPIClass sdSPI(VSPI);
sdSPI.begin(SD_SCK, SD_MISO, SD_MOSI, SD_CS);
if (!SD.begin(SD_CS, sdSPI))
{
Serial.println("Card Mount Failed");
return;
}
}
void loop() {}
[ 349][E][sd_diskio.cpp:199] sdCommand(): Card Failed! cmd: 0x10
[ 350][E][sd_diskio.cpp:802] sdcard_mount(): f_mount failed: (3) The physical drive cannot work
[ 689][E][sd_diskio.cpp:199] sdCommand(): Card Failed! cmd: 0x00
Card Mount Failed
And error when card is removed:
[ 545][E][sd_diskio.cpp:802] sdcard_mount(): f_mount failed: (3) The physical drive cannot work
[ 1046][E][sd_diskio.cpp:126] sdSelectCard(): Select Failed
Card Mount Failed
Please look at design.
Thanks!