79693073

Date: 2025-07-07 15:20:48
Score: 1
Natty:
Report link

While digging into this question again, I noticed that there is a difference in how the SD card handles invalid commands while in SD Mode vs. SPI mode. In SPI mode, no matter whether the command you sent it valid or not, the SD card responds, usually with an R1 response (Physical Layer Simplified Specification Version 6.00, section 7.2.8). In SD Mode, however, it doesn't respond, and instead sets a register flag that has to be read via a separate command (ibid., section 4.6.1). This is further supported by this quote from section 7.2.1:

The SD Card is powered up in the SD mode. It will enter SPI mode if the CS signal is asserted (negative) during the reception of the reset command (CMD0). If the card recognizes that the SD mode is required it will not respond to the command and remain in SD mode. If the SPI mode is required, the card will switch to SPI and respond with the SPI mode R1 response.

So I guess the answer to my question is: If the SD card doesn't respond at all to your SPI commands, you know it's either disconnected or in SD mode.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Dana S