Initialization of a microSD card using an SPI interface

前端 未结 6 875
悲哀的现实
悲哀的现实 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

    I seem to have found the issue. When I calculate the correct CRC for CMD55 and send that instead of a dummy CRC, the command is accepted (result 0x01). If you look at the physical layer specification in section 7.2.2, it explicitly says that:

    The SPI interface is initialized in the CRC OFF mode in default. (except for commands CMD0 and CMD8).

    This doesn't seem to be the case with this series of Transcend cards, thus violating the specification. Also in case of a CRC error the reply should be 0x09 instead of 0x05. I've tried to explicitly turn off CRC checking with CMD59, but that doesn't seem to help.

    => Calculating the correct CRC for (all?) commands makes the card work.

    I'm in contact with Transcend support about this. If I learn something useful I'll you know here.

    Note that I used other 2 GB Transcend cards before, but they were made in Taiwan, while the new one is made in Korea (and seems to be a Samsung card (MMAGR02GUDCA)).

提交回复
热议问题