Hi guys
I am currently in the process of trying to optimize the write times to an SD card using the SPI interface. While I have managed to increase the speed a fair bit using the clock divider and the libraries found on the Adafruit website I am having trouble pushing the rate much higher then 200KB/s per 512 bytes (excluding the delay / overhead between each 512 bytes being written).
I believe the write speed can be at least doubled again as there is quite a large delay between each set of 8 clock pulses generated for each byte. The image below shows more clearly what I mean. Regardless of what I set the clock divider to the delay stays the same: about 2 us or about 70% of the total time taken to write a single byte. In theory this delay could be shrunk down to 2 or 3 clock pulses in length without affecting data integrity. The problem is I do not know where this delay is coming from. I have looked through both the SPI header and cpp source files and cannot find it.
If any of you can point me in the right direction it would be greatly appreciated.
-Ben