0
\$\begingroup\$

Supposing a microSD connector on which there isn't a switch/pin to indicate that the card is inserted or not, I would like to know if it is possible to detect the presence/ausence of the card only via SPI interface, is that possible?

\$\endgroup\$
1
  • \$\begingroup\$ Yes, there can be multiple ways. But which of them are available depends on your design, which you say nothing about. \$\endgroup\$
    – Justme
    Jul 20, 2021 at 19:04

1 Answer 1

1
\$\begingroup\$

I actually just dealt with this yesterday. What worked for me is to comment out the card detect code and simply assume that it's there. Then adjust the rest of the code to fail gracefully if the card doesn't respond.

Basically just debug the code and find where it errors when there is no card. Make sure that code is solid.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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