SDI Technologies SDIO Card manual New I/O Read/Write Commands, Iorwdirect Command CMD52

Page 30

©Copyright 2000-2007 SD Card Association

SDIO Simplified Specification Version 2.00

5.New I/O Read/Write Commands

Two additional data transfer instructions have been added to support I/O. IO_RW_DIRECT, a direct I/O command similar to the MMC 'Fast I/O' command, and IO_RW_EXTENDED, which allows fast access with byte or block addresses. Both commands are in class 9 (I/O Commands).

5.1IO_RW_DIRECT Command (CMD52)

The IO_RW_DIRECT is the simplest means to access a single register within the total 128K of register space in any I/O function, including the common I/O area (CIA). This command reads or writes 1 byte using only 1 command/response pair. A common use is to initialize registers or monitor status values for I/O functions. This command is the fastest means to read or write single I/O registers, as it requires only a single command/response pair.

S

D

Command

Index

110100b

R/W

flag

Function Number

RAW

flag

Stuff

Register Address

Stuff

Write Data or Stuff Bits

CRC7

E

1

1

6

1

3

1

1

17

1

8

7

1

Figure 5-1 IO_RW_DIRECT Command

The IO_RW_DIRECT Command contains the following fields:

S(tart bit):

Start bit. Always 0

D(irection):

Direction. Always1 indicates transfer host to card.

Command Index:

Identifies the “IO_RW_DIRECT” command with a value of 110100b

R/W Flag:

This bit determines the direction of the I/O operation. If this bit is 0, this command

 

shall read data from the SDIO card at the address specified by the Function Number

 

and the Register Address to the host. The data byte is returned in the response, R5.

 

If this bit is set to 1, the command shall write the bytes in the Write Data field to the

 

I/O location addressed by the Function Number and the Register Address. If the

 

RAW flag is 0, then the data in the register that was written shall be read and that

 

value returned in the response.

RAW Flag:

The Read after Write flag. If this bit is set to 1 and the R/W flag is set to 1, then the

 

command shall read the value of the register after the write. This is useful to allow

 

writing to a control register and reading the status at the same address. If this bit is

 

cleared, the value returned in the R5 response shall be the same as the write data in

 

the command. If this bit is set, the data field of the R5 response shall contain the

 

value read from the addressed register after the write operation.

Function Number:

The number of the function within the I/O card you wish to read or write. Note that

 

function 0 selects the common I/O area (CIA).

Register Address:

This is the address of the byte of data inside of the selected function to read or write.

 

There are 17 bits of address available so the register is located within the first 128K

 

(131,072) addresses of that function.

Write Data/Stuff Bits:

For a direct write command (R/W=1), this is the byte that is written to the selected

 

address. For a direct read (R/W=0), this field is not used and shall be set to 0.

CRC7:

7 bits of CRC data

E(nd bit):

End bit, always 1

21

Image 30
Contents SD Specifications Part E1 Sdio Simplified Specification Sdio Simplified Specification Version Changes compared to previous issueDate Version Release of SD Simplified Specification Conventions Used in This Document Table of Contents SPI and SD 1-bit Mode Interrupts 16.2 Table of Tables Table of Figures Primary Reference Document Sdio FeaturesGeneral Description Standard Sdio FunctionsSdio Card modes Sdio Signaling DefinitionSdio Card Types Sdio Host ModesSignal Pins Signal connection to two 4-bit Sdio cardsReset Sdio Card InitializationDifferences in I/O card Initialization Sdio Simplified Specification Version MEM=0 Card initialization flow in SD mode Sdio aware host Illegal Command F8=0 Card initialization flow in SPI mode Sdio aware host OCR Values for CMD5 Iosendopcond Command CMD5VDD Voltage Window Position OCR bitResponse R4 in SD mode Iosendopcond Response R4Special Initialization considerations for Combo Cards Acceptable Commands after InitializationRecommendations for RCA after Reset Re-initialize both I/O and MemoryRe-Initialization Flow for I/O Controller Re-Initialization Flow for Memory controllerEnabling CRC in SPI Combo Card Differences with SD Memory Specification Sdio Command ListUnsupported SD Memory Commands Reset for Sdio Modified R6 ResponseBus Width Combo Card 4-bit Control Card Detect ResistorTimings Card Detect Resistor StatesChanges to SD Memory Fixed Registers Data Transfer Block SizesData Transfer Abort Read AbortCSD Register OCR RegisterCID Register RCA RegisterSdio Status Register Structure ClearBit Identifier Type Value Description New I/O Read/Write Commands Iorwdirect Command CMD52Iorwdirect Response R5 ComcrcerrorIllegalcommand 1 CMD52 Response SD modesCMD=DAT lines free DIS=DisabledIdentifier Type Value Description Clear Condition TRN=TransferOP code Command operation Iorwextended Command CMD53Iorw Extended command Op Code Definition CRCByte Count Values 1 CMD53 Data Transfer FormatOverview Register Access TimeSdio Card Internal Operation InterruptsCMD52 During Data Transfer Suspend/ResumeRead Wait Sdio Fixed Internal MapCommon I/O Area CIA Card Common Control Registers CccrCCCR/SDIO Card Common Control Registers CccrType IOE3To abort transfers to/from memory Scsi 4BLS Transaction of function 0 CIA Cccr bit Definitions EmpcFunction Basic Information Registers FBR Function Basic Registers FBRAddress Field TypeSdio Simplified Specification Version Field Type FBR bit and field definitionsMultiple Function Sdio Cards Setting Block Size with CMD53Card Information Structure CIS Card Information Structure CIS and reserved area of CIABus State Diagram State Diagram for Bus State MachineCSA Access Embedded I/O Code Storage Area CSACSA Data Format Sdio Interrupts Interrupt TimingTerminated Data Transfer Interrupt Cycle Interrupt Clear TimingSdio Suspend/Resume Operation Sdio Read Wait Operation Power Control support for Sdio Cards Power ControlPower Control Overview Master Power ControlHigh-Power Tuples Power Control Support for the Sdio HostPower Selection Reference Tuples by Master Power Control and Power SelectPower Control Operation High-Speed Mode Sdio High-Speed ModeSwitching Bus Speed Mode in a Combo Card Sdio Power Sdio Physical PropertiesSdio Simplified Specification Version Inrush Current Limiting Basic Tuple Format and Tuple Chain Structure CIS FormatsCIS Reference Document Byte Order Within TuplesTuples Supported by Sdio Cards Tuple VersionSdio Card Metaformat Code Name DescriptionCistplmanfid Manufacturer Identification Tuple Cistplmanfid Manufacturer Identification String TupleSdio Specific Extensions Cistplfuncid Function Identification TupleCistplfunce Tuple for Function 0 common Cistplfunce Function Extension TupleCistplfunce Tuple General Structure Tplfidfunction Tuple for Function 0 commonCistplfunce Tuple for Function Tplfidfunction Tuple for FunctionByte Sdio Simplified Specification Version 11 Tplfecsaproperty Definition Tplfidfunction Field Descriptions for Functions10 Tplfefunctioninfo Definition Bit NameCistplsdioext Tuple Reserved for Sdio Cards Cistplsdiostd Function is a Standard Sdio Function12 Cistplsdiostd Tuple Reserved for Sdio Cards 13 Cistplsdioext Tuple Reserved for Sdio CardsSD and SPI Command List Table A-14 SD Mode Command ListNormative Table A-15 SPI Mode Command List Sdmem SdioAppendix B Normative ReferencesAppendix C Abbreviations and TermsLOW, High Informative