SD Card uses the SPI Bus

Hello All,

I’m learning more about SD cards and the fact that they use the SPI bus would mean then a Fez could connect to a device via the SD card bus port and masquerade as storage?

Initially card information is requested through SPI, for all newer card models, the SD card ‘driver’ will soon switch to 4-bit mode. But yes, depending on what you send back, you could stay in SPI mode and emulate an SD card by implementing the SD card command set.

SD cards CAN use the SPI bus, but on the FEZ boards, they use the actual 4-bit SD interface.

Beat by Wouter!

This may be handy if you’re going down that route:

https://www.sparkfun.com/products/11468

@ mhectorgato <- intresting name :slight_smile:

Yes, I saw that product and a bunch of light bulbs went off in my brain.

If you’re planning to sniff with a FEZ, I don’t believe you could keep up with it in managed code.

@ godefroi, nah it will be RLP.

@ kurtnelle - Don’t put all your money on it…

A typical initialization phase is done over SPI at 400kHz (identification phase), after initialization, the clock will change to something like 18Mhz (don’t know the actual GHI implementation but I guess it’l be above 10MHz). I think you will be lucky if you can follow up the datastream at that rate.

One tip: keep wires short :slight_smile:

So, you’d need 5 (6? 4 data lines, one clock line, and one CMD line?) digital inputs in the tens-of-megahertz range, and you’d need somewhere to put all the data you got. I’d suggest getting good at DMA transfers.