chipKIT® Development Platform

Inspired by Arduino™

Fubarino SD (and others) SD read/write performance

Created Wed, 10 Oct 2012 00:29:47 +0000 by EmbeddedMan


EmbeddedMan

Wed, 10 Oct 2012 00:29:47 +0000

I just tested the read and write performance for SD card access from the Fubarino SD card, and got about 100KB/s for both read and write performance. It mattered a little bit what type of card I used, but not a whole lot. I assume that the performance of other chipKIT boards will be about the same.

Does this match with everybody else's experience? I'm using the stock SD library that comes with the current version of MPIDE. (20120903)

*Brian


majenko

Wed, 10 Oct 2012 09:10:57 +0000

I don't know about the stock SD library, but on RetroBSD I get:

# ./fsdisk 30
30 second sample
266 Kbytes/sec write 4096 bufsize 2000 max blocks
30 second sample
683 Kbytes/sec read 4096 bufsize 2000 max blocks

pito

Thu, 18 Oct 2012 19:49:33 +0000

The maximum measured write/read speed under the RetroBSD (20Mhz SPI, enhanced buffering, 32bit SPI) is 780kB/s write and 1743kB/s read (measured with "dd"). It depends heavily on the sdcard used, however. The fastest cards are 256-512MB ones. Typical speeds with SDHC 4GB's are ~half of it. The arduino's SdFat (made by fat16lib) library is currently elaborated to support teensy 3.0 (arm). It would be nice to get SdFat support for the chipkit as well (a better performance).


rasmadrak

Thu, 18 Oct 2012 20:53:02 +0000

32bit SPI? Are you using the NDA'd version of the SD protocol, or are you running 4 SPI-lines parallell in some way?

In any case, I'd like to know more! :)


pito

Thu, 18 Oct 2012 21:31:42 +0000

..pic32 has got 8/16/32bit SPI data width modi with 16/8/4 words deep FIFO (for tx and for rx). You may use so called "enhanced buffering" as well, where the performance is comparable with DMA (it does not use the DMA however). Long time back I wrote a piece of code for such a mode, we use it till today, the max speed with raw block transfer measured is 2.21Mbytes/sec (20MHz SPI clock). http://retrobsd.org/topic/sdcard-driver-enhbuf-ii/


rasmadrak

Fri, 19 Oct 2012 05:05:56 +0000

Interesting! I thought we were limited to 8bit transfers! I'll check it out! :)


pito

Sat, 20 Oct 2012 14:11:54 +0000

8 or 32bit SPI transfers - that is not a big difference when using enhbuf, what makes the difference is the using the fifo buffering.. ;)


Omnimusha

Sun, 09 Jun 2013 23:29:41 +0000

..pic32 has got 8/16/32bit SPI data width modi with 16/8/4 words deep FIFO (for tx and for rx). You may use so called "enhanced buffering" as well, where the performance is comparable with DMA (it does not use the DMA however). Long time back I wrote a piece of code for such a mode, we use it till today, the max speed with raw block transfer measured is 2.21Mbytes/sec (20MHz SPI clock). http://retrobsd.org/topic/sdcard-driver-enhbuf-ii/

hi, how do you mention this?. the link is down. all this for the SPI port?, You can connect a SD on Serial Port?