Initialization of a microSD card using an SPI interface

前端 未结 6 800
悲哀的现实
悲哀的现实 2021-02-07 08:10

I\'m using a microSD card in an embedded design. The card is connected to a microcontroller using the SPI interface. It worked fine for all cards I\'ve used before, but now my n

6条回答
  •  暖寄归人
    2021-02-07 08:32

    You said you used CRC 0 for the failing command. I assume that you meant that you sent the whole last byte as 0x00. Note that the CRC7 is only the first 7 bits of the last byte - the last bit called end bit should always be 1. So if you were sending 0x00 as the last byte, with 0 as the last bit, the failure would be understandable, and even the error code would make sense. If you send 1 as the last bit, it should work, ie. use something like 0x01 or 0xFF as the last byte.

提交回复
热议问题