3

I'm facing a very peculiar issue on a hobby project of mine, and would appreciate any insight.

The schematic for the relevant part of the project is attached at the end of this post. What I have is two microSD cards (J1 and J2 on the schematic) connected to a USB2244 card reader (U4) via two analog switches: a TS3A27518E for the data lines (U7) and a TS5A12301E for the power lines (U5). The design is based on the evaluation board for the USB2244. The CARD_SELECT and NCARD_DETECT lines are connected to a microcontroller (not shown) and are used to select one of the cards and inform the reader that a card was inserted, respectively.

The problem I'm facing is that the card reader fails to establish communication with the card. I attached a logic analyzer to the card end (using a handy sniffer), and after pulling the NCARD_DETECT line low I'm seeing the following pattern play out on the SD's CMD line:

  1. The reader sends the CMD0 command, AKA GO_IDLE_STATE. According to the spec. I have access to, this should order the card enter an idle state.
  2. After ~3ms the reader sends CMD0 again.
  3. After ~3ms the reader sends CMD8 with the argument 0x1AA, indicating that it supports voltages in the range 2.7-3.6V, and a check pattern of 0xAA.
  4. The card responds with a response type R7, and returns the same value of 0x1AA.
  5. Steps 1-4 are repeated.
  6. The reader sends CMD55 (APP_CMD), indicating that the next command is an "application-specific" command.
  7. The card responds with R1 and a value of 0x120, which is interpreted as:
    • CURRENT_STATE == Idle (bits 12:9 are 0).
    • READY_FOR_DATA.
    • APP_CMD, i.e. the card expects an app command next.
  8. The reader sends CMD41, with an argument of 0x40FF8000, which is interpreted as:
    • The reader supports SDHC or SDXC (bit 30 is set).
    • The voltages supported by the reader are 2.7-3.6V (bits 23:8 are set).
  9. The card responds with R3 and a value of 0x00FF8000, indicating that it supports the same voltages, but that it is busy (bit 31 is not set).
  10. The reader sends CMD55.
  11. The card does not respond.
  12. After ~100ms, the process repeats from step 1.
  13. The whole dance stops after ~1s, with the card reader powering down the card.

The voltage on the SD card stays at a pretty much constant ~2.9V during the whole process, with a momentary (~0.6us) dip to ~2.2V at step 9, where the card responds to ACMD41. Note: now that I'm writing this, could this dip be an issue, if the minimum voltage should be 2.7V? What in the circuit could be the cause?

I've ruled out the card and sniffer as an issue, as they work just fine with an actual card reader, as opposed to my contraption.

I've also recorded the voltages on the CMD and CLK lines, and the waves look pretty square to me:

Logic analyzer digital and analog capture of two SD clock cycles, both showing square waves

From looking at the Texas Instruments forums, it seems other people also had issues with the TS3A27518E when using it to access SD cards. These other people talk about capacitance issues, so perhaps that's what I'm seeing? How can I diagnose this?

Any help would be greatly appreciated. Thanks.

Circuit schematic, showing two microSD card slots connected to a USB2244 card reader via a TS3A27518E analog switch for the data lines and a TS5A12301E switch for the power lines

Voltage Spike
  • 75,799
  • 36
  • 80
  • 208

0 Answers0