Multiple-block Data Read
If the
transfer_mode
bit in the
cmd
register is set to 0 and the value of the
bytcnt
register is not equal
to the value of the
block_size
register, the transfer is a multiple-block read-data transfer. The data-receive
state machine receives data in blocks, where the number of bytes in a block is equal to the block size, including
the internally-generated CRC-16.
†
If the
ctype
register is set to a 1-bit, 4-bit, or 8-bit data transfer, data is received from 1, 4, or 8 data lines,
respectively, and CRC-16 is separately generated and checked for 1, 4, or 8 data lines, respectively. After a
data block is received, if the remaining byte count becomes zero, the data path signals a data transfer to the
BIU.
†
If the remaining data bytes are greater than zero, the data path state machine causes another data block to
be received. If CRC-16 of a received data block does not match the internally-generated CRC-16, a data CRC
error to the BIU and data reception continue further data transmission until all bytes are transmitted.
Additionally, if the end of a received data block is not 1, data on the data path signals terminate the bit error
to the CIU and the data-receive state machine terminates data reception, waits for data timeout, and signals
to the BIU that the data transfer is complete.
†
If the
send_auto_stop
bit in the
cmd
register is set to 1, the SD/SDIO STOP command is internally
generated when the last data block is transferred, where no extra bytes are transferred from the card. The
end bit of the STOP command might not exactly match the end bit of the last data block.
†
If the requested block size for data transfers to cards is less than 4, 16, or 32 bytes for 1-bit, 4-bit, or 8-bit
data transfer modes, respectively, the data-transmit state machine terminates the data transfer when all data
is transferred, at which point the internally-generated STOP command is loaded in the command path. Data
received from the card after that are then ignored by the data path.
†
If the
bytcnt
register is 0 (the block size must be greater than zero), the transfer is an open-ended block
transfer. For this type of data transfer, the data-receive state machine continues the block-read data transfer
until the host software issues an SD/SDIO STOP or STOP_TRANSMISSION (CMD12) command.
†
Auto-Stop
The controller internally generates an SD/SDIO STOP command and is loaded in the command path when
the
send_auto_stop
bit in the
cmd
register is set to 1. The AUTO_STOP command helps to send an
exact number of data bytes using a stream read or write for the MMC, and a multiple-block read or write
for SD memory transfer for SD cards. The software must set the
send_auto_stop
bit according to the
following details:
†
The following list describes conditions for the AUTO_STOP command:
†
SD/MMC Controller
Altera Corporation
cv_54011
Multiple-block Data Read
11-22
2013.12.30