SDIO: Difference between revisions

From Wiki :-)
Jump to navigation Jump to search
No edit summary
No edit summary
Line 8: Line 8:
!Abbreviation
!Abbreviation
!Command Description
!Command Description
|-
|CMD0
|bc
|[31:0] stuff bits
|
|GO_IDLE_STATE
|Resets all cards to idle state.
|-
|CMD2
|bcr
|[31:0] stuff bits
|R2
|ALL_SEND_CID
|Asks any card to send the CID num-bers on the CMD line (any card that is connected to the host will respond).
|-
|CMD6
|
|
|
|
|
|-
|CMD7
|ac
|
|R1b
(only from the selected card)
|SELECT/DESELECT_CARD
|
|-
|CMD8
|bcr
|[31:12] reserved bits
[11:8] supply voltage(VHS)
[7:0] check pattern
|R7
|SEND_IF_COND
|Sends SD Memory Card interface condition, which includes host supply voltage information and asks the card whether card supports voltage. Reserved bitsshall be set to '0'.
|-
|CMD9
|ac
|[31:16] RCA
[15:0] stuff bits
|R2
|SEND_CSD
|Addressed card sends its card-specific data (CSD) on the CMD line.
|-
|-
|CMD12
|CMD12
Line 38: Line 85:
|Continuously  transfers  data  blocks from card to host until interrupted by a STOP_TRANSMISSION command.
|Continuously  transfers  data  blocks from card to host until interrupted by a STOP_TRANSMISSION command.
|-
|-
|
|CMD41
|
|
|
|
Line 45: Line 92:
|
|
|-
|-
|
|CMD55
|
|
|
|

Revision as of 17:52, 26 June 2020

Commands Table

CMD Index Type Argument Response Abbreviation Command Description
CMD0 bc [31:0] stuff bits GO_IDLE_STATE Resets all cards to idle state.
CMD2 bcr [31:0] stuff bits R2 ALL_SEND_CID Asks any card to send the CID num-bers on the CMD line (any card that is connected to the host will respond).
CMD6
CMD7 ac R1b

(only from the selected card)

SELECT/DESELECT_CARD
CMD8 bcr [31:12] reserved bits

[11:8] supply voltage(VHS)

[7:0] check pattern

R7 SEND_IF_COND Sends SD Memory Card interface condition, which includes host supply voltage information and asks the card whether card supports voltage. Reserved bitsshall be set to '0'.
CMD9 ac [31:16] RCA

[15:0] stuff bits

R2 SEND_CSD Addressed card sends its card-specific data (CSD) on the CMD line.
CMD12 ac [31:0] stuff bits R1b STOP_TRANSMISSION Forces the card to stop transmission.
CMD16 ac [31:0] block length R1 SET_BLOCKLEN In the case of a Standard Capacity SD Memory Card, this command sets the block length (in bytes) for all following block commands (read, write, lock). Default block length is fixed to 512Bytes. Set length is valid for memory access commands only if partial block read operation are allowed in CSD.
CMD17 adtc [31:0] data address R1 READ_SINGLE_BLOCK In the case of a Standard Capacity SD Memory Card, this command, this command reads a block of the size selected by the SET_BLOCKLEN command.

In case of SDHC and SDXC Cards, block length is fixed 512Bytes regardless of the SET_BLOCKLEN command.

CMD18 adtc [31:0] data address R1 READ_MULTIPLE_BLOCK Continuously transfers data blocks from card to host until interrupted by a STOP_TRANSMISSION command.
CMD41
CMD55

Responses

R1 (normal response command)

R1 is a 48-bit response.

Linux flags:

  • MMC_RSP_CRC
Bit position 47 46 [45:40] [39:8] [7:1] 0
Width (bits) 1 1 6 32 7 1
Value '0' '0' x x x '1'
Description start bit transmission bit command index card status CRC7 end bit

R1b

R1b is a 48-bit response.

R2 (CID, CSD register)

R2 is a 136-bit response.

Linux flags:

  • MMC_RSP_136

R3 (OCR register)

R3 is a 48-bit response.

Bit position 47 46 [45:40] [39:8] [7:1] 0
Width (bits) 1 1 6 32 7 1
Value '0' '0' '111111' x '1111111' '1'
Description start bit transmission bit reserved OCR register reserved end bit

R6 (Published RCA response)

R6 is a 48-bit response.

R7 (Card interface condition)

R7 is a 48-bit response.

References

SD Specifications Part E1 SDIO Simplified Specification http://academy.cba.mit.edu/classes/networking_communications/SD/SD.pdf