Electronic – MicroSD Card Slot SPI Signals

debuggingmicrosdspi

I am having trouble communicating with an microSD card with an AVR on a board I'm working on. I used an oscilloscope to have a look at the signals coming out of the microSD socket on my board. I saw nice 3.3V MOSI and SCK signals between the AVR and the microSD socket. What I saw on the MISO trace however surprised me. It looked kind of like a superposition of the MOSI and SCK scaled down to under 100mV. My interpretation of this is that the MISO line must be floating and what I'm seeing on the scope is basically cross talk / AC pickup from adjacent signal traces.

The possible causes of this that I've come up with are:

  • The Slave Select trace is not making it all the way to the SD card (i.e. either the SD slot is not well connected to the board on that pin or the card is not making good contact within the slot)
    • My reasoning on this is that if the card were powered and the Slave Select pin were low the card would actively drive the MISO line (i.e. it would not float).
  • Likewise for the 3.3V power or GND signals to the card
    • My reasoning on this is that if the card were not getting power / GND, it wouldn't matter what was happening on the SPI bus.

My questions are:

  1. Are the conclusions I'm drawing sound based on the information I've provided?
  2. Are there other possibilities I've overlooked?
  3. How can I isolate / diagnose the problem further?

Edit #1

The following scope trace illustrates the description I gave above:

enter image description here

Best Answer

I just looked at an example circuit from Microchip http://ww1.microchip.com/downloads/en/DeviceDoc/DS-51583b.pdf

It shows a pull up resistor on the MISO line to the card. It's possible that the card has an open collector output that needs a pull-up resistor on your board to work.