Try running the QuickStart example. I assume you still are using pins 4 and 5 for chip select.
First set the DISABLE_CHIP_SELECT symbol to 4 and enter 5 at the prompt.
Next set DISABLE_CHIP_SELECT to 5 and enter 4 at the prompt.
You should see something like this for each card. I ran it on a Uno.
SPI pins:
MISO: 12
MOSI: 11
SCK: 13
SS: 10
SD chip select is the key hardware option.
Common values are:
Arduino Ethernet shield, pin 4
Sparkfun SD shield, pin 8
Adafruit SD shields and modules, pin 10
Enter the chip select pin number: 5
Disabling SPI device on pin 4
Card successfully initialized.
Card size: 16004 MB (MB = 1,000,000 bytes)
Volume is FAT32, Cluster size (bytes): 32768
Files found (date time size name):
2000-01-01 01:00:00 22624 adc4pin00.csv
2000-01-01 01:00:00 128890 bench0.txt
Success! Type any character to restart.
If QuickStart works with both cards try the TwoCards example with SD1_CS set to 4 and SD2_CS set to 5.
If that fails try reversing the order, set SD1_CS to 5 and SD2_CS to 4.
If both fail, try finding the point of failure by inserting print statements.
The TwoCard example should print something like this. Again, I ran it on an Uno.
FreeStack: 333
type any character to start
------sd1 root-------
Dir1/
------sd2 root-------
Dir2/
------sd1 Dir1-------
------sd2 Dir2-------
Writing test.bin to sd1
Copying test.bin to copy.bin
File size: 1000000
Copy time: 6288 millis
------sd1 -------
2000-01-01 01:00:00 0 Dir1/
2000-01-01 01:00:00 1000000 test.bin
------sd2 -------
2000-01-01 01:00:00 0 Dir2/
2000-01-01 01:00:00 1000000 copy.bin
Renaming copy.bin
------sd1 -------
2000-01-01 01:00:00 0 Dir1/
2000-01-01 01:00:00 1000000 test.bin
------sd2 -------
2000-01-01 01:00:00 0 Dir2/
2000-01-01 01:00:00 1000000 rename.bin
Done
You can try one more thing. When I run TwoCard on a Due, it fails unless I slow the SPI clock. Sometime multiple SPI module load the SPI bus.
Try changing the begin calls like this.
// initialize the first card
if (!sd1.begin(SD1_CS, SD_SCK_MHZ(4))) {
sd1.initError("sd1:");
}
...
// initialize the second card
if (!sd2.begin(SD2_CS, SD_SCK_MHZ(4))) {
sd2.initError("sd2:");
}