MultiMediaCard Product Manual
SanDisk MultiMediaCard Product Manual Rev. 2 © 2000 SANDISK CORPORATION
44
ADDRESS_ERROR error bit in the status register,
and while ignoring all further data transfer, wait
(in the
Receive-Data-State
) for a stop command.
The write operation will also be aborted if the
host tries to write over a write protected area. In
this case, however, the card will set the
WP_VIOLATION bit.
Programming of the CSD register does not require
a previous block length setting. The transferred
data is also CRC protected. Only the least
significant 16 bits of the CSD can be changed by
the host. The rest of the CSD register content must
match the card CSD. If the card detects content
inconsistency between the old and new CSD
register, it will not reprogram the CSD. This is
done to ensure validity of the CRC field of the
CSD register.
After receiving a block of data and completing the
CRC check, the card will begin programming 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 may poll the
status of the card with a SEND_STATUS
command at any time, and the card will respond
with its status. The status bit
READY_FOR_DATA indicates whether the
MultiMediaCard can accept new data or whether
the write process is still in progress. The host may
deselect the card by issuing CMD7 (to select a
different card) which will place the card in the
Disconnect State and release the DAT line
without interrupting the write operation. When
reselecting the card, it will reactivate busy
indication by pulling DAT to low if programming
is still in progress and write buffer is unavailable.
•
Erase
It is desirable to erase many
sectors
simultaneously in order to enhance the data
throughput. Identification of these sectors is
accomplished with the TAG_* commands. Either
an arbitrary set of sectors within a single erase
group, or an arbitrary selection of erase groups
may be erased at one time, but not both together.
That is, the unit of measure for determining an
erase is either a sector or an erase group, but if a
sector, all selected sectors must lie within the
same erase group. To facilitate selection, a first
command with the starting address is followed by
a second command with the final address, and a l l
sectors within this range will be selected for
erase. After a range is selected, an individual
sector (or group) within that range can be removed
using the UNTAG command.
The host must adhere to the following
command
sequence:
TAG_SECTOR_START,
TAG_SECTOR_END, UNTAG_SECTOR (up to 16
untag sector commands can be sent for one erase
cycle) and ERASE (or the same sequence for group
tagging). The following exception conditions are
detected by the MultiMediaCard:
• An erase or tag/untag command is received
out of sequence. The card will set the
ERASE_SEQ_ERROR error bit in the
status register and reset the whole
sequence.
• An out of sequence command (except
SEND_STATUS) is received. The card
will set the ERASE_RESET status bit in
the status register, reset the erase
sequence and execute the last command.
If the erase range includes write protected sectors,
they will be left intact and only the non protected
sectors will be erased. The WP_ERASE_SKIP
status bit in the status register will be set.
The address field in the tag commands is a sector
or a group address in byte units. The card will
ignore all LSBs below the group or sector size.
The number of untag commands (CMD34 and
CMD37) which are used in a sequence is limited up
to 16.
As described above for block write, the
MultiMediaCard will indicate that an erase is in
progress by holding DAT low.
•
Write Protect Management
Card data may be protected against either erase
or write by the write protection features. The
entire card may be permanently write protected by
the manufacturer or content provider by setting
the permanent or temporary write protect bits in
the CSD. Portions of the data may also be
protected (in units of WP_GRP_SIZE sectors as
specified in the CSD). The SET_WRITE_PROT
command sets the write protection of the
addressed
write-protect
group,
and the
CLR_WRITE_PROT command clears the write
protection of the addressed write-protect group.