Electronic – Is it possible to use 4-pin mode for an SD card with a microcontroller instead of SPI mode


Is it possible to use the 4-pin mode of an SD card when designing an interface with a microcontroller, or must you always use SPI mode? I am particularly thinking of a microcontroller such as a PIC24. The SPI mode is slower, obviously, and I am trying to think of better ways to improve the device's throughput.

Best Answer

That's what I've found:

The SD 1-bit protocol is a synchronous serial protocol with one data line, used for bulk data transfers, one clock line for synchronization, and one command line, used for sending command frames. The SD 1-bit protocol explicitly supports bus sharing. A simple single-master arbitration scheme allows multiple SD cards to share a single clock and DAT0 line. The SD 4-bit protocol is nearly identical to the SD 1-bit protocol. The main dierence is the bus width bulk data transfers occur over a 4-bit parallel bus instead of a single wire. With proper design, this has the potential to quadruple the throughput for bulk data transfers. Both the SD 1-bit and 4-bit protocols by default require CRC protection of bulk data transfers. A CRC, or Cyclic Redundancy Check, is a simple method for detecting the presence of simple bit-inversion errors in a transmitted block of data. In SD 4-bit mode, the input data is multiplexed over the four bus (DAT) lines and the 16-bit CRC is calculated independently for each of the four lines. In an all-software implementation, calculating the CRC under these conditions can be so complex that the computational overhead may mitigate the benets of the wider 4-bit bus. A 4-bit parallel CRC is trivial to implement in hardware, however, so custom ASIC or programmable-logic solutions are more likely to benet from the wider bus.


I believe you wouldn't have enough power to calculate crc32 in 4-bit mode. But without CRC it might be possible.