It is working at full speed!!!
Here are the result with a Kingston 2 GB microSD card:
Type any character to start
Free RAM: 62747
Type is FAT16
File size 20MB
Buffer size 32768 bytes
Starting write test. Please wait up to a minute
Write 2224.90 KB/sec
Maximum latency: 721045 usec, Minimum Latency: 8101 usec, Avg Latency: 14716 usec
Starting read test. Please wait up to a minute
Read 3954.20 KB/sec
Maximum latency: 9005 usec, Minimum Latency: 7940 usec, Avg Latency: 8286 usec
Done
Then I enable CRC checking (USE_SD_CRC set to 2 in SdFatConfig.h) and I modify bench.ino so that it loops for ever.
After more than 100 loops, I don't get any error
=========== Pass number 106 ===========
Free RAM: 62743
Type is FAT16
File size 20MB
Buffer size 32768 bytes
Starting write test. Please wait up to a minute
Write 1268.47 KB/sec
Maximum latency: 370285 usec, Minimum Latency: 19459 usec, Avg Latency: 25752 usec
Starting read test. Please wait up to a minute
Read 1686.36 KB/sec
Maximum latency: 20292 usec, Minimum Latency: 19243 usec, Avg Latency: 19429 usec
Done
=========== Pass number 107 ===========
I guess than, despite of large (and ugly) connections between the two cards, the buffer on the SDshield help to reformat the signals.
Thank you fat16lib for your library!
I am having trouble getting my card prepped for the DUE, I am using the SanDISK Extreme Pro 16 Gb (95Mbps)
Running QuickStart
Enter the chip select pin number: 10
Card successfully initialized.
Can't determine the card size.
Try another SD card or reduce the SPI bus speed.
The current SPI speed is: 10.50 MHz
Edit spiSpeed in this sketch to change it.
Running PrintBenchmark
Type any character to start
Free RAM: 95507
Can't access SD card. Do not reformat.
SD errorCode: 0X4,0XFF
Hmmm, interesting, I changed it to EIGHTH speed and quickstart, benchmark and sdformatter all worked. But that was the only speed that allows me. I hope this is fast enough for my application. How can I try and obtain a faster speed. Perhaps the 6'' cables are too long.
If you reduce cabling, you might get close to 14Mhz. But with that resistors, you'll not move further then that.
I've used the sdcard in my tft also, and I've managed to get up to 28Mhz by removing the resistors and just put a shunt in their place.
The only way I've got 42Mhz, was with one sdcard reader like that with wires directly attached to the sdcard reader socket bypassing all the electronics there. Those electronics are for voltage translation and are very slow. Since Due is already 3.3V, you can safely bypass it.
I can place a picture here later for your reference.
Thanks for the work on the library! Here's first results from bench for an 8 GB PNY micro class 4 in the Adafruit micro SD breakout:
Type any character to start
Free RAM: 95415
Type is FAT32
File size 5MB
Buffer size 100 bytes
Starting write test. Please wait up to a minute
Write 85.27 KB/sec
Maximum latency: 159470 usec, Minimum Latency: 15 usec, Avg Latency: 1171 usec
Starting read test. Please wait up to a minute
Read 1208.31 KB/sec
Maximum latency: 865 usec, Minimum Latency: 15 usec, Avg Latency: 81 usec
What were they thinking when they put the pins in the middle, right under the edge of the shield footprint? (I guess they were thinking minimum conductor length, and matching the original layout but not to accommodate existing shields that ignored the ICSP header...)
Here's the same card with 20 MB and 32768 Buffer at full speed.
Free RAM: 62747
Type is FAT32
File size 20MB
Buffer size 32768 bytes
Starting write test. Please wait up to a minute
Write 2074.35 KB/sec
Maximum latency: 452410 usec, Minimum Latency: 7830 usec, Avg Latency: 15788 usec
Starting read test. Please wait up to a minute
Read 4381.52 KB/sec
Maximum latency: 12166 usec, Minimum Latency: 7413 usec, Avg Latency: 7476 usec
Well, if that is some kind of conflict between DMA and I2C, you can try the Henning Karlsen RTC library. I think it uses some kind of softI2C, it might work for you.
Nice library - I've combined it and RTClib, as I think RTClib was better expect it was using Wire.h and I'd rather go without..
Anyway, my bad and my apologies - it seems after all not to be SdFat that causes this, it's UTFT which makes sure RTC is in accessible.. Investigating further..
I can't test unless I have a board and it's a lot of labor for a few users.
I understand, maybe I can bribe you with some hardware when the time comes
As for the number of users, that's in the lap of the Gods.
SDIO provides super performance but you need large transfers with a lot of buffer.
External RAM is supported, so buffer space should not be a problem.
I would be interested to know what Arduino applications would require more than a few MB/sec of I/O to an SD card.
That's probably the $64 question. I'm hoping to also have I2S support so maybe audio apps that analyse sound, a DSO that saves the waveform, logic analyser.
I guess I'm working on the "if you build it they will come" model, but they may not.
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?