SDFat Library and SPI1

Has anyone used the SDFat Library with the Photon’s SPI1? What changes need to be made to the library to make this work?

Thanks

I think I may have found it myself. It looks like this will allow me to use SPI1

The Photon should work properly using #define SPI_CONFIGURATION 1 with SDFAT. I have one set up that way.

4 Likes

Thanks @rickkas7 ! I am just waiting on the sd card board to arrive to test it.

Thanks @rickkas7 for helping! Let us know @MichaelRensing if it works.

I am trying out the trymefirst file in examples. I have set

#define SPI_CONFIGURATION 1

However, I am running into an error with

#elif SPI_CONFIGURATION == 1
// Secondary SPI with DMA
// SCK => D4, MISO => D3, MOSI => D2, SS => D1
SdFat sd(1);
const uint8_t chipSelect = D5;

I am getting an error on the line constructing the SDFat, no matching function for call to ‘SdFat::SdFat(int)’
What do I need to modify to get the micro sd working?

I needed to verify against a photon, not just try to verify the code.

1 Like