459
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
18.4.6
Read data block
The read data block is a block-based data transfer. The basic unit of data transfer is a data block. The size of the block
is defined in CSD (READ_BL_LEN). If READ_BL_PARTIAL is set, smaller blocks of data can also be transferred,
whose start and end addresses are fully contained within the 512-byte boundary, and READ_BL_LEN defines the
size of the physical block.
CMD17 (READ_SINGLE_BLOCK) means to start reading a data block, and the card returns to the sending state
after the transmission is over. CMD18 (READ_MULTIPLE_BLOCK) starts to read multiple consecutive data blocks.
In order to ensure the integrity of data transmission, there is a CRC check code after each data block.
The block length is set by CMD16 and can be set to 512 bytes regardless of the setting of READ_BL_LEN.
The host can abort a multi-block read operation at any time, regardless of the type of operation. Send a stop transfer
command (CMD12) to abort the operation. The stop command has a delay in execution due to serial command
transmission. Data transfer is stopped after the end bit of the stop command.
When using CMD18 to read the last block of userland, the host should ignore possible OUT_OF_RANGE errors,
even if the sequence is correct.
If the card detects an error (for example: out-of-bounds, address misplacement, or internal error) during a multi-block
read operation (of either type), it stops the data transfer and remains in the data state; at this point the host must send
a stop transfer command to abort operate. Read errors are reported in response to the stop transfer command. If the
host sends the stop transmission command, the card has already transmitted the last data block in a certain number
of multiple data block operations, because the card is no longer in the data state at this time, the host will get an illegal
command response. If the cumulative length of the partial blocks transferred by the host is not block aligned and
block misalignment is not allowed, the card will detect block misalignment at the beginning of the first unaligned
block, set the ADDRESS_ERROR error flag in the status register, interrupt the transfer and wait for the data Status
of the stop command.
18.4.7
Data Streaming Operation (Only for Multimedia Card)
Data stream operations include data stream write and data stream read. In streaming mode, data is transferred in bytes
without CRC after each data block.
Data stream write
Data stream writing to CMD20 (WRITE_DAT_UNTIL_STOP) starts to transmit data from the host to the card,
starting from the starting address and continuing to transmit until the host issues a stop command. If partial data block
transfers are allowed (CSD parameter WRITE_BL_PARTIAL is set), data flow can be started and stopped at any
address in the card's address space, otherwise data flow should only be started and stopped at data block boundaries.
Since the amount of data to be transmitted is not predetermined, the CRC check cannot be used. If the maximum
memory address is reached when sending data, subsequent data transfers will be discarded even if the SDIO card
host does not send a stop command.
If the host provides an out-of-range address as a parameter to CMD20, the card will reject the command, stay in the
transmit state, and set ADDRESS_OUT_OF_RANGE; it should be noted that the data stream write command is only
applicable to 1-bit bus configuration (SDIO_DAT0 signal on-line). It is considered an illegal command if CMD20 is