0
\$\begingroup\$

I'm currently working on a device which connects a SD card to a FPGA.

I have to find out how much time the SD card takes to switch between the reading and writing modes.

I have already searched the specs of the SD card, but there are no datagrams to show or explain how it works.

Does somebody have an idea where to find an answer?

\$\endgroup\$
  • \$\begingroup\$ Maybe it differs per SD card type, so you have to check the datasheet of your specific SD card to be used. \$\endgroup\$ – Michel Keijzers Mar 6 '18 at 10:39
  • \$\begingroup\$ It also can differ greatly per write on the same card. \$\endgroup\$ – Oldfart Mar 6 '18 at 10:56
  • \$\begingroup\$ I already read this datasheet and did not found any things useful \$\endgroup\$ – Raldoren Mar 6 '18 at 11:09
0
\$\begingroup\$

Hardware point of view

As you are using a FPGA, surely you will be able to use the high troughput available in standar mmcsd bus. Your question depends of many factors:

  • Which bus are you using, 1bit mmcsd, 4bit mmcsd, 8bit mmcsd or SPI.
  • Which is the frequency that you are clocking the data in the bus.
  • Which version speed is your SD card, classA, UHS...

Software point of view

If you are using an OS (e.g. Linux) probably you are using a system file, hence the write/read throughput depends of many factors.

  • Which file system are you using, FAT, FAT32, NTFS, EXT4
  • What are you trying to transfer and from which place is coming (this affect more to write operation).

So As you can see, there are many factors that can give you a exact throughput. My personal advice is find a benchmark related to SD card in FPGA and use the worst case (lower speed) as starting point for your design.

\$\endgroup\$
  • \$\begingroup\$ i use this SD card datasheet in SD mod 4bits at 25MHz \$\endgroup\$ – Raldoren Mar 6 '18 at 11:23
  • \$\begingroup\$ I have a channel bidirectional on the SD card for the DATA, whereas on the FPGA I have two channels unidirectional (one IN and the other OUT). So I need to be sure if I can change the direction of signal before the SD answer me. \$\endgroup\$ – Raldoren Mar 6 '18 at 13:50
  • \$\begingroup\$ You can specify in FPGA the behavior of the pin, however this is only a requirement for the use that you will give in the code. In your FPGA code (hdl, vhdl) you will specify the use of the pin (input, output, bidirectional/buffer). Hence, it is not only a simple thing as change signal. If you need to read and write in the same signal probably you will use buffer, and in your code you can read and write without any problem. Take in consideration that sd bus has a protocol, and should be respected (frame/bit organization, times!). \$\endgroup\$ – Jefferson Alexis Mar 6 '18 at 22:07
  • \$\begingroup\$ Here I found a well explained guide about bidirectional pin \$\endgroup\$ – Jefferson Alexis Mar 6 '18 at 22:10
0
\$\begingroup\$

Hello so i finally found my answer in a datasheet, and it's not a time but a number of clock cycles and so the answer to a commande send by a controler make between 2 and 64 clock cycles to be send by th SD card

I found this in the SanDisk Secure Digital Card : Product Manual p.4-32

link :http://www.convict.lu/pdf/ProdManualSDCardv1.9.pdf

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.