[En-Nut-Discussion] Nut 3: SD/MMC speed?

Jesper Hansen jesperh at telia.com
Fri Jan 27 22:38:45 CET 2006


Aaron,

I think you missed my point. The speed problem it not with the transfer, 
it's with the block write time of the card.

A fast standard card has a block write time of typ 20 mS. Even if your 
133x card is 133 times faster it still takes about 150 uS per sector 
write. That's 300 mS/MB or a max throughput of about 3.3 MB/s.

Note that this is typical values, max is about 10 times worse, and will 
hit without warning. This will be seen with a card that has been used 
for some time. The internal flash wear out, and the wear levelling 
routines and shifting around of blocks by the internal processor slow 
down the writes.

To get the fastest throughput, you should write (without a filesystem), 
to a card that has all it's block erased in advance. This will avoid the 
need for the slow block erase.

/Jesper


Aaron Burt wrote:
> On Fri, Jan 27, 2006 at 09:21:03AM +0100, Harald Kipp wrote:
> 
>>At 17:16 26.01.2006 -0800, you wrote:
>>
>>
>>>Assuming the card is fast enough, how fast can the ethernut write to the
>>>MMC port?  For some perspective, MMC supports a 20 MHz clock, which
>>>means ~2.4 MB/s, and SD supports a 25 MHz clock and 4 bits, giving
>>>~10MB/s.
>>
>>Using the FTP client on Ethernut 3 I observed transfer rates of 90 kB/s
>>for writing and 300 kB/s for reading. I assume, that this can be
>>increased somewhat by optimizing the file system code and the MMC
>>interface, which is not yet interrupt driven. Also note that this
>>was pure data throughput, not including TCP/IP headers or FAT table
>>updates. But as Jesper explained, MMC cards are slow in writing.
> 
> 
> Thank you.  So it sounds like there's some work that can be done.  If I
> can get 50 MHz out of the timer chip and use 4-bit transfer mode, I
> could theoretically write to 133x SD cards at their full rated 20 MB/s.
> 
> Once I can get a board and start fiddling with it, I'll let y'all know
> how fast I can push the SD/MMC port.
> 
> I know that with interrupts and such, there's no way the ARM can push
> out that much data, but I'm planning on using a state machine in the
> CPLD to pull data off an ADC on the expansion port and push it straight
> to SD.
> 
> Thank you for your answers,
>   Aaron
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
> 
> 



More information about the En-Nut-Discussion mailing list