I have an Adafruit Micro SD Breakout Board that has been running along with a MPU6050 on a Photon for a couple of years. Due to my breaking the UFL antenna connector I am now trying to set this up on a Photon 2. I get a failure in sd.begin(). Tracing further there is a failure "SD_CARD_ERROR_CMD0" in SdSpiCard.cpp. I think this is where it checks "if (cardCommand(CMD0, 0) == R1_IDLE_STATE)". I have tried both SPI and SPI1 and made sure the pin connections are correct. I have tried OS 5.6, 5.82 and 5.9 to no avail. I have tried SdFat versions 1.0.15 and 1.0.16.
I use these pin definitions:
#define CLK S2//13 // SPI Clock, shared with SD card BM "SCLK"
#define MISO S1//12 // Input data, from VS1053/SD card BM "MISO"
#define MOSI S0//11 // Output data, to VS1053/SD card BM "MOSI"
#define SD_SPI_SETTING SPISettings(25000000, MSBFIRST, SPI_MODE0)
//const uint8_t chipSelect = S3;
const int SD_CS = S3;
My SD_card_setup is:
if (!sd.begin(SD_CS, SD_SCK_MHZ(25)))
{
led_blink(LED_FAILURE,3,LED_SLOW);
Serial.println("SD Card Open Failed");
return false;
}
else
{
Serial.println("SD Card Open Good!");
}
Has anyone had success in getting the Adafruit Micro SD Breakout Board running on a Photon 2? Any help would be greatly appreciated.
Bob