SD card initialisation; acmd41 fails;


I'm trying to init sd card and never get card ready.

In details:

There are dev board with a chip with a SD Host controller and micro SDHC UHS-1 card.

Init sequence I'm following:

  • cmd0: arg 0x00. That is fine
  • cmd8: arg 0x1AA. Fine, 0x1aa is returned back.

  • acmd41:
    -- first cmd55: arg 0x00. Fine, response 0x120 indicates that 'app_cmd' flag is set.
    -- second cmd41: arg 0x5100'0000 (HCS: 1; XPC: 1; S18R: 1 - SDHC/SDXC supported; Maximum performance; Switch to 1.8V respectively) Response is 0xff8000. So that seems to be a valid OCR, supporting a whole voltages range.

Once OCR supported by a card is known I send ACMD41 again with a set OCR:
-- cmd55: arg 0x00. valid 0x120 response.
-- cmd41: arg 0x51ff'80000.
In this case I always get 0xffff'ffff from a card which is not a proper respond by any means even though SD Host controller do not indicate any errors like timeout or wrong CRC, so that seems that card indeed sends that value.

Repeating described above acmd41 (cmd55 + cmd41) continue to return the same response, cmd55 is fine, cmd41 is 0xffffffff

Any ideas what is going wrong/I'm missing?


asked on Stack Overflow Aug 27, 2019 by user3124812

1 Answer


Shortly, card init sequence is fine. That's a hardware issue.

Power supplying to a card was screwed, so card didn't have enough power for a proper work but somehow got enough to send a responds.

To make things even more interesting out of a few cards I tried:

  • one card didn't work at all
  • one failed at initialisation (as described above)
  • and one did everything but stayed in 'Programming' state indefinitely when attempted to write data.

Thanks for everyone :)

answered on Stack Overflow Sep 5, 2019 by user3124812

User contributions licensed under CC BY-SA 3.0