• Open-ended transfers—For an open-ended block transfer, the byte count is 0. At the end of the data
transfer, software must send the STOP_TRANSMISSION command (CMD12).
†
• Fixed-length transfers—The byte count is nonzero. You must already have written the number of
bytes to the
bytcnt
register. The controller issues the STOP command for you if you set the
send_auto_stop
bit of the
cmd
register to 1. After completion of a transfer of a given number of
bytes, the controller sends the STOP command. Completion of the AUTO_STOP command is reflected
by the Auto Command Done interrupt. A response to the AUTO_STOP command is written to the
resp1
register. If software does not set the
send_auto_stop
bit in the
cmd
register to 1, software
must issue the STOP command just like in the open-ended case.
†
When the
dto
bit of the
rintsts
register is set, the data command is complete.
†
cmd Register Settings for Single-Block and Multiple-Block Write
Table 11-19: cmd Register Settings for Single-Block and Multiple-Block Write (Default)
†
Comment
Value
Parameter
This bit resets itself to 0 after the command is committed
(accepted by the BIU).
1
start_cmd
Choose the value based on speed mode being used.
1 or 0
use_hold_reg
Does not need to update clock parameters
0
update_clk_regs_only
Data command
1
data_expected
For one card
1
card_number
Block transfer
0
transfer_mode
Can be 1, but only for card reset commands such as SD/
SDIO GO_IDLE_STATE
0
send_initialization
Can be 1 for commands to stop data transfer such as SD/
SDIO STOP_TRANSMISSION
0
stop_abort_cmd
Refer to
Auto Stop
for information about how to set this
parameter.
0 or 1
send_auto_stop
Write to card
1
read_write
Can be 1 for R2 (long) responses
0
response_length
Can be 0 for commands with no response. For example,
SD/SDIO GO_IDLE_STATE, SET_DSR, GO_INACTIVE_
STATE etc.
1
response_expect
Table 11-20: cmd Register Settings for Single-Block and Multiple-Block Write (User Selectable)
†
Comment
Value
Parameter
0—Sends command to the CIU immediately
1—Sends command after previous data transfer ends
1
wait_prvdata_complete
SD/MMC Controller
Altera Corporation
cv_54011
cmd Register Settings for Single-Block and Multiple-Block Write
11-42
2013.12.30