0

I am accessing my SD card using SPI. But I've found this to be slow and I am also sad that when there is a faster protocol already supported by my SD card I am using a slower version.

Is there a C library that can be integrated to my C compiler which can be used to access my Sd much faster than SPI?

Denis
  • 1,245
  • 3
  • 17
  • 35
  • 1
    Is this a question about electronics design? Or a software and libraries based question, which is specifically for your microcontroller? wrong place mate.. – KyranF Oct 06 '14 at 18:33
  • 1
    also, larger pin-count microcontrollers (especially the ARM ones) have dedicated memory interfaces which can probably access faster than SPI protocol (which btw can go very very fast, at something like 80Mhz or more in some cases, for some devices.. try doing that) – KyranF Oct 06 '14 at 18:35
  • 1
    Possible duplicate of http://electronics.stackexchange.com/questions/10675/is-it-possible-to-use-4-pin-mode-for-an-sd-card-with-a-microcontroller-instead-o?rq=1 – David Oct 06 '14 at 18:59
  • 2
    Which micro, which compiler, which library? my powers of the mind have left me..... – Spoon Oct 06 '14 at 19:14

1 Answers1

6

One way to access an SD card faster (up to 4x) than using the 1-bit serial SPI mode is to use the 4-bit parallel mode.

Unfortunately, this faster mode is proprietary to the SD Card Association. Just Google: "sd card 4-bit proprietary" and you will see a number of web sites that confirm this.

The SD Card Association has 1) not released the specifications for it (although some of it may have leaked), and 2) to legally use it in a product you must pay a hefty fee (a few thousand dollars). So even if you want to use it just for yourself, it is unlikely you will find a C library anywhere that supports this mode. But you can always look.

The SD Card Association has made the SPI protocol officially available which is way it is readily available, which you obviously are aware of.

tcrosley
  • 47,708
  • 5
  • 97
  • 161
  • that clears my doubts. Isnt there an open source alternative for me? If SD is proprietary, then someone can build an open source alternative. If that day comes, I am willing to change my hardware and use it. 1000$ is difficult for a hobbyist for storage. Isnt there any other method I can store my record files in my portable embedded application? I need about 250Mb. – Denis Oct 07 '14 at 01:49
  • 1
    I don't think anyone could open-source it without having a copy of the spec, and then that would be illegal. You either need to run your SPI bus as fast as you can (I use 20-25 MHz, some will run 40-50 MHz), the other would be to use a standalone chip [like this 256 MB one](http://www.spansion.com/Support/Datasheets/S34ML01G1_04G1.pdf) which costs only $3 and should run an order of magnitude faster than a fast SPI interface; the downside is it needs lots of I/O lines between it and the microcontroller, and it is a SMD. – tcrosley Oct 07 '14 at 07:16
  • 1
    @QwertyCoolGuy That looks like a really nice dev board. I have no experience interfacing directly with external Flash RAM so I can't offer any suggestions. Good luck with your project. – tcrosley Oct 08 '14 at 07:56
  • I purchased a TI TIVA129 dev board. That included a Flash Chip in it connected to the MCU I am familiar with. Im going to try that. I guess I now have to learn all about using NAND Flash and accessing modes, formatting etc. From basics/scratch. There is plenty of tutorials on the internet though, If you can recommend a series of tutorials/ material off your head kindly do so. – Denis Oct 08 '14 at 09:26
  • I have noticed a lot of support for SD cards. e.g. FatFS file system etc. Hopefully this too will have. Thank you for you time. – Denis Oct 08 '14 at 09:28