Sdfatlib error on Arduino Due

Hello!
I am having a strange problem with the sdfatlib on Arduino Due. I wired the SD Adapter with MicroSD card directly to Due, because Due is already 3.3 V. The default SD library from the Arduino IDE 1.5.6 works fine for me, and I can read and write on SD card correctly. However, when I try to use sdfatlib, sd.begin() returns me an error. I double checked the SPI Slave Select pins and tried to lower the SPI clock, but still no luck.

Here what I get in Serial Monitor when running the SdInfo sketch from the sdfatlib examples:

SdFat version: 20131225
type any character to start

init time: 1 ms

Card type: SDHC

Manufacturer ID: 0X28
OEM ID: BE
Product:      
Version: 0.0
Serial number: 302139392
Manufacturing date: 6/2012

cardSize: 8082.42 MB (MB = 1,000,000 bytes)
flashEraseSize: 128 blocks
eraseSingleBlock: true

SD Partition Table
part,boot,type,start,length
1,0XFF,0X69,1869771365,168689522
2,0X50,0X73,1701519481,1869881465
3,0X20,0X74,2573,0
4,0X0,0X0,2885681152,52415

vol.init failed
SD errorCode: 0X4
SD errorData: 0X1F

As you can see, the sdfatlib recognized the size of my SD card, but it fails to initialize for read/write operations. What am I missing here? Maybe my SD card is not supported?
Would really appreciate any help.

The partition table is reading as junk. It may be a wiring problem since there is no hardware CRC on transfers to detect bad SPI signals.

I double checked the SPI Slave Select pins and tried to lower the SPI clock, but still no luck.

How much did you lower the SPI clock?

SdFat uses very fast DMA SPI. It is about 10 times faster than the old SdFat included in the default SD.h. This means you need very clean short wires for the new SdFat.

Here is the difference in a benchmark.

SD.h

File size 5MB
Buffer size 8192 bytes
Starting write test. Please wait up to a minute
Write 240.00 KB/sec
Maximum latency: 54003 usec, Minimum Latency: 32106 usec, Avg Latency: 34119 usec

Starting read test. Please wait up to a minute
Read 444.27 KB/sec
Maximum latency: 19585 usec, Minimum Latency: 18356 usec, Avg Latency: 18436 usec

The new SdFat:

File size 5MB
Buffer size 16384 bytes
Starting write test. Please wait up to a minute
Write 3823.35 KB/sec
Maximum latency: 19636 usec, Minimum Latency: 4105 usec, Avg Latency: 4311 usec

Starting read test. Please wait up to a minute
Read 4150.43 KB/sec
Maximum latency: 6475 usec, Minimum Latency: 3915 usec, Avg Latency: 3944 usec

You can enable software CRC to check for SPI errors.

Edit SdFatConfig.h and change line 63 to this:

#define USE_SD_CRC 2

This will check for SPI I/O errors but slow transfers to something like this:

File size 5MB
Buffer size 16384 bytes
Starting write test. Please wait up to a minute
Write 1601.64 KB/sec
Maximum latency: 16326 usec, Minimum Latency: 10017 usec, Avg Latency: 10186 usec

Starting read test. Please wait up to a minute
Read 1670.72 KB/sec
Maximum latency: 12332 usec, Minimum Latency: 9775 usec, Avg Latency: 9806 usec

This means you need very clean short wires for the new SdFat

Sometimes helps a 39-100ohm resistor in series with sdcard's clock input (it suppress ringing with longer wires)..
Also a good Vcc decoupling at the sdcard's socket helps (ie 10uF multilayer ceramic in parallel with 100n ceramic).

Thanks for you suggestions guys! I tried setting SPI speed setting to SPI_QUARTER_SPEED before, but in didn't help. I did some testing and now after I changed both "#define USE_SD_CRC 2" and SPI to quarter speed setting, my SD card is working! So it looks like it is SPI speed problem then?
I also forgot to mention, that there is another device (Ethernet module) on the same SPI bus, which is suppressed by SS high level, but probably(?) can cause interference. Anyway, didn't know that bad wiring can cause that problem, guess I need to make some tests with it later.