Emil
Emil

Reputation: 1

SPI SD Card 32GB Never passes CMD55, ACMD41 Initalization Step

I am using Elm-chan FatFs module. I ported it correctly as it works when using a 16GB SD card. But when using a 32GB card, the code is getting stuck at the CMD55, ACMD41 set up loop.

Bellow is the print out of the command and response I am experiencing

cmd0, resp = 0x01
cmd8, resp = 0x01
cmd55, resp = 0x01
cmd41, resp = 0x01
cmd55, resp = 0x7F
cmd55, resp = 0x7F
cmd55, resp = 0x7F
cmd55, resp = 0x7F
cmd55, resp = 0x7F
cmd55, resp = 0x7F
cmd55, resp = 0x7F
cmd55, resp = 0x7F
cmd55, resp = 0xFF
cmd55, resp = 0xFF

Then from there, cmd55 always gets a response of 0xFF indefinitely. I've looked at other questions, spi SDC guides, and other ff.c implementations, and I am for the most part following it, because the code does work for a 16GB card, just when I switch to a 32GB card and restart the code, the 32GB card does not initialize.

Does it matter on the brand? the 32GB card is a samsung evo select micro sdhc. The 16GB is a Lexar micro sdhc

Upvotes: 0

Views: 1177

Answers (1)

Tom V
Tom V

Reputation: 5470

It is not clear in your question which bytes are sent and which are received. Also you list different bytes in the question title that are not in the question body. Perhaps if you edit it then someone will be able to give you a better answer.

The response 0x80 to CMD55 means the card is not ready for the next command. After sending CMD55 you have to read bytes repeatedly in a loop until the most significant bit is clear. Only after that can you send the ACMD.

Upvotes: 1

Related Questions