EmbDev.net

Forum: ARM programming with GCC/GNU tools slow msd on at91sam7x


Author: Mrmz Mrmz (mrmz)
Posted on:

Rate this post
0 useful
not useful
Hello,
i'm making msd on at91sam7x with sd everything works good, the only
problem is transfer rates.  During data transfer to a sd its only about
60 to 70 kbytes/s (regarding of a sd card). Is there any programme on
the web (with which you can achieve more than 4Mbits/s)so i could look
and see what i did wrong. Have you got any sugestions. Has someone used
Atmel's msd code for at91sam7, what with transfer  rates?
Thanks

Author: Clifford Slocombe (clifford)
Posted on:

Rate this post
0 useful
not useful
Mrmz Mrmz wrote:
> Hello,
> i'm making msd on at91sam7x with sd everything works good, the only
> problem is transfer rates.  During data transfer to a sd its only about
> 60 to 70 kbytes/s (regarding of a sd card). Is there any programme on
> the web (with which you can achieve more than 4Mbits/s)so i could look
> and see what i did wrong. Have you got any sugestions. Has someone used
> Atmel's msd code for at91sam7, what with transfer  rates?
> Thanks

SD cards vary wildly in performance terms. I spent a long time with a
commercial file system library wondering why I only got 32Kb/s write
speed, eventually the vendor provided me with their test data for
various cards and they ranged from 32kb/s to near 1Mb/s !

Read times are typically faster than write. There are a number of memory
card and drive speed test programs available on the web, try testing teh
card on a PC to get a baseline performance. Bear in mind however that
your PC will likely use SDIO wheras your implementation may use SPI; but
it may be a useful method of comparing cards.

Also if you use a software GPIO driver rather than SPI or SDIO hardware
you are likely to get lower rates. Finally you do need to check that the
driver is throttling up after testing the card performance capability.

Clifford

Author: Mrmz Mrmz (mrmz)
Posted on:

Rate this post
0 useful
not useful
Clifford Slocombe wrote:

> Also if you use a software GPIO driver rather than SPI or SDIO hardware
> you are likely to get lower rates.

So if i would like to do SDIO on GPIO would it be slower than use of
simple SPIbus  for read write operation on SD card

Author: Clifford Slocombe (clifford)
Posted on:

Rate this post
0 useful
not useful
Mrmz Mrmz wrote:
> Clifford Slocombe wrote:
>
>> Also if you use a software GPIO driver rather than SPI or SDIO hardware
>> you are likely to get lower rates.
>
> So if i would like to do SDIO on GPIO would it be slower than use of
> simple SPIbus  for read write operation on SD card

For simplicity if you were to bit-bang the GPIO you would probably use
SPI rather than SDIO. When using hardware SPI, the bit rate is
determined by the hardware clock it uses, and can typically manage 20MHz
or more (20MHz is the MMC card specification maximum I believe). You
would have trouble obtaining that rate in software. I have an
application that generates an FPGA serial programming stream in
software, not dissimilar to SPI and on a 200Mz ARM9 it only achieves
2.5MHz.

SDIO may or may not be faster than SPI in software, probably faster so
song as all bits were in the same port register. I don't really know,
I've never used SDIO for card access.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.