Chapter 4 – SD Card Protocol Description
Revision 2.2
SanDisk SD Card Product Manual
© 2004 SanDisk Corporation
4-9
12/08/04
•
A card can be re-selected while in the Disconnect State, using CMD7. In that case, the
card will move to the Programming State and reactivate the busy indication.
•
Resetting the card (using CMD0 or CMD15) will terminate any pending or active
programming operation, which may destroy the data contents on the card. It is the
host’s responsibility to prevent the potential destruction of data.
4.4.1 2-GB
Card
To make a 2-GB card, the Maximum Block Length (READ_BL_LEN=WRITE_BL_LEN)
will be set to 1024 bytes. But Block Length set by CMD16 must be up to 512 bytes to stay
consistent with 512 bytes Maximum Block Length cards (less than and equal 2-GB cards).
4.4.2 Wide
Bus
Selection/De-selection
Wide bus (4-bit bus width) operation mode may be selected/de-selected using ACMD6.
The default bus width after power up or GO_IDLE (CMD) is one-bit bus width. ACMD6
command is valid in tran state only. That means that the bus width may be changed only
after a card has been selected (CMD7).
4.4.3
Data Read Format
When data is not being transmitted, the DAT bus line is high. A transmitted data block
consists of a start bit (low), followed by a continuous data stream. The data stream contains
the net payload data, and error correction bits if an off-card ECC is used. The data stream
ends with an end bit (high). The data transmission is synchronous to the clock signal
The payload for a block-oriented data transfer is preserved by a CRC checksum. The
generator polynomial is standard CCITT format: x
16
+ x
12
+ x
5
+ 1.
Block Read
The basic unit of data transfer is a block whose maximum size is defined by
READ_BL_LEN in the CSD Register. Smaller blocks with a starting and ending address
contained entirely within one physical block, as defined by READ_BL_LEN, may also be
transmitted. A CRC appended to the end of each block ensures data transfer integrity.
CMD17 or
READ_SINGLE_BLOCK
starts a block read and returns the card to the Transfer
State after a complete transfer. CMD18 or
READ_MULTIPLE_BLOCK
starts a transfer of
several consecutive blocks. Blocks will be continuously transferred until a stop command
is issued. The stop command has an execution delay due to the serial command
transmission. The data transfer stops after the end bit of the stoop command.
If the host uses partial blocks with an accumulated length that is not block-aligned, the
card, at the beginning of the first misaligned block, will detect a block misalignment error,
set the ADDRESS_ERROR bit in the Status Register, abort transmission, and wait in the
Data State for a stop command.
4.4.4
Data Write Format
The
data transfer format
is similar to the data read format. For block-oriented write data
transfer, the CRC check bits are added to each data block. Prior to an operation, the card
performs a CRC check for each such received data block.
5
This mechanism prevents the
erroneous writing of transferred data.
5
The polynomial is the same one used for a read operation.