SWRU543B January 2019 – June 2025 CC3230S , CC3230SF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
Table 11-4 lists the memory-mapped registers for the SD-HOST. All register offset addresses not listed in Table 11-4 should be considered as reserved locations and the register contents should not be modified.
| Module Name | Base Address |
|---|---|
| MMCHS1 | 0x4401 0000 |
| Offset | Acronym | Register Name | Section |
|---|---|---|---|
| 124h | MMCHS_CSRE | Card Status Response Error | Section 11.7.1 |
| 12Ch | MMCHS_CON | Configuration | Section 11.7.2 |
| 204h | MMCHS_BLK | Transfer Length Configuration | Section 11.7.3 |
| 208h | MMCHS_ARG | Command Argument | Section 11.7.4 |
| 20Ch | MMCHS_CMD | Command and Transfer Mode | Section 11.7.5 |
| 210h | MMCHS_RSP10 | Command Response[31:0] | Section 11.7.6 |
| 214h | MMCHS_RSP32 | Command Response[63:32] | Section 11.7.7 |
| 218h | MMCHS_RSP54 | Command Response[95:64] | Section 11.7.8 |
| 21Ch | MMCHS_RSP76 | Command Response[127:96] | Section 11.7.9 |
| 220h | MMCHS_DATA | Data | Section 11.7.10 |
| 224h | MMCHS_PSTATE | Present State | Section 11.7.11 |
| 228h | MMCHS_HCTL | Control | Section 11.7.12 |
| 22Ch | MMCHS_SYSCTL | SD System Control | Section 11.7.13 |
| 230h | MMCHS_STAT | Interrupt Status | Section 11.7.14 |
| 234h | MMCHS_IE | Interrupt SD Enable | Section 11.7.15 |
| 238h | MMCHS_ISE | Interrupt Signal Enable | Section 11.7.16 |
Card Status Response Error register
MMCHS_CSRE is shown in Figure 11-2 and described in Table 11-5.
Return to Summary Table.
This register enables the host controller to detect card status errors of response type R1, R1b for all cards and of R5, R5b and R6 response for cards types SD or SDIO.
When a bit MMCi.MMCHS_CSRE[I] is set to 1, if the corresponding bit at the same position in the response MMCi.MMCHS_RSP10[I] is set to 1, the host controller indicates a card error (MMCi.MMCHS_STAT[28] CERR bit) interrupt status to avoid the host driver reading the response register (MMCi.MMCHS_RSP10).
No automatic card error detection for autoCMD12 is implemented; the host system must check autoCMD12 response register (MMCi.MMCHS_RSP76) for possible card errors.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| CSRE | |||||||||||||||||||||||||||||||
| R/W-0h | |||||||||||||||||||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-0 | CSRE | R/W | 0h | Card status response error |
Configuration register
MMCHS_CON is shown in Figure 11-3 and described in Table 11-6.
Return to Summary Table.
This register is used to do the following:
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | |||||||
| R-0h | |||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | |||||||
| R-0h | |||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | |||||||
| R-0h | |||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | HR | INIT | RESERVED | ||||
| R-0h | R/W-0h | R/W-0h | R-0h | ||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-3 | RESERVED | R | 0h | |
| 2 | HR | R/W | 0h | Broadcast host response (only for MMC cards) This register is used to force the host to generate a 48-bit response for bc command type. It can be used to terminate the interrupt mode by generating a CMD40 response by the core. To have the host response to be generated in open drain mode, the register MMCHS_CON[OD] must be set to 1. When MMCi.MMCHS_CON[12] CEATA bit is set to 1 and MMCi.MMCHS_ARG set to 0x00000000, when writing 0x00000000 into MMCi.MMCHS_CMD register, the host controller performs a 'command completion signal disable' token (such as mmci_cmd line held to 0 during 47 cycles followed by a 1). |
| 1 | INIT | R/W | 0h | Send initialization stream (all cards) When this bit is set to 1, and the card is idle, an initialization sequence is sent to the card. An initialization sequence consists of setting the mmci_cmd line to 1 during 80 clock cycles. The initialization sequence is mandatory - but it is not required to do it through this bit - this bit makes it easier. Clock divider (MMCi.MMCHS_SYSCTL[15:6] CLKD bits) should be set to ensure that 80 clock periods are greater than 1ms. Note: in this mode, there is no command sent to the card and no response is expected. A command complete interrupt will be generated once the initialization sequence is completed. MMCi.MMCHS_STAT[0] CC bit can be polled. 0h = The host does not send an initialization sequence. 1h = The host sends an initialization sequence. |
| 0 | RESERVED | R | 0h |
Transfer Length Configuration register
MMCHS_BLK is shown in Figure 11-4 and described in Table 11-7.
Return to Summary Table.
This register shall be used for any card.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| NBLK | |||||||||||||||
| R/W-0h | |||||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | BLEN | ||||||||||||||
| R-0h | R/W-0h | ||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-16 | NBLK | R/W | 0h | Blocks count for current transfer This register is enabled when the Block count Enable (MMCi.MMCHS_CMD[1] BCE bit) is set to 1 and is valid only for multiple block transfers. Setting the block count to 0 results no data blocks being transferred. Note: The host controller decrements the block count after each block transfer and stops when the count reaches zero. This register can be accessed only if no transaction is executing (such as after a transaction has stopped). Read operations during transfers may return an invalid value and write operation will be ignored. In suspend context, the number of blocks yet to be transferred can be determined by reading this register. When restoring transfer context prior to issuing a Resume command, The local host shall restore the previously saved block count. 0h = Stop count 1h = 1 block 2h = 2 blocks FFFFh = 65535 blocks |
| 15-11 | RESERVED | R | 0h | |
| 10-0 | BLEN | R/W | 0h | Transfer Block Size This register specifies the block size for block data transfers. Read operations during transfers may return an invalid value, and write operations are ignored. When a CMD12 command is issued to stop the transfer, a read of the BLEN field after transfer completion (MMCi.MMCHS_STAT[1] TC bit set to 1) will not return the true byte number of data length while the stop occurs but the value written in this register before transfer is launched. 0h = No data transfer 1h = 1 byte block length 2h = 2 bytes block length 3h = 3 bytes block length 1FFh = 511 bytes block length 200h = 512 bytes block length 3FFh = 1023 bytes block length 400h = 1024 bytes block length |
Command Argument register
MMCHS_ARG is shown in Figure 11-5 and described in Table 11-8.
Return to Summary Table.
This register contains a command argument specified as bit 39-8 of Command-Format.
These registers must be initialized prior to sending the command to the card (write action into the register MMCi.MMCHS_CMD register). The only exception is for a command index specifying stuff bits in arguments, making a write unnecessary.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| ARG | |||||||||||||||||||||||||||||||
| R/W-0h | |||||||||||||||||||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-0 | ARG | R/W | 0h | Command argument bits [31:0] For CMD52, ARG must be programmed with IO_RW_DIRECT[39:8]. Refer to SDIO specification. |
Command and Transfer Mode register
MMCHS_CMD is shown in Figure 11-6 and described in Table 11-9.
Return to Summary Table.
MMCi.MMCHS_CMD[31:16] = the command register
MMCi.MMCHS_CMD[15:0] = the transfer mode.
This register configures the data and command transfers. A write into the most significant byte sends the command. A write into MMCi.MMCHS_CMD[15:0] registers during data transfer has no effect. This register shall be used for any card.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | INDX | ||||||
| R-0h | R/W-0h | ||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| CMD_TYPE | DP | CICE | CCCE | RESERVED | RSP_TYPE | ||
| R/W-0h | R/W-0h | R/W-0h | R/W-0h | R-0h | R/W-0h | ||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | |||||||
| R-0h | |||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | MSBS | DDIR | RESERVED | BCE | DE | ||
| R-0h | R/W-0h | R/W-0h | R-0h | R/W-0h | R/W-0h | ||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-30 | RESERVED | R | 0h | |
| 29-24 | INDX | R/W | 0h | Command index Binary-encoded value from 0 to 63, specifying the command number send to card. 0h = CMD0 or ACMD0 1h = CMD1 or ACMD1 3Fh = CMD63 or ACMD63 |
| 23-22 | CMD_TYPE | R/W | 0h | Command type This register specifies three types of special commands: Suspend, Resume, and Abort. These bits shall be set to 0b00 for all other commands. 0h = Other commands 1h = Upon CMD52 Bus Suspend operation 2h = Upon CMD52 Function Select operation 3h = Upon CMD12 or CMD52 I/O Abort command |
| 21 | DP | R/W | 0h | Data present select This register indicates that data is present, and mmci_dat line shall be used. It must be set to 0 in the following conditions: Command using only mmci_cmd line Command with no data transfer, but using busy signal on mmci_dat[0] Resume command 0h = Command with no data transfer 1h = Command with data transfer |
| 20 | CICE | R/W | 0h | Command Index check enable This bit must be set to 1 to enable index check on command response to compare the index field in the response against the index of the command. If the index is not the same in the response as in the command, it is reported as a command index error (MMCi.MMCHS_STAT[19] CIE bit set to1) Note: The CICE bit cannot be configured for an Auto CMD12, then index check is automatically checked when this command is issued. 0h = Index check disable 1h = Index check enable |
| 19 | CCCE | R/W | 0h | Command CRC check enable This bit must be set to 1 to enable CRC7 check on command response to protect the response against transmission errors on the bus. If an error is detected, it is reported as a command CRC error (MMCi.MMCHS_STAT[17] CCRC bit set to 1). Note: The CCCE bit cannot be configured for an Auto CMD12, and then CRC check is automatically checked when this command is issued. 0h = CRC7 check disable 1h = CRC7 check enable |
| 18 | RESERVED | R | 0h | |
| 17-16 | RSP_TYPE | R/W | 0h | Response type These bits define the response type of the command. 0h = No response 1h = Response Length 136 bits 2h = Response Length 48 bits 3h = Response Length 48 bits with busy after response |
| 15-6 | RESERVED | R | 0h | |
| 5 | MSBS | R/W | 0h | Multi/Single block select This bit must be set to 1 for data transfer in case of multi-block command. For any others command, this bit is set to 0. 0h = Single block. If this bit is 0, it is not necessary to set the register MMCi.MMCHS_BLK[31:16] NBLK bits. 1h = Multi-block. When Block Count is disabled (MMCi.MMCHS_CMD[1] BCE bit is set to 0) in Multiple block transfers (MMCi.MMCHS_CMD[5] MSBS bit is set to 1), the module can perform infinite transfer. |
| 4 | DDIR | R/W | 0h | Data transfer direction This bit defines whether either data transfer is a read or a write. 0h = Data Write (host to card) 1h = Data Read (card to host) |
| 3-2 | RESERVED | R | 0h | |
| 1 | BCE | R/W | 0h | Block Count Enable (multiple block transfers only) This bit is used to enable the block count register (MMCHS_BLK[31:16] NBLK bits). When Block Count is disabled (MMCHS_CMD[1] BCE bit is set to 0) in multiple block transfers (MMCHS_CMD[5] MSBS bits is set to 1), the module can perform infinite transfer. 0h = Block count disabled for infinite transfer 1h = Block count enabled for multiple block transfer with known number of blocks |
| 0 | DE | R/W | 0h | DMA enable This bit is used to enable DMA mode for host data access. 0h = DMA mode disable 1h = DMA mode enable |
Command Response[31:0] register
MMCHS_RSP10 is shown in Figure 11-7 and described in Table 11-10.
Return to Summary Table.
This 32-bit register holds bits positions [31:0] of command response type R1/R1b/R2/R3/R4/R5/R5b/R6.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RSP1 | RSP0 | ||||||||||||||||||||||||||||||
| R-0h | R-0h | ||||||||||||||||||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-16 | RSP1 | R | 0h | R1/R1b (normal response) /R3/R4/R5/R5b/R6 : Command Response [39:24] R2: Command Response [31:16] |
| 15-0 | RSP0 | R | 0h | R1/R1b (normal response) /R3/R4/R5/R5b/R6 : Command Response [23:8] R2: Command Response [15:0] |
Command Response[63:32] register
MMCHS_RSP32 is shown in Figure 11-8 and described in Table 11-11.
Return to Summary Table.
This 32-bit register holds bits positions [63:32] of command response type R2.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RSP3 | RSP2 | ||||||||||||||||||||||||||||||
| R-0h | R-0h | ||||||||||||||||||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-16 | RSP3 | R | 0h | R2: Command Response [63:48] |
| 15-0 | RSP2 | R | 0h | R2: Command Response [47:32] |
Command Response[95:64] register
MMCHS_RSP54 is shown in Figure 11-9 and described in Table 11-12.
Return to Summary Table.
This 32-bit register holds bits positions [95:64] of command response type R2.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RSP5 | RSP4 | ||||||||||||||||||||||||||||||
| R-0h | R-0h | ||||||||||||||||||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-16 | RSP5 | R | 0h | R2: Command Response [95:80] |
| 15-0 | RSP4 | R | 0h | R2: Command Response [79:64] |
Command Response[127:96] register
MMCHS_RSP76 is shown in Figure 11-10 and described in Table 11-13.
Return to Summary Table.
This 32-bit register holds bits positions [127:96] of command response type R2.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RSP7 | RSP6 | ||||||||||||||||||||||||||||||
| R-0h | R-0h | ||||||||||||||||||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-16 | RSP7 | R | 0h | R1b (Auto CMD12 response): Command Response [39:24] R2: Command Response [127:112] |
| 15-0 | RSP6 | R | 0h | R1b (Auto CMD12 response): Command Response [23:8] R2: Command Response [111:96] |
Data register
MMCHS_DATA is shown in Figure 11-11 and described in Table 11-14.
Return to Summary Table.
This register is the 32-bit entry point of the buffer for read or write data transfers.
The buffer size is 32 bits × 256 (1024 bytes). Bytes within a word are stored and read in little endian format. This buffer can be used as two 512-byte buffers to transfer data efficiently without reducing the throughput. Sequential and contiguous access is necessary to increment the pointer correctly. Random or skipped access is not allowed. In little endian, if the local host accesses this register byte-wise or 16-bit-wise, the least significant byte (bits [7:0]) must always be written or read first. The update of the buffer address is done on the most significant byte write for full 32-bit DATA register, or on the most significant byte of the last word of block transfer.
Example 1: Byte or 16-bit access
Mbyteen[3:0]=0001 (1-byte) => Mbyteen[3:0]=0010 (1-byte) => Mbyteen[3:0]=1100 (2-bytes) OK
Mbyteen[3:0]=0001 (1-byte) => Mbyteen[3:0]=0010 (1-byte) => Mbyteen[3:0]=0100 (1-byte) OK
Mbyteen[3:0]=0001 (1-byte) => Mbyteen[3:0]=0010 (1-byte) => Mbyteen[3:0]=1000 (1-byte) Bad
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| DATA | |||||||||||||||||||||||||||||||
| R/W-0h | |||||||||||||||||||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-0 | DATA | R/W | 0h | Data Register [31:0] In functional mode (MMCI.MMCHS_CON[4] MODE bit set to the default value 0): A read access to this register is allowed only when the buffer read enable status is set to 1 (MMCi.MMCHS_PSTATE[11] BRE bit), otherwise a bad access (MMCi.MMCHS_STAT[29] BADA bit) is signaled. A write access to this register is allowed only when the buffer write enable status is set to 1 (MMCi.MMCHS_PSTATE[10] BWE bit), otherwise a bad access (MMCi.MMCHS_STAT[29] BADA bit) is signaled and the data is not written. |
Present State register
MMCHS_PSTATE is shown in Figure 11-12 and described in Table 11-15.
Return to Summary Table.
The host can get status of the host controller from this 32-bit read-only register.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | |||||||
| R-0h | |||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | |||||||
| R-0h | |||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | BRE | BWE | RTA | WTA | |||
| R-0h | R-0h | R-0h | R-0h | R-0h | |||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | DLA | DAT1 | CMDI | ||||
| R-0h | R-0h | R-0h | R-0h | ||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-12 | RESERVED | R | 0h | |
| 11 | BRE | R | 0h | Buffer read enable This bit is used for non-DMA read transfers. It indicates that a complete block specified by MMCi.MMCHS_BLK[10:0] BLEN bits has been written in the buffer and is ready to be read. It is set to 0 when the entire block is read from the buffer. It is set to 1 when a block data is ready in the buffer and generates the Buffer read ready status of interrupt (MMCi.MMCHS_STAT[5] BRR bit). 0h = Read BLEN bytes disable 1h = Read BLEN bytes enable. Readable data exists in the buffer. |
| 10 | BWE | R | 0h | Buffer Write enable This status is used for non-DMA write transfers. It indicates if space is available for write data. 0h = There is no room left in the buffer to write BLEN bytes of data. 1h = There is enough space in the buffer to write BLEN bytes of data. |
| 9 | RTA | R | 0h | Read transfer active This status is used for detecting completion of a read transfer. It is set to 1 after the end bit of read command or by activating a continue request (MMCi.MMCHS_HCTL[17] CR bit) following a stop at block gap request. This bit is set to 0 when all data have been read by the local host after last block or after a stop at block gap request. 0h = No valid data on the mmci_dat lines 1h = Read data transfer ongoing |
| 8 | WTA | R | 0h | Write transfer active This status indicates a write transfer active. It is set to 1 after the end bit of write command or by activating a continue request (MMCi.MMCHS_HCTL[17] CR bit) following a stop at block gap request. This bit is set to 0 when CRC status has been received after last block or after a stop at block gap request. 0h = No valid data on the mmci_dat lines 1h = Write data transfer ongoing |
| 7-3 | RESERVED | R | 0h | |
| 2 | DLA | R | 0h | mmci_dat line active This status bit indicates whether one of the mmci_dat line is in use. In the case of read transactions (card to host): This bit is set to 1 after the end bit of read command or by activating continue request MMCi.MMCHS_HCTL[17] CR bit. This bit is set to 0 when the host controller received the end bit of the last data block or at the beginning of the read wait mode. In the case of write transactions (host to card): This bit is set to 1 after the end bit of write command or by activating continue request MMCi.MMCHS_HCTL[17] CR bit. This bit is set to 0 on the end of busy event for the last block; host controller must wait 8 clock cycles with line not busy to really consider not "busy state" or after the busy block as a result of a stop at gap request. 0h = mmci_dat Line inactive 1h = mmci_dat Line active |
| 1 | DAT1 | R | 0h | Command inhibit (mmci_dat) This status bit is generated if either mmci_dat line is active (MMCi.MMCHS_PSTATE[2] DLA bit) or Read transfer is active (MMCi.MMCHS_PSTATE[9] RTA bit) or when a command with busy is issued. This bit prevents the local host to issue a command. A change of this bit from 1 to 0 generates a transfer complete interrupt (MMCi.MMCHS_STAT[1] TC bit). 0h = Issuing of command using the mmci_dat lines is allowed 1h = Issuing of command using the mmci_dat lines is not allowed |
| 0 | CMDI | R | 0h | Command inhibit(mmci_cmd) This status bit indicates that the mmci_cmd line is in use. This bit is set to 0 when the most significant byte is written into the command register. This bit is not set when Auto CMD12 is transmitted. This bit is set to 0 in either the following cases: After the end bit of the command response, excepted if there is a command conflict error (MMCi.MMCHS_STAT[17] CCRC bit or MMCi.MMCHS_STAT[18] CEB bit set to 1) or a Auto CMD12 is not executed (MMCi.MMCHS_AC12[0] ACNE bit). After the end bit of the command without response (MMCi.MMCHS_CMD[17:16] RSP_TYPE bits set to "00"). In case of a command data error is detected (MMCi.MMCHS_STAT[19] CTO bit set to 1), this register is not automatically cleared. 0h = Issuing of command using mmci_cmd line is allowed 1h = Issuing of command using mmci_cmd line is not allowed |
Control register
MMCHS_HCTL is shown in Figure 11-13 and described in Table 11-16.
Return to Summary Table.
This register defines the host controls to set power, wakeup, and transfer parameters.
MMCi.MMCHS_HCTL[31:24] = Wakeup control
MMCi.MMCHS_HCTL[23:16] = Block gap control
MMCi.MMCHS_HCTL[15:8] = Power control
MMCi.MMCHS_HCTL[7:0] = Host control
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | |||||||||||||||
| R-0h | |||||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | SDVS | RESERVED | |||||||||||||
| R-0h | R/W-0h | R-0h | |||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-12 | RESERVED | R | 0h | |
| 11-9 | SDVS | R/W | 0h | SD bus voltage select (all cards) The host driver should set these bits to select the voltage level for the card, according to the voltage supported by the system (MMCi.MMCHS_CAPA[26] VS18 bit, MMCi.MMCHS_CAPA[25] VS30 bit, MMCi.MMCHS_CAPA[24] VS33 bit) before starting a transfer. 5h = 1.8 V (typical) 6h = 3.0 V (typical) 7h = 3.3 V (typical) MMCHS2: This field must be set to 0x5 MMCHS3: This field must be set to 0x5 |
| 8-0 | RESERVED | R | 0h |
SD System Control register
MMCHS_SYSCTL is shown in Figure 11-14 and described in Table 11-17.
Return to Summary Table.
This register defines the system controls to set software resets, clock frequency management, and data time-out.
MMCHS_SYSCTL[31:24] = Software resets
MMCHS_SYSCTL[23:16] = Timeout control
MMCHS_SYSCTL[15:0] = Clock control
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | SRD | SRC | SRA | RESERVED | DTO | ||||||||||
| R-0h | R/W-0h | R/W-0h | R/W-0h | R-0h | R/W-0h | ||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| CLKD | RESERVED | CEN | ICS | ICE | |||||||||||
| R/W-0h | R-0h | R/W-0h | R-0h | R/W-0h | |||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-27 | RESERVED | R | 0h | |
| 26 | SRD | R/W | 0h | Software reset for mmci_dat line This bit is set to 1 for reset and released to 0 when completed .mmci_dat finite state machine in both clock domain are also reset. These registers are cleared by the MMCHS_SYSCTL[26] SRD bit: MMCi.MMCHS_DATA MMCi.MMCHS_PSTATE: BRE, BWE, RTA, WTA, DLA and DATI MMCi.MMCHS_HCTL: SBGR and CR MMCi.MMCHS_STAT: BRR, BWR, BGE and TC Interconnect and MMC buffer data management is reinitialized. 0h = Reset completed 1h = Software reset for mmci_dat line |
| 25 | SRC | R/W | 0h | Software reset for mmci_cmd line This bit is set to 1 for reset and released to 0 when completed. mmci_cmd finite state machine in both clock domain are also reset. These are the registers cleared by the MMCi.MMCHS_SYSCTL[25] SRC bit: MMCi.MMCHS_PSTATE: CMDI MMCi.MMCHS_STAT: CC Interconnect and MMC command status management is reinitialized. 0h = Reset completed 1h = Software reset for mmci_dat line |
| 24 | SRA | R/W | 0h | Software reset for all This bit is set to 1 for reset , and released to 0 when RW 0 completed. This reset affects the entire host controller except for the card detection circuit and capabilities registers. 0h = Reset completed 1h = Software reset for all the designs |
| 23-20 | RESERVED | R | 0h | |
| 19-16 | DTO | R/W | 0h | Data time-out counter value and busy time-out The host driver must set this bit field based on:
0h = TCF × 213 1h = TCF × 214 Eh = TCF × 227 Fh = Reserved |
| 15-6 | CLKD | R/W | 0h | Clock frequency select These bits define the ratio between a reference RW 0x000 clock frequency (system-dependant) and the output clock frequency on the mmci_clk pin of either the memory card (MMC, SD or SDIO). 0h = Clock Ref bypass 1h = Clock Ref bypass 2h = Clock Ref / 2 3h = Clock Ref / 3 3FFh = Clock Ref / 1023 |
| 5-3 | RESERVED | R | 0h | |
| 2 | CEN | R/W | 0h | Clock enable This bit controls whether the clock is provided to the card or not. 0h = The clock is not provided to the card. Clock frequency can be changed. 1h = The clock is provided to the card and can be automatically gated when MMCi.MMCHS_SYSCONFIG[0] AUTOIDLE bit is set to 1 (default value). The host driver waits to set this bit to 1 until the internal clock is stable (MMCi.MMCHS_SYSCTL[1] ICS bit). |
| 1 | ICS | R | 0h | Internal clock stable (status) This bit indicates either the internal clock is stable or not. 0h = The internal clock is not stable 1h = The internal clock is stable after enabling the clock (MMCi.MMCHS_SYSCTL[0] ICE bit) or after changing the clock ratio (MMCi.MMCHS_SYSCTL[15:6] CLKD bits). |
| 0 | ICE | R/W | 0h | Internal clock enable This register controls the internal clock activity. In a very low-power state, the internal clock is stopped. Note: The activity of the debounce clock (used for wakeup events) and the interface clock (used for reads and writes to the module register map) are not affected by this register. 0h = The internal clock is stopped (very low power state). 1h = The internal clock oscillates and can be automatically gated when MMCi.MMCHS_SYSCONFIG[0] AUTOIDLE bit is set to 1 (default value). |
Interrupt Status register
MMCHS_STAT is shown in Figure 11-15 and described in Table 11-18.
Return to Summary Table.
The interrupt status regroups all the status of the module internal events that can generate an interrupt.
MMCHS_STAT[31:16] = Error Interrupt Status
MMCHS_STAT[15:0] = Normal Interrupt Status
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | BADA | CERR | RESERVED | ||||
| R-0h | R/W-0h | R/W-0h | R-0h | ||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | DEB | DCRC | DTO | RESERVED | CEB | CCRC | CTO |
| R-0h | R/W-0h | R/W-0h | R/W-0h | R-0h | R/W-0h | R/W-0h | R/W-0h |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| ERRI | RESERVED | ||||||
| R-0h | R-0h | ||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | BRR | BWR | RESERVED | TC | CC | ||
| R-0h | R/W-0h | R/W-0h | R-0h | R/W-0h | R/W-0h | ||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-30 | RESERVED | R | 0h | |
| 29 | BADA | R/W | 0h | Bad access to data space This bit is set automatically to indicate a bad access to buffer when not allowed: During a read access to the data register (MMCi.MMCHS_DATA) while buffer reads are not allowed (MMCi.MMCHS_PSTATE[11] BRE bit =0) During a write access to the data register (MMCi.MMCHS_DATA) while buffer writes are not allowed (MMCi.MMCHS_PSTATE[10] BWE bit=0) Read 0h = No interrupt Write 0h = Status bit unchanged Read 1h = Bad access Write 1h = Status is cleared |
| 28 | CERR | R/W | 0h | Card error This bit is set automatically when there is at least one error in a response of type R1, R1b, R6, R5, or R5b. Only bits referenced as type E (error) in the status field in the response can set a card status error. An error bit in the response is flagged only if corresponding bit in card status response error MMCi.MMCHS_CSRE in set. There is no card error detection for the autoCMD12 command. The host driver reads MMCi.MMCHS_RSP76 register to detect error bits in the command response. Read 0h = No error Write 0h = Status bit unchanged Read 1h = Card error Write 1h = Status is cleared |
| 27-23 | RESERVED | R | 0h | |
| 22 | DEB | R/W | 0h | Data End Bit error This bit is set automatically when detecting a 0 at the end bit position of read data on mmci_dat line, or at the end position of the CRC status in write mode. Read 0h = No error Write 0h = Status bit unchanged Read 1h = Data end bit error Write 1h = Status is cleared |
| 21 | DCRC | R/W | 0h | Data CRC error This bit is set automatically when there is a CRC16 error in the data phase response following a block read command, or if there is a 3-bit CRC status different of a position 010 token during a block write command. Read 0h = No error Write 0h = Status bit unchanged Read 1h = Data CRC error Write 1h = Status is cleared |
| 20 | DTO | R/W | 0h | Data time-out error This bit is set automatically according to the following conditions:
Read 0h = No error Write 0h = Status bit unchanged Read 1h = Time-out Write 1h = Status is cleared |
| 19 | RESERVED | R | 0h | |
| 18 | CEB | R/W | 0h | Command end bit error This bit is set automatically when detecting a 0 at the end bit position of a command response. Read 0h = No error Write 0h = Status bit unchanged Read 1h = Command end bit error Write 1h = Status is cleared |
| 17 | CCRC | R/W | 0h | Command CRC error This bit is set automatically when there is a CRC7 error in the command response, depending on the enable bit (MMCi.MMCHS_CMD[19] CCCE). Read 0h = No error Write 0h = Status bit unchanged Read 1h = Command CRC error Write 1h = Status is cleared |
| 16 | CTO | R/W | 0h | Command time-out error This bit is set automatically when no response is received within 64 clock cycles from the end bit of the command. For commands that reply within 5 clock cycles, the time-out is still detected at 64 clock cycles. Read 0h = No error Write 0h = Status bit unchanged Read 1h = Time-out Write 1h = Status is cleared |
| 15 | ERRI | R | 0h | Error Interrupt If any of the bits in the Error Interrupt Status register (MMCi.MMCHS_STAT[31:16]) are set, then this bit is set to 1. Therefore, the host driver can efficiently test for an error by checking this bit first. Writes to this bit are ignored. 0h = No interrupt 1h = Error interrupt events occurred |
| 14-6 | RESERVED | R | 0h | |
| 5 | BRR | R/W | 0h | Buffer read ready This bit is set automatically during a read operation to the card (see class 2 - block oriented read commands) when one block specified by the MMCi.MMCHS_BLK[10:0] BLEN bitfield is completely written in the buffer. It indicates that the memory card has filled out the buffer and that the local host needs to empty the buffer by reading it. Note: If the DMA receive-mode is enabled, this bit is never set; instead, a DMA receive request to the main DMA controller of the system is generated. Read 0h = No error Write 0h = Status bit unchanged Read 1h = Ready to read buffer Write 1h = Status is cleared |
| 4 | BWR | R/W | 0h | Buffer write ready This bit is set automatically during a write operation to the card (see class 4 - block oriented write command) when the host can write a complete block as specified by MMCi.MMCHS_BLK[10:0] BLEN. It indicates that the memory card has emptied one block from the buffer and that the local host is able to write one block of data into the buffer. Note: If the DMA transmit mode is enabled, this bit is never set; instead, a DMA transmit request to the main DMA controller of the system is generated. Read 0h = No error Write 0h = Status bit unchanged Read 1h = Ready to write buffer Write 1h = Status is cleared |
| 3-2 | RESERVED | R | 0h | |
| 1 | TC | R/W | 0h | Transfer completed This bit is always set when a read/write transfer is completed or between two blocks when the transfer is stopped due to a stop at block gap request (MMCi.MMCHS_HCTL[16] SBGR bit). This bit is also set when exiting a command in a busy state (if the command has a busy notification capability). In read mode: This bit is automatically set on completion of a read transfer (MMCi.MMCHS_PSTATE[9] RTA bit). In write mode: This bit is set automatically on completion of the mmci_dat line use (MMCi.MMCHS_PSTATE[2] DLA bit). Read 0h = No transfer complete Write 0h = Status bit unchanged Read 1h = Data transfer complete Write 1h = Status is cleared |
| 0 | CC | R/W | 0h | Command complete This bit is set when a 1-to-0 transition occurs in the register command inhibit (MMCi.MMCHS_PSTATE[0] CMDI bit) If the command is a type for which no response is expected, then the command complete interrupt is generated at the end of the command. A command time-out error (MMCi.MMCHS_STAT[16] CTO bit) has higher priority than command complete (MMCi.MMCHS_STAT[0] CC bit). If a response is expected but none is received, then a command time-out error is detected and signaled instead of the command complete interrupt. Read 0h = No command complete Write 0h = Status bit unchanged Read 1h = Command complete Write 1h = Status is cleared |
Interrupt SD Enable register
MMCHS_IE is shown in Figure 11-16 and described in Table 11-19.
Return to Summary Table.
This register allows to enable or disable the module to set status bits, on an event-by-event basis.
MMCHS_IE[31:16] = Error Interrupt Status Enable
MMCHS_IE[15:0] = Normal Interrupt Status Enable
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | BADA_ENABLE | CERR_ENABLE | RESERVED | ||||
| R-0h | R/W-0h | R/W-0h | R-0h | ||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | DEB_ENABLE | DCRC_ENABLE | DTO_ENABLE | RESERVED | CEB_ENABLE | RESERVED | CTO_ENABLE |
| R-0h | R/W-0h | R/W-0h | R/W-0h | R-0h | R/W-0h | R-0h | R/W-0h |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| NULL | RESERVED | ||||||
| R-0h | R-0h | ||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | BRR_ENABLE | BWR_ENABLE | RESERVED | TC_ENABLE | CC_ENABLE | ||
| R-0h | R/W-0h | R/W-0h | R-0h | R/W-0h | R/W-0h | ||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-30 | RESERVED | R | 0h | |
| 29 | BADA_ENABLE | R/W | 0h | Bad access to data space interrupt enable 0h = Masked 1h = Enabled |
| 28 | CERR_ENABLE | R/W | 0h | Card error interrupt enable 0h = Masked 1h = Enabled |
| 27-23 | RESERVED | R | 0h | |
| 22 | DEB_ENABLE | R/W | 0h | Data end bit error interrupt enable 0h = Masked 1h = Enabled |
| 21 | DCRC_ENABLE | R/W | 0h | Data CRC error interrupt enable 0h = Masked 1h = Enabled |
| 20 | DTO_ENABLE | R/W | 0h | Data time-out error interrupt enable 0h = The data time-out detection is deactivated. The host controller provides the clock to the card until the card sends the data or the transfer is aborted. 1h = The data time-out detection is enabled. |
| 19 | RESERVED | R | 0h | |
| 18 | CEB_ENABLE | R/W | 0h | Command end bit error interrupt enable 0h = Masked 1h = Enabled |
| 17 | RESERVED | R | 0h | |
| 16 | CTO_ENABLE | R/W | 0h | Command time-out error interrupt enable 0h = Masked 1h = Enabled |
| 15 | NULL | R | 0h | Fixed to 0 The host driver controls the error interrupts using the Error Interrupt Signal Enable register. Writes to this bit are ignored. |
| 14-6 | RESERVED | R | 0h | |
| 5 | BRR_ENABLE | R/W | 0h | Buffer read ready interrupt enable 0h = Masked 1h = Enabled |
| 4 | BWR_ENABLE | R/W | 0h | Buffer write ready interrupt enable 0h = Masked 1h = Enabled |
| 3-2 | RESERVED | R | 0h | |
| 1 | TC_ENABLE | R/W | 0h | Transfer completed interrupt enable 0h = Masked 1h = Enabled |
| 0 | CC_ENABLE | R/W | 0h | Command completed interrupt enable 0h = Masked 1h = Enabled |
Interrupt Signal Enable register
MMCHS_ISE is shown in Figure 11-17 and described in Table 11-20.
Return to Summary Table.
This register allows to enable or disable the module internal sources of status, on an event-by-event basis.
MMCHS_ISE[31:16] = Error Interrupt Signal Enable
MMCHS_ISE[15:0] = Normal Interrupt Signal Enable
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | BADA_SIGEN | CERR_SIGEN | RESERVED | ||||
| R-0h | R/W-0h | R/W-0h | R-0h | ||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | DEB_SIGEN | DCRC_SIGEN | DTO_SIGEN | RESERVED | CEB_SIGEN | RESERVED | CTO_SIGEN |
| R-0h | R/W-0h | R/W-0h | R/W-0h | R-0h | R/W-0h | R-0h | R/W-0h |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| NULL | RESERVED | ||||||
| R-0h | R-0h | ||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | BRR_SIGEN | BWR_SIGEN | RESERVED | TC_SIGEN | CC_SIGEN | ||
| R-0h | R/W-0h | R/W-0h | R-0h | R/W-0h | R/W-0h | ||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-30 | RESERVED | R | 0h | |
| 29 | BADA_SIGEN | R/W | 0h | Bad access to data space signal status enable 0h = Masked 1h = Enabled |
| 28 | CERR_SIGEN | R/W | 0h | Card error interrupt signal status enable 0h = Masked 1h = Enabled |
| 27-23 | RESERVED | R | 0h | |
| 22 | DEB_SIGEN | R/W | 0h | Data end bit error signal status enable 0h = Masked 1h = Enabled |
| 21 | DCRC_SIGEN | R/W | 0h | Data CRC error signal status enable 0h = Masked 1h = Enabled |
| 20 | DTO_SIGEN | R/W | 0h | Data time-out error signal status enable 0h = Masked 1h = Enabled |
| 19 | RESERVED | R | 0h | |
| 18 | CEB_SIGEN | R/W | 0h | Command end bit error signal status enable 0h = Masked 1h = Enabled |
| 17 | RESERVED | R | 0h | |
| 16 | CTO_SIGEN | R/W | 0h | Command time-out error signal status enable 0h = Masked 1h = Enabled |
| 15 | NULL | R | 0h | Fixed to 0 The host driver controls the error interrupts using the Error Interrupt Signal Enable register. Writes to this bit are ignored. |
| 14-6 | RESERVED | R | 0h | |
| 5 | BRR_SIGEN | R/W | 0h | Buffer read ready signal status enable 0h = Masked 1h = Enabled |
| 4 | BWR_SIGEN | R/W | 0h | Buffer write ready signal status enable 0h = Masked 1h = Enabled |
| 3-2 | RESERVED | R | 0h | |
| 1 | TC_SIGEN | R/W | 0h | Transfer completed signal status enable 0h = Masked 1h = Enabled |
| 0 | CC_SIGEN | R/W | 0h | Command completed signal status enable 0h = Masked 1h = Enabled |