Summary of commands and responses of SD/MMC

Source: Internet
Author: User
SD bus communication is based on commands and data bit streams. The Start and Stop bits end. SD bus communication has three elements:
1. Command: the host sends the command to the card device and uses the cmd line to send the command;

2. Response: send data from the card end to the host end as a response to the previous cmd, which is sent through the cmd line;

3. Data: data can be transmitted from the host to the card, from the card to the host, and through the data line.

I. Commands
There are four command types used for the control card device. Each Command has a fixed length of 48 bits:
1. Broadcast commands (BC), no response: broadcast-type command, no response is required;
2. Broadcast commands with response (wb): broadcast-type command and response required;
3. addressed (point-to-point) commands (AC): The host sends data to the specified card device without data transmission;
4. Address (point-to-point) Data transfercommands (adtc): The host sends data to the specified card device with data transmission.

Command Format:


Byte1: 0 1 x (command number, defined by the command mark "39" as 100111, that is, hexadecimal 0x27 ", the first byte of complete bytes 39 is 01100111, 0x27 + 0x40 ).
Byte2-5: Command arguments, command parameters, some commands do not have parameters.
Byte6: the first 7 bits are CRC (Cyclic redundacy check, cyclic redundancy check) Check bits, and the last bits are stopped bits 0.

Among them, bit [45: 40] consists of 6 bits to form the command index. In other words, there are a total of 2 ^ 6 power (64) cmd, these cmd commands are used along with card initialization, recognition, read/write, and Data erasure.

For more information about commands, see 4.7.4 detailed command description in "part_javasphysical_layer_specification_ver3.00_final_090416". In p88, you can find the CMD details.

Ii. Responses
All response are sent to the host through the cmd line. The R4 and R5 response types are unique in sdio:
1. R1 (normal response command): used to respond to common commands;
2. R2 (CID, CSD register): used to respond to cmd2, limit 10, or limit 9, and uses the CID or CSD register as the response data;
3. R3 (OCR register): used to respond to the acmd41 command and use the OCR register as the response data;
4. R6 (published RCA response): assigns a response to the address of the relative card;
5. R7 (card interface condition): returns the voltage information supported by the card in response to limit 8;
6. R4 (Release 5): responds to Issue 5 and uses the OCR register as the response data;
7. R5 (Limit 52): Limit 52 is a read/write register instruction, and R5 is used for the response of limit 52;

The response format is as follows:


For a detailed description of the response, refer to Section 4.9 responses in "part_javasphysical_layer_specification_ver3.00_final_090416" to find a detailed description of the corresponding responses in p98.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.