- Main Page
- Modules
- Data Structures
- Files

Defines | Enumerations
MMC/SD Enumerated Data Types
MMCSD

## Defines
#define | CSL_MMCSD_EVENT_ERROR
| Error type as received by the MMC on response for a command.
#define | CSL_MMCSD_CMD_TOUT_CRC_ERROR
| Error type for command response timeout and CRC error.
#define | CSL_MMCSD_DATA_TOUT_CRC_ERROR
| Error type for data timeout and CRC error.
## Enumerations
enum | CSL_MmcsdInstId { CSL_MMCSD0_INST = (0U), CSL_MMCSD1_INST = (1U), CSL_MMCSD_INST_INV = (2U) }
| Hardware Instance Id to select the MMCSD IO registers. More...
enum | CSL_MmcsdRespType { CSL_MMCSD_RESPTYPE_NO = 0, CSL_MMCSD_RESPTYPE_R1 = 1U, CSL_MMCSD_RESPTYPE_R2 = 2U, CSL_MMCSD_RESPTYPE_R3 = 3U, CSL_MMCSD_RESPTYPE_R4 = 4U, CSL_MMCSD_RESPTYPE_R5 = 5U, CSL_MMCSD_RESPTYPE_R6 = 6U }
| Response type from MMCSD. More...
enum | CSL_MmcsdRespBusy { CSL_MMCSD_RESPBUSY_NO = 0, CSL_MMCSD_RESPBUSY_YES = 1U }
| Response busy signal from the card. More...
enum | CSL_MmcsdLineChr { CSL_MMCSD_LINECHR_PUSHPULL = 0, CSL_MMCSD_LINECHR_OPENDRAIN = 1U }
| Hardware mode of operation of the device. More...
enum | CSL_MmcsdCmdType { CSL_MMCSD_CMDTYPE_BC = 0, CSL_MMCSD_CMDTYPE_BCR = 1U, CSL_MMCSD_CMDTYPE_AC = 2U, CSL_MMCSD_CMDTYPE_ADTC = 3U }
| Different command types in MMCSD standard. More...
enum | CSL_MmcsdCmdIndex { CSL_MMCSD_GO_IDLE_STATE = 0, CSL_MMCSD_SEND_OP_COND_MMC_CARD = 1U, CSL_MMCSD_ALL_SEND_CID = 2U, CSL_MMCSD_RELATIVE_ADDR = 3U, CSL_MMCSD_SET_DSR = 4U, CSL_MMCSD_CMD_IDX_RSV_5 = 5U, CSL_MMCSD_CMD_SWITCH_MMC_CARD = 6U, CSL_MMCSD_SELECT_DESELECT_CARD = 7U, CSL_MMCSD_CMD_SEND_IF_COND_EXT_CSD = 8U, CSL_MMCSD_SEND_CSD = 9U, CSL_MMCSD_SEND_CID = 10U, CSL_MMCSD_READ_DAT_UNTIL_STOP_MMC_CARD = 11U, CSL_MMCSD_STOP_TRANSMISSION = 12U, CSL_MMCSD_SEND_STATUS = 13U, CSL_MMCSD_CMD_IDX_RSV_14 = 14U, CSL_MMCSD_GO_INACTIVE_STATE = 15U, CSL_MMCSD_SET_BLOCKLEN = 16U, CSL_MMCSD_READ_SINGLE_BLOCK = 17U, CSL_MMCSD_READ_MULTIPLE_BLOCK = 18U, CSL_MMCSD_CMD_IDX_RSV_19 = 19U, CSL_MMCSD_WRITE_DAT_UNTIL_STOP_MMC_CARD = 20U, CSL_MMCSD_CMD_IDX_RSV_21 = 21U, CSL_MMCSD_CMD_IDX_RSV_22 = 22U, CSL_MMCSD_SET_BLOCK_COUNT_MMC_CARD = 23U, CSL_MMCSD_WRITE_BLOCK = 24U, CSL_MMCSD_WRITE_MULTIPLE_BLOCK = 25U, CSL_MMCSD_PROGRAM_CID_MMC_CARD = 26U, CSL_MMCSD_PROGRAM_CSD = 27U, CSL_MMCSD_SET_WRITE_PROT = 28U, CSL_MMCSD_CLR_WRITE_PROT = 29U, CSL_MMCSD_SEND_WRITE_PROT = 30U, CSL_MMCSD_CMD_IDX_RSV_31 = 31U, CSL_MMCSD_ERASE_WR_BLK_START_SD_CARD = 32U, CSL_MMCSD_ERASE_WR_BLK_END_SD_CARD = 33U, CSL_MMCSD_CMD_IDX_RSV_34 = 34U, CSL_MMCSD_ERASE_GROUP_START_MMC_CARD = 35U, CSL_MMCSD_ERASE_GROUP_END_MMC_CARD = 36U, CSL_MMCSD_CMD_IDX_RSV_37 = 37U, CSL_MMCSD_ERASE = 38U, CSL_MMCSD_FAST_IO_MMC_CARD = 39U, CSL_MMCSD_GO_IRQ_STATE_MMC_CARD = 40U, CSL_MMCSD_CMD_IDX_RSV_41 = 41U, CSL_MMCSD_LOCK_UNLOCK = 42U, CSL_MMCSD_CMD_IDX_RSV_43 = 43U, CSL_MMCSD_CMD_IDX_RSV_44 = 44U, CSL_MMCSD_CMD_IDX_RSV_45 = 45U, CSL_MMCSD_CMD_IDX_RSV_46 = 46U, CSL_MMCSD_CMD_IDX_RSV_47 = 47U, CSL_MMCSD_CMD_IDX_RSV_48 = 48U, CSL_MMCSD_CMD_IDX_RSV_49 = 49U, CSL_MMCSD_CMD_IDX_RSV_50 = 50U, CSL_MMCSD_CMD_IDX_RSV_51 = 51U, CSL_MMCSD_CMD_IDX_RSV_52 = 52U, CSL_MMCSD_CMD_IDX_RSV_53 = 53U, CSL_MMCSD_CMD_IDX_RSV_54 = 54U, CSL_MMCSD_APP_CMD = 55U, CSL_MMCSD_GEN_CMD = 56U, CSL_MMCSD_CMD_IDX_RSV_57 = 57U, CSL_MMCSD_CMD_IDX_RSV_58 = 58U, CSL_MMCSD_CMD_IDX_RSV_59 = 59U, CSL_MMCSD_CMD_IDX_RSV_60 = 60U, CSL_MMCSD_CMD_IDX_RSV_61 = 61U, CSL_MMCSD_CMD_IDX_RSV_62 = 62U, CSL_MMCSD_CMD_IDX_RSV_63 = 63U }
| Command Index for MMC and SD Cards. More...
enum | CSL_MmcsdDir { CSL_MMCSD_DIR_WRITE = 0, CSL_MMCSD_DIR_READ = 1U, CSL_MMCSD_DIR_DONTCARE = 2U }
| Direction of data transfer. More...
enum | CSL_CardType { CSL_CARD_NONE = 0, CSL_SD_CARD = 1U, CSL_MMC_CARD = 2U }
| Type of card that is inserted. More...
enum | CSL_MmcsdEvent { CSL_MMCSD_EVENT_TRNDNE = (1U << 12U), CSL_MMCSD_EVENT_DATED = (1U << 11U), CSL_MMCSD_EVENT_READ = (1U << 10U), CSL_MMCSD_EVENT_WRITE = (1U << 9U), CSL_MMCSD_EVENT_ERROR_CMDCRC = (1U << 7U), CSL_MMCSD_EVENT_ERROR_DATACRC = ((1U << 6U)|(1U << 5U)), CSL_MMCSD_EVENT_ERROR_CMDTIMEOUT = ((1U) << (4U)), CSL_MMCSD_EVENT_ERROR_DATATIMEOUT = ((1U) << (3U)), CSL_MMCSD_EVENT_EOFCMD = (1U << 2U), CSL_MMCSD_EVENT_CARD_EXITBUSY = ((1U) << (1U)), CSL_MMCSD_EVENT_BLOCK_XFERRED = 1U }
| Event responses in MMCSD. More...
enum | CSL_MMCSDEventType { CSL_MMCSD_EDATDNE_INTERRUPT = 1U, CSL_MMCSD_EBSYDNE_INTERRUPT = (1U << 1U), CSL_MMCSD_ERSPDNE_INTERRUPT = (1U << 2U), CSL_MMCSD_ETOUTRD_INTERRUPT = (1U << 3U), CSL_MMCSD_ETOUTRS_INTERRUPT = (1U << 4U), CSL_MMCSD_ECRCWR_INTERRUPT = (1U << 5U), CSL_MMCSD_ECRCRD_INTERRUPT = (1U << 6U), CSL_MMCSD_ECRCRS_INTERRUPT = (1U << 7U), CSL_MMCSD_RSV_BIT = (1U << 8U), CSL_MMCSD_EDXRDY_INTERRUPT = (1U << 9U), CSL_MMCSD_EDRRDY_INTERRUPT = (1U << 10U), CSL_MMCSD_EDATED_INTERRUPT = (1U << 11U), CSL_MMCSD_ETRNDNE_INTERRUPT = (1U << 12U), CSL_MMCSD_INTERRUPT_NONE = (1U << 13U) }
| Enum variable for the selection of mmcsd interrupts. More...
enum | CSL_MMCSDOpMode { CSL_MMCSD_OPMODE_POLLED = 0, CSL_MMCSD_OPMODE_INTERRUPT = 1U, CSL_MMCSD_OPMODE_DMA = 2U, CSL_MMCSD_OPMODE_NONE = 3U }
| Enum to select the operating mode of the CSL MMCSD module. More...
enum | CSL_MmcsdEndianMode { CSL_MMCSD_ENDIAN_LITTLE = 0, CSL_MMCSD_ENDIAN_BIG = 1U }
| MMC/SD endianness. More...

## Define Documentation

#define CSL_MMCSD_CMD_TOUT_CRC_ERROR

Value:

    (CSL_MMCSD_EVENT_ERROR_CMDCRC |     \
                                            CSL_MMCSD_EVENT_ERROR_CMDTIMEOUT)

Error type for command response timeout and CRC error.

Referenced by MMC_deselectCard(), MMC_getCardCsd(), MMC_getCardStatus(), MMC_read(), MMC_sendAllCID(), MMC_sendCmd(), MMC_setBlockLength(), MMC_setRca(), MMC_setWriteBlkEraseCnt(), MMC_stop(), MMC_write(), SD_configurePullup(), SD_getCardCsd(), SD_sendAllCID(), SD_sendRca(), and SD_setBusWidth().

#define CSL_MMCSD_DATA_TOUT_CRC_ERROR

Value:

    (CSL_MMCSD_EVENT_ERROR_DATACRC |    \
                                             CSL_MMCSD_EVENT_ERROR_DATATIMEOUT)

Error type for data timeout and CRC error.

Referenced by MMC_read().

#define CSL_MMCSD_EVENT_ERROR

Value:

    (CSL_MMCSD_EVENT_ERROR_CMDCRC |     \
                                     CSL_MMCSD_EVENT_ERROR_DATACRC |    \
                                     CSL_MMCSD_EVENT_ERROR_CMDTIMEOUT | \
                                     CSL_MMCSD_EVENT_ERROR_DATATIMEOUT)

Error type as received by the MMC on response for a command.

Referenced by MMC_selectCard(), and MMC_write().

## Enumeration Type Documentation

enum CSL_CardType

Type of card that is inserted.

Enumerator:

  CSL_CARD_NONE | No card detected
  CSL_SD_CARD | SD card detected
  CSL_MMC_CARD | MMC card detected

enum CSL_MmcsdCmdIndex

Command Index for MMC and SD Cards.

NOTE: Commands specific to SD card are having SD_CARD suffixes, commands specific to MMC card are having MMC_CARD suffixes and all others are applicable for both MMC and SD card.

Enumerator:

  CSL_MMCSD_GO_IDLE_STATE | MMCSD CMD0 - Command to reset all the cards to idle state
  CSL_MMCSD_SEND_OP_COND_MMC_CARD | MMC CMD1 - Command to send operation condition register to MMC card
  CSL_MMCSD_ALL_SEND_CID | MMCSD CMD2 - Command to request the card to send its CID number
  CSL_MMCSD_RELATIVE_ADDR | MMCSD CMD3 MMC - Command to set the realative card address SD - Command to request the card to send new realative card address
  CSL_MMCSD_SET_DSR | MMCSD CMD4 - Command to configure Driver Stage Register(DSR)
  CSL_MMCSD_CMD_IDX_RSV_5 | Reserved command
  CSL_MMCSD_CMD_SWITCH_MMC_CARD | MMC CMD6 - Command to switch the mode of operation of the MMC card
  CSL_MMCSD_SELECT_DESELECT_CARD | MMCSD CMD7 - Command to select/deselect the MMC/SD card
  CSL_MMCSD_CMD_SEND_IF_COND_EXT_CSD | MMCSD CMD8 MMC - Command to request the extended CSR register from the card SD - Command to send the card interface condition
  CSL_MMCSD_SEND_CSD | MMCSD CMD9 - Command to request Card Specific Data register
  CSL_MMCSD_SEND_CID | MMCSD CMD10 - Command to read Card Identification Data register
  CSL_MMCSD_READ_DAT_UNTIL_STOP_MMC_CARD | MMC CMD11 - Command to read data stream until stop commad is sent
  CSL_MMCSD_STOP_TRANSMISSION | MMCSD CMD12 - Command to force the card to stop the data transfer
  CSL_MMCSD_SEND_STATUS | MMCSD CMD13 - Command to request the card to send status register
  CSL_MMCSD_CMD_IDX_RSV_14 | Reserved command
  CSL_MMCSD_GO_INACTIVE_STATE | MMCSD CMD15 - Command to set the card to inactive state
  CSL_MMCSD_SET_BLOCKLEN | MMCSD CMD16 - Command to set block length
  CSL_MMCSD_READ_SINGLE_BLOCK | MMCSD CMD17 - Command to read single block of data from the card
  CSL_MMCSD_READ_MULTIPLE_BLOCK | MMCSD CMD18 - Command to read multiple blocks of data from the card
  CSL_MMCSD_CMD_IDX_RSV_19 | Reserved command
  CSL_MMCSD_WRITE_DAT_UNTIL_STOP_MMC_CARD | MMC CMD20 - Command to write data stream until stop commad is sent
  CSL_MMCSD_CMD_IDX_RSV_21 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_22 | Reserved command
  CSL_MMCSD_SET_BLOCK_COUNT_MMC_CARD | MMC CMD23 - Command to set the number of blocks which are going to be transferred in the immediately succeeding multiple block read or write command.
  CSL_MMCSD_WRITE_BLOCK | MMCSD CMD24 - Command to write single block of data to the card
  CSL_MMCSD_WRITE_MULTIPLE_BLOCK | MMCSD CMD25 - Command to write multiple blocks of data to the card
  CSL_MMCSD_PROGRAM_CID_MMC_CARD | MMC CMD26 - Command to program CID register
  CSL_MMCSD_PROGRAM_CSD | MMCSD CMD27 - Command to program CSD register
  CSL_MMCSD_SET_WRITE_PROT | MMCSD CMD28 - Command to set the write protection bit of the card. This comamnd is applicable only to the cards which supports write protection feature
  CSL_MMCSD_CLR_WRITE_PROT | MMCSD CMD29 - Command to clear the write protection bit of the card. This comamnd is applicable only to the cards which supports write protection feature
  CSL_MMCSD_SEND_WRITE_PROT | MMCSD CMD30 - Command to read the write protection bit of the card. This comamnd is applicable only to the cards which supports write protection feature
  CSL_MMCSD_CMD_IDX_RSV_31 | Reserved command
  CSL_MMCSD_ERASE_WR_BLK_START_SD_CARD | SD CMD32 - Command to Set the address of the first write block to be erased.
  CSL_MMCSD_ERASE_WR_BLK_END_SD_CARD | SD CMD33 - Command to Set the address of the last write block to be erased.
  CSL_MMCSD_CMD_IDX_RSV_34 | Reserved command
  CSL_MMCSD_ERASE_GROUP_START_MMC_CARD | MMC CMD35 - Command to set the address of the first erase group within a range to be selected for erase
  CSL_MMCSD_ERASE_GROUP_END_MMC_CARD | MMC CMD36 - Command to set the address of the last erase group within a range to be selected for erase
  CSL_MMCSD_CMD_IDX_RSV_37 | Reserved command
  CSL_MMCSD_ERASE | MMCSD CMD38 - Command to erases all previously selected write blocks
  CSL_MMCSD_FAST_IO_MMC_CARD | MMC CMD39 - Command to write and read 8 bit (register) data fields
  CSL_MMCSD_GO_IRQ_STATE_MMC_CARD | MMC CMD40 - Command to set the system into interrupt mode
  CSL_MMCSD_CMD_IDX_RSV_41 | Reserved command
  CSL_MMCSD_LOCK_UNLOCK | MMCSD CMD42 - Command to set/reset password or lock/unlock the card
  CSL_MMCSD_CMD_IDX_RSV_43 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_44 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_45 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_46 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_47 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_48 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_49 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_50 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_51 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_52 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_53 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_54 | Reserved command
  CSL_MMCSD_APP_CMD | MMCSD CMD55 - Command to Indicates to the card that the next command is an application specific command rather than a standard command
  CSL_MMCSD_GEN_CMD | MMCSD CMD56 - Command either to transfer a data block to the card or to get a data block from the card for general purpose/application specific commands
  CSL_MMCSD_CMD_IDX_RSV_57 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_58 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_59 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_60 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_61 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_62 | Reserved command
  CSL_MMCSD_CMD_IDX_RSV_63 | Reserved command

enum CSL_MmcsdCmdType

Different command types in MMCSD standard.

This structure identifies the type of command that is sent to the MMC/SD Controller.

Enumerator:

  CSL_MMCSD_CMDTYPE_BC | Broadcast commands - no repsonse
  CSL_MMCSD_CMDTYPE_BCR | Broadcast commands with repsonse
  CSL_MMCSD_CMDTYPE_AC | Addressed commands - no data transfer
  CSL_MMCSD_CMDTYPE_ADTC | Addressed commands with data transfer

enum CSL_MmcsdDir

Direction of data transfer.

Enumerator:

  CSL_MMCSD_DIR_WRITE | MMCSD data phase is write operation
  CSL_MMCSD_DIR_READ | MMCSD data phase is read operation
  CSL_MMCSD_DIR_DONTCARE | MMCSD data phase is involved

enum CSL_MmcsdEndianMode

MMC/SD endianness.

This enum holds the values to set endianness of the MMC/SD controller

Enumerator:

  CSL_MMCSD_ENDIAN_LITTLE | Selects MMCSD little endian mode
  CSL_MMCSD_ENDIAN_BIG | Selects MMCSD big endian mode

enum CSL_MmcsdEvent

Event responses in MMCSD.

Enumerator:

  CSL_MMCSD_EVENT_TRNDNE | Last byte of a transfer has been completed - CRC check not complete
  CSL_MMCSD_EVENT_DATED | DAT3 edge detected.
  CSL_MMCSD_EVENT_READ | Data available with controller for reading
  CSL_MMCSD_EVENT_WRITE | Controller is ready to accept new data for data transmit
  CSL_MMCSD_EVENT_ERROR_CMDCRC | Error detected in the CRC during command response phase
  CSL_MMCSD_EVENT_ERROR_DATACRC | Error detected in the CRC during data transfer
  CSL_MMCSD_EVENT_ERROR_CMDTIMEOUT | Timeout detected during command response phase
  CSL_MMCSD_EVENT_ERROR_DATATIMEOUT | Timeout detected during data transfer
  CSL_MMCSD_EVENT_EOFCMD | For commands with response, an end of command + Response; For commands without response, an end of Command
  CSL_MMCSD_EVENT_CARD_EXITBUSY | Card has exited busy state
  CSL_MMCSD_EVENT_BLOCK_XFERRED | Block transfer done - CRC check and programming completed

enum CSL_MMCSDEventType

Enum variable for the selection of mmcsd interrupts.

Enumerator:

  CSL_MMCSD_EDATDNE_INTERRUPT | Data done (DATDNE) interrupt enable.
  CSL_MMCSD_EBSYDNE_INTERRUPT | Busy done (BSYDNE) interrupt enable.
  CSL_MMCSD_ERSPDNE_INTERRUPT | Command/response done (RSPDNE) interrupt enable.
  CSL_MMCSD_ETOUTRD_INTERRUPT | Read-data time-out event (TOUTRD) interrupt enable.
  CSL_MMCSD_ETOUTRS_INTERRUPT | Response time-out event (TOUTRS) interrupt enable.
  CSL_MMCSD_ECRCWR_INTERRUPT | Write-data CRC error (CRCWR) interrupt enable.
  CSL_MMCSD_ECRCRD_INTERRUPT | Read-data CRC error (CRCRD) interrupt enable.
  CSL_MMCSD_ECRCRS_INTERRUPT | Response CRC error (CRCRS) interrupt enable.
  CSL_MMCSD_RSV_BIT | This bit is reserved.
  CSL_MMCSD_EDXRDY_INTERRUPT | Data transmit register (MMCDXR) ready interrupt enable.
  CSL_MMCSD_EDRRDY_INTERRUPT | Data receive register ready (DRRDY) interrupt enable.
  CSL_MMCSD_EDATED_INTERRUPT | DAT3 edge detect (DATED) interrupt enable.
  CSL_MMCSD_ETRNDNE_INTERRUPT | Transfer done (TRNDNE) interrupt enable.
  CSL_MMCSD_INTERRUPT_NONE | No interrupt enable

enum CSL_MmcsdInstId

Hardware Instance Id to select the MMCSD IO registers.

This instance IDs are used to open an MMCSD CSL instance using MMC_open()

Enumerator:

  CSL_MMCSD0_INST | MMCSD instance number 0
  CSL_MMCSD1_INST | MMCSD instance number 1
  CSL_MMCSD_INST_INV | Invalid instance number

enum CSL_MmcsdLineChr

Hardware mode of operation of the device.

MMC/SD operates in two modes as defined by this enum

Enumerator:

  CSL_MMCSD_LINECHR_PUSHPULL | MMCSD push-pull configuration
  CSL_MMCSD_LINECHR_OPENDRAIN | MMCSD open drain configuration

enum CSL_MMCSDOpMode

Enum to select the operating mode of the CSL MMCSD module.

Enumerator:

  CSL_MMCSD_OPMODE_POLLED | MMCSD operates in poll mode
  CSL_MMCSD_OPMODE_INTERRUPT | MMCSD operates in interrupt mode
  CSL_MMCSD_OPMODE_DMA | MMCSD operates in DMA mode
  CSL_MMCSD_OPMODE_NONE | Invalid Enum value for boundary checking

enum CSL_MmcsdRespBusy

Response busy signal from the card.

Enumerator:

  CSL_MMCSD_RESPBUSY_NO | No response busy signal is expected
  CSL_MMCSD_RESPBUSY_YES | Response busy signal is expected

enum CSL_MmcsdRespType

Response type from MMCSD.

Depending on the command value sent to the card, the card responds with different response values.The type of response is defined in this structure.

Enumerator:

  CSL_MMCSD_RESPTYPE_NO | Card sends no response
  CSL_MMCSD_RESPTYPE_R1 | Card sends response R1
  CSL_MMCSD_RESPTYPE_R2 | Card sends response R2
  CSL_MMCSD_RESPTYPE_R3 | Card sends response R3
  CSL_MMCSD_RESPTYPE_R4 | Card sends response R4
  CSL_MMCSD_RESPTYPE_R5 | Card sends response R5
  CSL_MMCSD_RESPTYPE_R6 | Card sends response R6