Go Down

Topic: SDHC card wants addresses to be 512 B aligned! (Read 182 times) previous topic - next topic

Unt

I'm interfacing an SD card directly. In the code, I'm sending CMD0, CMD8, ACMD41, and CMD58. This last command returns the expected response, i.e. the card is an SDHC card, so it should interpret addresses in blocks, not bytes. However, the card is not working properly. If I try to read block 0 using CMD17, it reads garbage (same two bytes repeated over and over). If, instead, I try to read block 1, the card complains that the address is misaligned, and it only seems to accept addresses if I align them to 512-byte boundaries. Even then, the card just returns trash values. What could I be ignoring?

Go Up