2
\$\begingroup\$

I am working on a design with a processor which has I2C SCL line & SDHC_CD(Card Detect) pins multiplexed. I need to use I2C line. I am giving SD Card for boot code of processor. I have below doubts :-

  1. Is it mandatory to connect Card Detect pin to the Host?
  2. If I dont use SDHC_CD, Will the Processor be able to read from SD Card?
  3. If I need to use CD pin, Is there any way to use both functionalities?

Can anyone please share the link for SDHC protocol?

\$\endgroup\$
  • \$\begingroup\$ Do you mean the card detect pin for the SD card holder or DAT3? How are you interfacing with the card, SD / 1 bit SD or 4 bit SD? \$\endgroup\$ – David Sep 4 '15 at 18:14
  • \$\begingroup\$ I believe the card detect is only used by the host. The card does not care about the card detect pin (and cannot sense it anyway). If the pin is multiplexed, you just need to make sure on the host side that the I2C and SD card code do not interfere with each other. \$\endgroup\$ – mkeith Sep 4 '15 at 18:17
  • \$\begingroup\$ David..I am using 4 bit SD. But it has a separate DET_TERM pin which is a detection pin. \$\endgroup\$ – Oshi Sep 4 '15 at 18:20
  • \$\begingroup\$ Mkeith, correct Card Detect is used by Host only. The problem is that in Host Card Detect pin is multiplexed with I2C SCL line. \$\endgroup\$ – Oshi Sep 4 '15 at 18:21
  • \$\begingroup\$ If you already have hardware, and card detect is already connected, then it seems you have a problem. Whenever card detect is pinned low by the card, you will not be able to drive the I2C clock high. If that is the case, I think you will be able to boot from SD Card, but you won't be able to access I2C when the card is present. If it is possible to change the hardware design, I am sure you can work around this. Let us know. \$\endgroup\$ – mkeith Sep 4 '15 at 20:13
2
\$\begingroup\$
  1. Is it mandatory to connect Card Detect pin to the Host?

    • No. If you use MMC protocol (or 1 bit SD protocol), the bare minimum pins that need to be connected are just these three: CMD, CLK and DAT0. And power and ground, of course. If you use SPI protocol, then you need the Chip Select pin also.
  2. If I dont use SDHC_CD, Will the Processor be able to read from SD Card?

    • Yes. The Card Detect pin isn't actually connected to the card at all, it's a mechanical switch at the slot.
  3. If I need to use CD pin, Is there any way to use both functionalities?

    • Maybe. It depends on how the Card Detect pin is connected in your system. If it's a hard pull-down to ground when the SDHC card is connected, then it's stuck low and you can't do anything about it (except desolder it from the connector). If not, then there is some hope.
  4. Can anyone please share the link for SDHC protocol?

    • This is the public, official, simplified specification, which is freely available: https://www.sdcard.org/downloads/pls/simplified_specs/. But you might benefit more from some software examples, as the specification is tedious reading and the real life is in some parts simpler than the spec. But there are a lot of pitfalls also...
| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.