Electronic – SD card detect in SPI mode

detectionflash-memoriesmemorysdspi

Just wondering if it is possible to detect the presence of an SD card when it is being used in SPI Mode?

enter image description here

It would appear that the card detect/data 3 pin (CD/DAT3) is used as a chip select (CS) pin when in SPI mode.

If this is true, then how does one detect the presence of an SD card being used in SPI mode?

Best Answer

Just realized that some microSD card holders have a "hidden and un-numbered" pin called "card detect" that gets shorted to ground when a card is inserted. See picture below

enter image description here