简体   繁体   English

SPI SD 卡 32GB 从未通过 CMD55、ACMD41 初始化步骤

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

I am using Elm-chan FatFs module.我正在使用 Elm-chan FatFs 模块。 I ported it correctly as it works when using a 16GB SD card.我正确地移植了它,因为它在使用 16GB SD 卡时工作正常。 But when using a 32GB card, the code is getting stuck at the CMD55, ACMD41 set up loop.但是当使用 32GB 卡时,代码卡在 CMD55、ACMD41 设置循环中。

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.然后从那里, cmd55 总是无限期地得到 0xFF 的响应。 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.我查看了其他问题、spi SDC 指南和其他 ff.c 实现,并且我在很大程度上遵循它,因为代码确实适用于 16GB 卡,就在我切换到 32GB 卡并重新启动代码,32GB 卡没有初始化。

Does it matter on the brand?对品牌有影响吗? the 32GB card is a samsung evo select micro sdhc. 32GB 卡是三星 evo select micro sdhc。 The 16GB is a Lexar micro sdhc 16GB 是 Lexar micro sdhc

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.对 CMD55 的响应 0x80 表示卡未准备好下一个命令。 After sending CMD55 you have to read bytes repeatedly in a loop until the most significant bit is clear.发送 CMD55 后,您必须在循环中重复读取字节,直到清除最高有效位。 Only after that can you send the ACMD.只有在此之后,您才能发送 ACMD。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM