17-8
MC68SZ328 Reference Manual
MOTOROLA
Multimedia Card/Secure Digital Host Controller
Thereafter, the host issues SET_RELATIVE_ADDR (CMD3) to assign this card a relative card address
(RCA). Once the RCA is received, the card state changes to the Stand-by State and does not react to further
identification cycles, and its output switches from open-drain to push-pull.
The host repeats the process of issuing CMD2 and CMD3 until the host receives a time-out condition to
recognize the completion of the identification process.
17.5.2 Data Transfer Mode
All data communication in the data transfer mode is point-to-point between the host and the selected card
(using addressed commands). The broadcast command SET_DSR (CMD4) configures the driver stages of
all identified cards. It programs their DSRs (Driver Stage Registers) corresponding to the application bus
layout (length) and the number at that point. SELECT/DESELECT_CARD (CMD7) is used to select one
card and put it into the Transfer State. Only one card can be in the Transfer State at a given time. If a
previously selected card is in the Transfer State, the connection with the host is released and the selected
card moves back to the Stand-by State. When SELECT/DESELECT_CARD (CMD7) is issued with the
reserved relative card address 0x0000, all cards are put back to Stand-by State. This can be used before
identifying new cards without resetting other already registered cards.
The card deselection is used if a certain card gets SELECT/DESELECT_CARD (CMD7) with an
unmatched RCA. Deselection happens automatically if another card is selected and the CMD lines are
common. It is the host’s responsibility either to work with a common CMD line (after initialization is
done)—in which case the card deselection occurs automatically (as in the MMC system)—or, if the CMD
lines are separate, to be aware of the necessity to deselect cards.
17.5.2.1 Block Access: Block Write and Block Read
17.5.2.1.1 Block Write
For block-oriented write data transfers, the CRC check bits are added to each data block. The card
performs 1 bit or 4 bits CRC parity check for each received data block prior to the write operation. This
mechanism can prevent the writing of erroneously transferred data.
During block write (CMD24–27, 42, 56(w)), one or more blocks of data are transferred from the host to the
card with a CRC appended to the end of each block by the host. A card supporting block write can always
accept a block of data defined by WRITE_BL_LEN. If the CRC fails, the card indicates the failure on the
DAT line; the transferred data is discarded and not written, and all further transmitted blocks (in multiple
block write mode) are ignored.
If the host uses partial blocks with an accumulated length that is not block aligned, and if block
misalignment is not allowed (the CSD parameter WRITE_BLK_MISALIGN is not set), the card detects
the block misalignment error and aborts programming before the beginning of the first misaligned block.
The card sets the ADDRESS_ERROR error bit in the status register, ignores all further data transfers, and
waits in the receive-data state for a stop command. The write operation is also aborted if the host tries to
write over a write-protected area. When this occurs, the card sets the WP_VIOLATION bit.
Programming the CID and CSD registers does not require a previous block length setting. The transferred
data is also CRC protected. If part of the CSD or CID register is stored in ROM, then this unchangeable
part must match the corresponding part of the receive buffer. If this match fails, then the card reports an
error and does not change any register content. Some cards require long and unpredictable amounts of time
to write a block of data. After receiving a block of data and completing the CRC check, the card begins to
write and hold the DAT line low if its write buffer is full and unable to accept new data from a new
WRITE_BLOCK command. The host can poll the status of the card with a SEND_STATUS command
(CMD13) at any time, and the card responds with its status. The status bit READY_FOR_DATA indicates