I would like to experiment with the new system. But I am in the dark how you hook up an Arduino Due with an Sd card shield (I have a SEEED Studio SD card shield v 3.1). Could you please give me some details on how you do that?

The web site with only a description (no schematic) is http://www.seeedstudio.com/depot/sd-card-shield-p-492.htmlThere is no description of the connectors to this SD shield. It seems to me that a 6 pin connector on the arduino due (next to the processor chip) needs to be connected to the connectors on the SD shield. I don't know the name of these and at the store they couldn't help. The 5V vs 3.3 V problem you mention could be solved with a jumper from the Due to the SD shield. Any ideas on the connectors and how to connect them?

There's an issue when SdFat and the VGA library are used together (see http://arduino.cc/forum/index.php/topic,150517.msg1226434.html#msg1226434)

I've been looking into this and the problem seems to be down to an SPI overrun. The VGA library is quite a DMA hog, and what appears to happen is that in spiRec() the TX DMA sends data faster than the RX DMA can write it to memory due to the bus contention.

Looking at the data sheet, the SPI_MR register has a flag SPI_MR_WDRBT which should hold up the TX DMA until the RX DMA has read the SPI_RDR register. I'm experimenting with the following fix:

in Sd2Card.cpp, in spiRec() around line 234after this line: #if USE_SAM3X_DMACadd this line: pSpi->SPI_MR |= SPI_MR_WDRBT;

in spiSend() around line 268after this line: #if USE_SAM3X_DMACadd this line: pSpi->SPI_MR &=~ SPI_MR_WDRBT;

The idea is that in spiRec() the SPI_MR_WDRBT flag helps keep the two DMA channels in sync, but spiSend needs the flag turned off again otherwise it will hang.

I have not given this fix much testing other than running bench and QuickStart, and a modified QuickStart which outputs to VGA, which all work correctly.

Yes that's too much of a compromise :-( I've been experimenting with other flags and DMA settings and I can't get the lost speed back.

Also after modifying the bench example to output to the VGA library, it turns out that setting SPI_MR_WDRBT is slower than disabling DMA (#define USE_SAM3X_DMAC 0) when using both libraries together. There is no way I can find of getting the two libraries to share DMA without either SdFat going too slow or getting SPI underruns, or the VGA library getting visual glitches. Disabling DMA in SdFat is faster by about 50% (800KB/s v 1200KB/s) with no glitching.