R01UH0823EJ0100 Rev.1.00 Page 1421 of 1823
Jul 31, 2019
RX23W Group 40. SD Host Interface (SDHIa)
40.2 Register Details
40.2.1 Command Register (SDCMD)
Note 1. Some commands cannot be used in normal mode. Refer to Table 40.3 and set the RSPTP[2:0] bits.
Note 2. The CMDTP bit is valid only when the RSPTP[2:0] bits are 011b, 100b, 101b, 110b, or 111b.
Note 3. Bits CMDRW and TRSTP are valid only when the RSPTP[2:0] bits are 011b, 100b, 101b, 110b, or 111b, and the CMDTP bit is 1.
Note 4. The CMD12AT[1:0] bits are valid only when the RSPTP[2:0] bits are 011b, 100b, 101b, 110b, or 111b, and the TRSTP bit is 1.
The command type and response type are set in the SDCMD register. The command type and transfer mode must be set
when the RSPTP[2:0] bits are 011b, 100b, 101b, 110b, or 111b. The sequence starts when a value is written to this
register. Refer to
Table 40.3 for setting examples. Do not write to the SDCMD register when the SDSTS2.CBSY flag is
1.
SDCMD
Address(es): SDHI.SDCMD 0008 AC00h
b31 b30 b29 b28 b27 b26 b25 b24 b23 b22 b21 b20 b19 b18 b17 b16
— — — — — — — — — — — — — — — —
Value after reset:
0000000000000000
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
CMD12AT[1:0] TRSTP
CMDRW
CMDTP RSPTP[2:0] ACMD[1:0] CMDIDX[5:0]
Value after reset:
0000000000000000
Bit Symbol Bit Name Description R/W
b5 to b0 CMDIDX[5:0]
Command Index Field Value
Select
These bits configure the command index field value. The examples
below include the bit values for the ACMD[1:0] bits.
b7 b0
0 0 0 0 0 1 1 0: CMD6
0 0 0 1 0 0 1 0: CMD18
0 1 0 0 1 1 0 1: ACMD13
R/W
b7, b6 ACMD[1:0] Command Type Select
b7 b6
0 0: CMD
0 1: ACMD
Only set the values listed above.
R/W
b10 to b8 RSPTP[2:0] Response Type Select
*1
b10 b8
0 0 0: Normal mode. Depending on the command, the response
type and transfer method are selected by setting the
ACMD[1:0] bits and CMDIDX[5:0] bits. At this time, the
values for b15 to b11 in this register are invalid.
0 1 1: Expansion mode and no response
1 0 0: Expansion mode and R1, R5, R6, or R7 response
1 0 1: Expansion mode and R1b response
1 1 0: Expansion mode and R2 response
1 1 1: Expansion mode and R3 or R4 response
Only set the values listed above.
R/W
b11 CMDTP Data Transfer Select
*2
0: Command does not include data transfer (bc, bcr, or ac)
1: Command includes data transfer (adtc)
R/W
b12 CMDRW
Data Transfer Direction Select
*3
0: Write data to the SD card
1: Read data from the SD card
R/W
b13 TRSTP Block Transfer Select
*3
0: Single block transferred
1: Multiple blocks transferred
R/W
b15, b14 CMD12AT[1:0]
CMD12 Automatic Issue
Select
*4
b15 b14
0 0: CMD12 is automatically issued during multi-block transfer
0 1: CMD12 is not automatically issued during multi-block transfer
Only set the values listed above.
R/W
b31 to b16 — Reserved These bits are 0 when read and cannot be modified. R