Цитата
В доке на SD карты есть команды типа ACMD41.
Понятно, что например команда CMD1 это стартовый седьмой бит "0", затем шестой бит напрвления "1", и затем нулевой бит "1". (0100 0001). Соответственно CMD2 это (01000010) и так далее.
А как должны выглядеть команды ACMD? В доке я ответа на этот вопрос не нашел.
Заранее спасибо всем кто откликнется.
Команды ACMD имеют абсолютно тот же формат, что и CMD. ACMD означает application specific commands. Чтобы комманда стала ACMD перед ней должна быть передана комманда APP_CMD (CMD55).
Видимо Вы читали сокращенную версию. У меня есть полная (за которую денег просят), если хотите - могу прислать. А если поможете научить 80С51 или ARM7 эмулировать программно SDIO ( не host а контроллер устройства) - очень заинтересован в сотрудничестве.
Ниже цитата из полного описания SDIO по Вашему вопросу:
4.3.8 Application specific commands:
The SD Memory Card is defined to be protocol forward compatible to the MultiMediaCard Standard.
The SD Memory Card system is designed to provide a standard interface for a variety applications
types. In order to keep future compatibility to the MultiMediaCard standard together with new SD
Memory Card specific commands the SD Memory Card use the Application Specific commands feature
to implement its proprietary commands. Following is a description of the APP_CMD and
GEN_CMD as were defined in the MultiMediaCard spec.
• Application Specific Command – APP_CMD (CMD55)
This command, when received by the card, will cause the card to interpret the following command
as an application specific command, ACMD. The ACMD has the same structure as of regular
MultiMediaCard standard commands and it may have the same CMD number. The card will recognize
it as ACMD by the fact that it appears after APP_CMD.
The only effect of the APP_CMD is that if the command index of the, immediately, following command
has an ACMD overloading it, the non standard version will be used. If, as an example, a card
has a definition for ACMD13 but not for ACMD7 then, if received immediately after APP_CMD command,
Command 13 will be interpreted as the non standard ACMD13 but, command 7 as the standard
CMD7. In order to use one of the manufacturer specific ACMD’s the host will:
• Send APP_CMD. The response will have the APP_CMD bit (new status bit) set signaling to the
host that ACMD is now expected.
• Send the required ACMD. The response will have the APP_CMD bit set, indicating that the
accepted command was interpreted as ACMD. If a non-ACMD is sent then it will be respected
by the card as normal SD Memory Card command and the APP_CMD bit in the Card Status
stays clear.
If a non valid command is sent (neither ACMD nor CMD) then it will be handled as a standard SD
Memory Card illegal command error.
From the SD Memory Card protocol point of view the ACMD numbers will be defined by the manufacturers
with some restrictions. The following ACMD numbers are reserved for the SD Memory
Card proprietary applications and may not be used by any SD Memory Card manufacturer:
ACMD6, ACMD13, ACMD17-25, ACMD38-49, ACMD51.