5
\$\begingroup\$

What exactly is the between 1-bit SDIO vs SPI? Does one have advantages/disadvantages over the other?

| improve this question | | | | |
\$\endgroup\$
  • 1
    \$\begingroup\$ 1-bit SDIO appears to be slightly faster (50MHz)than SPI (40MHz). See excelent answer by tcrosley at electronics.stackexchange.com/questions/124234/… \$\endgroup\$ – tomontee Nov 3 '14 at 0:35
  • \$\begingroup\$ tcrosley's explanation is specifically catered to sd-card interfaces. My questions is in regards to 1-bit SDIO in general. In summary tcrosley says 4-bit SDIO is 4x faster than SPI. \$\endgroup\$ – hassan789 Nov 3 '14 at 1:42
  • \$\begingroup\$ SPI doesn't have an interface-specific limit; it does whatever the devices and transmission line can do. \$\endgroup\$ – Ignacio Vazquez-Abrams Nov 3 '14 at 2:43
7
\$\begingroup\$

The SD protocol uses separate lines for commands and data, whereas SPI uses a single wire pair for both. So, in some situations, 1-bit SDIO may be a little faster than SPI, as it's possible to send commands concurrently with data.

On the other hand, the SPI protocol is publicly documented (with lots of readily available implementations), whereas the SD protocol is not. Combined with the fact that most microcontrollers support SPI in hardware, but only a few natively support SD, this makes SPI a much better choice for hobbyists.

| improve this answer | | | | |
\$\endgroup\$
  • \$\begingroup\$ I don't understand why SPI protocol is "documented" and SD is not. All commands that are used over SPI can be used with SD interface and they are the same. The secret part of commands (not publicly documented) are for security functions of SD cards which are not necessary if you use it for file storage - which is SD usage in 99% of cases. \$\endgroup\$ – i486 Dec 9 '16 at 9:24
  • 1
    \$\begingroup\$ @i486 There's no official, public documentation of the electrical protocol used for SD. \$\endgroup\$ – duskwuff -inactive- Dec 9 '16 at 9:31
  • \$\begingroup\$ I think it is not necessary. For example, you get STM32F2/4 MCU with integrated SDIO, design board with SD card slot, connect wires and it is working. You need only the software control which is with the same commands like SPI. The "electrical protocol" is necessary for MCU manufacturer (STMicroelectronics in this case) and not for the developer of end device. \$\endgroup\$ – i486 Dec 9 '16 at 9:40
  • 1
    \$\begingroup\$ @i486 Microcontrollers with SD peripherals (like the STM32 parts you're referring to) are more the exception than the rule. If you've got it, great, but if you don't… \$\endgroup\$ – duskwuff -inactive- Dec 9 '16 at 17:54

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.