UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
User manual
Rev. 1.3 — 6 July 2012
439 of 1269
NXP Semiconductors
UM10503
Chapter 20: LPC43xx SD/MMC interface
[1]
The condition under which the transfer mode is set to block transfer and byte_count is equal to block size is
treated as a single-block data transfer command for both MMC and SD cards. If byte_count = n
block_size (n = 2, 3, …), the condition is treated as a predefined multiple-block data transfer command. In
the case of an MMC card, the cpu software can perform a predefined data transfer in two ways: 1) Issue the
CMD23 command before issuing CMD18/CMD25 commands to the card – in this case, issue
CMD18/CMD25 commands without setting the send_auto_stop bit. 2) Issue CMD18/CMD25 commands
without issuing CMD23 command to the card, with the send_auto_stop bit set. In this case, the
multiple-block data transfer is terminated by an internally-generated auto-stop command after the
programmed byte count.
The following list conditions for the auto-stop command.
•
Stream read for MMC card with byte count greater than 0 - The Module generates an
internal stop command and loads it into the command path so that the end bit of the
stop command is sent out when the last byte of data is read from the card and no
extra data byte is received. If the byte count is less than 6 (48 bits), a few extra data
bytes are received from the card before the end bit of the stop command is sent.
•
Stream write for MMC card with byte count greater than 0 - The Module generates an
internal stop command and loads it into the command path so that the end bit of the
stop command is sent when the last byte of data is transmitted on the card bus and no
extra data byte is transmitted. If the byte count is less than 6 (48 bits), the data path
transmits the data last in order to meet the above condition.
•
Multiple-block read memory for SD card with byte count greater than 0 - If the block
size is less than 4 (single-bit data bus), 16 (4-bit data bus), or 32 (8-bit data bus), the
auto-stop command is loaded in the command path after all the bytes are read.
Otherwise, the top command is loaded in the command path so that the end bit of the
stop command is sent after the last data block is received.
•
Multiple-block write memory for SD card with byte count greater than 0 - If the block
size is less than 3 (single-bit data bus), 12 (4-bit data bus), or 24 (8-bit data bus), the
auto-stop command is loaded in the command path after all data blocks are
transmitted. Otherwise, the stop command is loaded in the command path so that the
end bit of the stop command is sent after the end bit of the CRC status is received.
•
Precaution for cpu software during auto-stop - Whenever an auto-stop command is
issued, the cpu software should not issue a new command to the Module until the
auto-stop is sent by the Module and the data transfer is complete. If the cpu issues a
new command during a data transfer with the auto-stop in progress, an auto-stop
command may be sent after the new command is sent and its response is received;
this can delay sending the stop command, which transfers extra data bytes. For a
stream write, extra data bytes are erroneous data that can corrupt the card data. If the
cpu wants to terminate the data transfer before the data transfer is complete, it can
issue a stop or abort command, in which case the Module does not generate an
auto-stop command.
20.7.3 Software/hardware restrictions
Only one data transfer command should be issued at one time. For CE-ATA devices, if
CE-ATA device interrupts are enabled (nIEN=0), only one RW_MULTIPLE_BLOCK
command (RW_BLK) should be issued; no other commands (including a new RW_BLK)
should be issued before the Data Transfer. Over status is set for the outstanding
RW_BLK.