Purpose
sdcard sd mode read process
Description
- Make sure sdcard is under "transfer state", if the sdcard is under other state, host will send Cmd12 to stop the current operation and to transit sdcard to "stand-by state".
- Host sends Cmd13 to check sdcard's status, to make sure sdcard is "ready-for-data".
- Host sends Cmd18 to do multiple blocks read, the address here is different between high capacity sdcard and normal sdcard, the address of SDHC is equal to the block number, while normal sdcard's address is equal to block number times 512.
Read Optimization
- To optimize the read multiple blocks, try to keep the sdcard in the "data state" as long as possible. after send READ_MULTIPLE_BLOCK command, set the block number in the MCI_BLKR as 0, each time a new read start, do not re-send the READ_MULTIPLE_BLOCK command, just re-configure the PDC. In this case, host does not have to send STOP_TRANSMISSION to transfer the sdcard's state and the performance is optimized.
- MoveToTransferState will check the state of the sdcard, and send STOP_TRANSMISSION if need to transfer state. Normally this function is called between the state tranfer.
- ContinuousRead will be called if READ_MULTIPLE_BLOCK already been sent and this function will not re-send the read command, but will re-configure PDC accordingly.