Hi all, after a few days of testing, I achieved a great writing speed with SdFat library, so I want to tell you how to do this. First you have to do this, like admin posted before (many thanks for your support):
The basic problem is that the SD card driver is hard-wired into the ShieldBuddy Arduino library so the SdFAT library is ignored. It looks like the SdFAT library is much faster than the standard one is because it uses a DMA-based SPI driver. Theoretically this is possible on the ShieldBuddy also but we have not implemented it yet.
The SdFAT library can be used but you will have to remove the hard-wired one. This is done by editing the platform.txt in "C:\Program Files (x86)\Arduino\hardware\aurduino\aurix".
platform.txt (11.23 KB)
Make sure you save the original one!
Delete the "C:\Program Files (x86)\Arduino\hardware\aurduino\aurix\libraries\SD" directory
The SdFAT library is then used. However we have not extensively tested this and there is no guarantee it will work properly. Running the SPI at 50MHz will not work. 10MHz is a safe starting point!
Then enable the SdFatSoftSpiEX class in SdFatConfig.h, initialize your sd object with SdFatSoftSpiEX<61, 63, 62> sd; // that are the MISO, MOSI and SCK pins on P201 Afterwards you can do sd.begin(SD_CS_PIN, SD_SCK_MHZ(40)) So I achieve 981KB/sec writing speed in a simple bench test with an 16GB MicroSDHC card. I think this is pretty fast! I am very happy with this, because now my project is working like it should do.
I have been trying to get an ADAfruit Display/SD card board operating
I have not succeeded in getting the SD Card using Pins 13,11,10 on the ShieldBuddy despite the fact that the display works fine on these pins. I have tried all the fixes suggested on the Web to no effect.
I then read this thread on "Fast SD" and realised that the SD software seems to use the SPI pins on the P201 connector using the guidance above was able to get a stand-alone ADAfruit SD Breakout Board working.
I am using the Arduino/VB IDEs but this strategy would probably work also with the Eclipse IDE
What to do: Just connect the board to Pins 61, 63. & 62 // that are the MISO, MOSI and SCK pins on P201.I used Pin 4 as the card select pin and bingo!
I've tested to change the SPI pins to other digital pins and it's working very well. So you can use every digital pin you want as MISO, MOSI, Clock and CS. I only want to tell you cause you can use more other shield easier if the pins P201 are free. You only have to change the pin numbers in the SoftwareSpiEX Class at the beginning of your program. Have fun!