Memory Array Read and Write Operations

Revision 1.0 MultiMediaCardRS-MultiMediaCard Product Manual © 2004 SanDisk Corporation 1-5 051304 In addition, the host can explicitly send either card to an inactive state by using the GO_INACTIVE_STATE command.

1.12.3 Card Acquisition and Identification

The MultiMediaCard and RS-MultiMediaCard bus is a single master host application and multi-slaves cards bus. The host can query the bus and determine how many cards, and of which type, are connected. The card’s CID Register is pre-programmed with a unique card identification number used during the identification procedure. In addition, the card host can read either card’s CID Register using the READ_CID command. The CID Register is programmed during MultiMediaCard and RS- MultiMediaCard testing and formatting procedures during manufacturing. The card host can only read, and not write to the CID Register.

1.12.4 Card Status

The MultiMediaCard and RS-MultiMediaCard status is stored in a 32-bit status register that is sent as the data field, in the card response to host commands. The Status Register provides information about the card’s active state and completion codes for the last host command The card status can be explicitly polled with the SEND_STATUS command.

1.12.5 Memory Array

Partitioning The MultiMediaCardRS-MultiMediaCard memory space is byte addressable with addresses ranging from 0 to the last byte, and is divided into several structures. Memory bytes are grouped into 512-byte blocks called sectors. Every block can be read, written and erased individually. Sectors are grouped into erase groups of 16 or 32 sectors depending on card size. Any combination of sectors within one group, or any combination of erase groups can be erased with a single erase command. A write command implicitly erases the memory before writing new data into it. An explicit erase command can be used for pre-erasing memory and speed up the next write operation. Erase groups are grouped into Write Protect Groups WPG of 32 erase groups. The writeerase access to each WPG can be limited individually. The last highest in address WPG will be smaller and contain less than 32 erase groups. A diagram of the memory structure hierarchy is shown in Figure 1-2. Table 1-1 summarizes the number of various memory structures for the different MultiMediaCards and RS-MultiMediaCards. Revision 1.0 MultiMediaCardRS-MultiMediaCard Product Manual © 2004 SanDisk Corporation 1-6 051304 Figure 1-2 Memory Array Partitioning Table 1-1 Memory Array Structures Summary 1 Structure SDMJ-32 SDMRJ-32 SDMJ-64 SDMRJ-64 SDMJ-128 SDMRJ-128 SDMJ-256 SDMRJ-256 Bytes 32 MB 64 MB 128 MB 256 MB Sector 62,720 125,440 250,880 501,760 Erase Group Size [sectors] 32 32 32 32 Number of Erase Groups 1,960 3,920 7,840 15,680 Write Protect Group Size [erase groups] 32 32 32 32 Number of Write Protect Groups 62 123 245 490 Available 2nd Half 2004 1 All measurements are units-per-card. SanDisk MMCRS-MMC Card WP Group N WP Group 1 E ra s e G ro u p Sector n Sector 0 Erase Group m Sector n Sector 2 Sector 1: bytes 512 - 1,023 Sector 0: bytes 0 - 511 E ra s e G ro u p 1 W ri te P ro te c t G ro u p Revision 1.0 MultiMediaCardRS-MultiMediaCard Product Manual © 2004 SanDisk Corporation 1-7 051304

1.12.6 Read and Write Operations

The MultiMediaCardRS-MultiMediaCard support two readwrite modes as shown in Figure 1-3 and defined in Table 1-2. Figure 1-3 Data Transfer Formats Table 1-2 Mode Definitions Mode Description Single Block In this mode the host reads or writes one data block in a pre-specified length. The data block transmission is protected with 16-bit CRC that is generated by the sending unit and checked by the receiving unit. The block length for read operations is limited by the device sector size 512 bytes but can be as small as a single byte. Misalignment is not allowed. Every data block must be contained in a single physical sector. The block length for write operations must be identical to the sector size and the start address aligned to a sector boundary. Multiple Block This mode is similar to the single block mode, except for the host can readwrite multiple data blocks all have the same length that are stored or retrieved from contiguous memory addresses starting at the address specified in the command. The operation is terminated with a stop transmission command. Misalignment and block length restrictions apply to multiple blocks and are identical to the single block readwrite operations.

1.12.7 Data Protection in the Flash Card