Hey all,
So I have run into an issue which might possibly be simply a lack of knowledge about SD Hardware operation. Essentially I am interfacing to an SD card over SPI using an ATXMEGA256A3B. Currently I am writing raw data to the card with a multiple block write call, using blocks of 16 sectors. The call itself is working perfectly fine, it just seems that at random intervals there are 100+ ms delays to write to the SD card, an example is shown in the image included as an attachment. This image is a snapshot of the O-Scope which is currently measuring SD multiple block write call executions, where the clock is representative of a 16 block write for each high/low logic state (~600 KB/s).
I am curious if anyone has any insight into what the large delay is during this transaction, this delay occurs roughly every 3-6 seconds of transfer (it seems to be slightly sporadic, sometimes having two delays closely together).
Furthermore I'm also curious if anyone has some suggestions to further pump up the data throughput for this SD Card. Currently I am using a SPI interface at 16 MHz with multiple block write executions (16 blocks per write). Any ideas what might speed it up even more?
Thanks in advance,
Josh
P.S. The SD card I am using is a Patriot 4GB micro SDHC card, class 10.