Using SD Card with other than default SPI_CONFIGURATION == 0

I am using the SDFat library in (SPI_CONFIGURATION == 0) and it is working fine. However, I am using a board which already uses pins A2-A6.

I would appreciate some help on selecting which of the other remaining configurations can also be used in lieu of SPI_CONFIGURATION == 0?

// Setup SPI configuration.
#if SPI_CONFIGURATION == 0
// Primary SPI with DMA
// SCK => A3, MISO => A4, MOSI => A5, SS => A2 (default)
SdFat sd;
const uint8_t chipSelect = SS;
#elif SPI_CONFIGURATION == 1
// Secondary SPI with DMA
// SCK => D4, MISO => D3, MOSI => D2, SS => D1
SdFat sd(1);
const uint8_t chipSelect = D1;
#elif SPI_CONFIGURATION == 2
// Primary SPI with Arduino SPI library style byte I/O.
// SCK => A3, MISO => A4, MOSI => A5, SS => A2 (default)
SdFatLibSpi sd;
const uint8_t chipSelect = SS;
#elif SPI_CONFIGURATION == 3
// Software SPI.  Use any digital pins.
// MISO => D5, MOSI => D6, SCK => D7, SS => D0
SdFatSoftSpi<D5, D6, D7> sd;
const uint8_t chipSelect = D0;
#endif  // SPI_CONFIGURATION

Not sure where the actual issue is in the decision.
Since 0 means Primary SPI with DMA the logical next option would be

#elif SPI_CONFIGURATION == 1
// Secondary SPI with DMA
// SCK => D4, MISO => D3, MOSI => D2, SS => D1
1 Like

For some reason,SPI_CONFIGURATION == 1 will only work if SS is changed to D5 (instead of D1).