CSD Programming Erase Data Transfer Mode

Revision 1.0 MultiMediaCardRS-MultiMediaCard Product Manual © 2004 SanDisk Corporation 4-7 051304 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.

4.2.3 CSD Programming

Programming of the CSD register does not require a previous block length setting. After sending CMD27 and receiving an R1 response, the start bit =0 is sent, the modified CSD register =16 bytes, CRC16 =2 bytes, and end bit =1. The host can change only the least significant 16 bits [15:0] of the CSD. The rest of the CSD register content must match the MultiMediaCardRS-MultiMediaCard CSD Register. If the card detects a content inconsistency between the old and new CSD register, it will not reprogram the CSD in order to ensure validity of the CRC field in the CSD register. Bits [7:1] are the CRC7 of bits [127:8] of the CSD Register, which should be recalculated once the register changes. After calculating CRC7, the CRC16 should also be calculated for all of the CSD Register [127:0].

4.2.4 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 together; that is, the unit of measure for determining an erase is either a sector or an erase group. If it is a sector, all selected sectors must lay 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 all 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. Condition exceptions the MultiMediaCardRS-MultiMediaCard may detect includes: • An erase or TAGUNTAG command is received out of sequence. The card will set the ERASE_SEQ_ERROR bit in the Status Register and reset the entire 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 remain 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 used in a sequence is limited for up to 16. As described for block write, the MultiMediaCardRS-MultiMediaCard will indicate that an erase is in progress by holding DAT low. Revision 1.0 MultiMediaCardRS-MultiMediaCard Product Manual © 2004 SanDisk Corporation 4-8 051304

4.2.5 Write Protect Management