I have an Arduino Due I'm using for a project to log a single analogue stream at 200kBytes/sec.
Ive seen various posts that claim to be able to write to SD at up to 4MB/sec with max latencies as low as a few milliseconds. But I haven't been able to replicate anything like that.
I have a sparkfun micro sd shell to which I've add a hex socket to fit onto the SPI pins on the Due, and I'm using a Kingston 8GB micro SDHC card freshly formatted using the official formatter.
I've set #define ENABLE_EXTENDED_TRANSFER_CLASS 1 and #define USE_STANDARD_SPI_LIBRARY 0 in SdFatConfig.h (although I'm not sure what the latter setting actually does), which seems to be all I need to do according to the SDFat documentation.
I've tried this in the bench.ino program from the examples folder. The program contains the statement 'const uint8_t chipSelect = SS;' I haven't worked out where SS is defined or what it's meant to do, so I added a '#define SS 8' beforehand to set the CS pin number.
However, the best results are only 187 KB/sec and 130ms max latency, which is nowhere near the best claims I've seen.
Can anyone advise me on how to improve this? I'm looking for something better than 400kB/s and 10-20ms max latency (I can soak the rest up with buffering).
ps I've also got read error, even though the files are perfectly ok, so I must be doing someting wrong.