What exactly is the between 1-bit SDIO vs SPI? Does one have advantages/disadvantages over the other?
Asked
Active
Viewed 1.7k times
5
-
11-bit SDIO appears to be slightly faster (50MHz)than SPI (40MHz). See excelent answer by tcrosley at http://electronics.stackexchange.com/questions/124234/difference-between-1-bit-4-bit-and-8-bit-sdio – tomontee Nov 03 '14 at 00:35
-
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. – hassan789 Nov 03 '14 at 01:42
-
SPI doesn't have an interface-specific limit; it does whatever the devices and transmission line can do. – Ignacio Vazquez-Abrams Nov 03 '14 at 02:43
1 Answers
8
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.
-
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. – i486 Dec 09 '16 at 09:24
-
1@i486 There's no official, public documentation of the electrical protocol used for SD. – Dec 09 '16 at 09:31
-
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. – i486 Dec 09 '16 at 09:40
-
1@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… – Dec 09 '16 at 17:54