Professional Documents
Culture Documents
HB28D032MM2 Renesas PDF
HB28D032MM2 Renesas PDF
HB28D032MM2 Renesas PDF
The semiconductor operations of Mitsubishi Electric and Hitachi were transferred to Renesas
Technology Corporation on April 1st 2003. These operations include microcomputer, logic, analog
and discrete devices, and memory chips other than DRAMs (flash memory, SRAMs etc.)
Accordingly, although Hitachi, Hitachi, Ltd., Hitachi Semiconductors, and other Hitachi brand
names are mentioned in the document, these names have in fact all been changed to Renesas
Technology Corp. Thank you for your understanding. Except for our corporate trademark, logo and
corporate statement, no changes whatsoever have been made to the contents of the document, and
these changes do not constitute any alteration to the contents of the document itself.
ADE-203-1294E (Z)
Rev. 5.0
Jan. 16, 2003
Description
These Hitachi MultiMediaCards, HB28H016MM2, HB28D032MM2, HB28B064MM2 and
HB28B128MM2, are highly integrated flash memories with serial and random access capability. It is
accessible via a dedicated serial interface optimized for fast and reliable data transmission. This interface
allows several cards to be stacked by through connecting their peripheral contacts. These Hitachi
MultiMediaCards are fully compatible to a new consumer standard, called the MultiMediaCard system
standard defined in the MultiMediaCard system specification [1]. The MultiMediaCard system is a new
mass-storage system based on innovations in semiconductor technology. It has been developed to provide
an inexpensive, mechanically robust storage medium in card form for multimedia consumer applications.
MultiMediaCard allows the design of inexpensive players and drives without moving parts. A low power
consumption and a wide supply voltage range favors mobile, battery-powered applications such as audio
players, organizers, palmtops, electronic books, encyclopedia and dictionaries. Using very effective data
compression schemes such as MPEG, the MultiMediaCard will deliver enough capacity for all kinds of
multimedia data: software/programs, text, music, speech, images, video etc.
1 2 3 4 5 6 7
VCC
VPP CS CMD/DI CLK/SCLK DAT/DO
Generator Interface driver
Internal clock
CMD
DAT
CID[127:0]
set
Interface
CSD[127:0]
RCA[15:0]
Memory core
All units in these Hitachi MultiMediaCards are clocked by an internal clock generator. The Interface
driver unit synchronizes the DAT and CMD signals from external CLK to the internal used clock signal.
The card is controlled by the three line MultiMediaCard interface containing the signals: CMD, CLK,
DAT (refer to Chapter “Interfaces”). For the identification of the MultiMediaCard in a stack of
MultiMediaCards, a card identification register (CID) and a relative card address register (RCA) is
foreseen. An additional register contains different types of operation parameters. This register is called
card specific data register (CSD). The communication using the MultiMediaCard lines to access either the
memory field or the registers is defined by the MultiMediaCard standard (refer to Chapter
“Communication”). The card has its own power on detection unit. No additional master reset signal is
required to setup the card after power on. It is protected against short circuit during insertion and removal
while the MultiMediaCard system is powered up (refer to Chapter “Power Supply”). No external
programming voltage supply is required. The programming voltage is generated on card.
These Hitachi MultiMediaCards support a second interface operation mode the SPI interface mode. The
SPI mode is activated if the CS signal is asserted (negative) during the reception of the reset command
(CMD0) (refer to Chapter “SPI Communication”).
• MultiMediaCard mode
• SPI mode
Both modes are using the same pins. The default mode is the MultiMediaCard mode. The SPI mode is
selected by activating (= 0) the CS signal (Pin1) and sending the CMD0.
MultiMediaCard Mode
In the MultiMediaCard mode, all data is transferred over a minimal number of lines:
• CLK: with each cycle of this signal a one-bit transfer on the command and data lines is done. The
frequency may vary between zero and the maximum clock frequency. The MultiMediaCard bus master
is free to generate these cycles without restrictions in the range of 0 to 20 MHz.
• CMD: is a bidirectional command channel used for card initialization and data transfer commands.
The CMD signal has two operation modes: open drain for initialization mode and push pull for fast
command transfer. Commands are sent from the MultiMediaCard bus master to the MultiMediaCard
and responses vice versa.
• DAT: is a bidirectional data channel with a width of one line. The DAT signal of the MultiMediaCard
operates in push pull mode.
• RSV: is pulled up with resistor (2 MΩ typ) in the MultiMediaCard. The external pull-up resistor
should be recommended if the system requires.
CMD
DAT
CLK
1234567
MultiMediaCard Host
MultiMediaCard
All MultiMediaCards are connected directly to the lines of the MultiMediaCard bus. The following table
defines the card contacts.
DAT
7
enable
CLK
5
VSS1
3
CMD
2
OD/PP
RSV enable
1
Interface driver
SPI Mode
The Serial Peripheral Interface (SPI) is a general-purpose synchronous serial interface originally found on
certain Motorola microcontrollers. The MultiMediaCard SPI interface is compatible with SPI hosts
The MultiMediaCard card identification and addressing methods are replaced by a hardware Chip Select
(CS) signal. There are no broadcast commands. For every command, a card (slave) is selected by
asserting (active low) the CS signal (refer to Figure “SPI Bus System”). The CS signal must be
continuously active for the duration of the SPI transaction (command, response and data). The only
exception occurs during card programming, when the host can de-assert the CS signal without affecting the
programming process. The bidirectional CMD and DAT lines are replaced by unidirectional data in and
data out signals. This eliminates the ability of executing commands while data is being read or written and,
therefore, makes the sequential and multi block read/write operations obsolete. The single and multiple
block read/write commands are supported by the SPI channel. The SPI interface uses the same seven
signals of the standard MultiMediaCard bus (refer to Table “SPI Interface Pin Configuration”).
CS
Power
SPI bus master
supply CS
MuitiMediaCard SPI
1
Pin No. Name Type* Description Name Type Description
1 RSV NC Reserved for future use CS I Chip select (neg true)
2 CMD I/O/PP/OD Command/Response DI I Data in
3 VSS1 S Ground VSS S Ground
4 VCC S Power supply VCC S Power supply
5 CLK I Clock SCLK I Clock
6 VSS2 S Ground VSS2 S Ground
7 DAT I/O/PP Data DO O/PP Data out
Note: 1. S: power supply; I: input; O: output; PP: push-pull; OD: open-drain; NC: No connection or VIH
Registers
These Hitachi MultiMediaCards contain the following information registers:
The CID and RCA are used for identifying and addressing the MultiMediaCard. The CSD contains the
card specific data record. This record is a set of information fields to define the operation conditions of the
MultiMediaCard.
For the user, the CID is read only register. The CSD contains read only area and some of one time or
multiple programmable area by the customer or provider. They are read out by special commands (refer to
Chapter “Commands”). The RCA registers are write only registers. Unlike CID and CSD, RCA looses its
contents after powering down the card. Its value is reassigned in each initialization cycle. The
MultiMediaCard registers usage in SPI mode is summarized in Table “MultiMediaCard Registers in SPI
Mode”:
This register indicates supported voltage range of these Hitachi MultiMediaCards. It is a 32 bit wide
register and for read only.
OCR Fields
This register contains the card identification information used during the card identification procedure. It
is a 128 bit wide register, one-time programmable by the provider. It was programmed at the manufacture.
The CID is divided into eight slices:
CID Fields
The CID has to be error free. To ensure the correctness of the CID, a 7-bit CRC checksum is added to the
end of the CID. The CRC7 is computed according to chapter “Cyclic Redundancy Check (CRC)”.
The 16-bit relative card address register carries the card address assigned by the host during the card
identification. This address is used for the addressed host to card communication after the card
identification procedure. The default value of the RCA register is 0x0001. The value 0x0000 is reserved
to set all cards in Standby State with the command SELECT_DESELECT_CARD (CMD7). The RCA is
programmed with the command SET_RELATIVE_ADDRESS (CMD3) during the initialization procedure.
The content of this register is lost after power down. The default value is assigned when an internal reset is
applied by the power up detection unit of these Hitachi MultiMediaCards, or when the command
GO_IDLE_STATE (CMD0) is detected by these Hitachi MultiMediaCards.
The card specific data register describes how to access the card content. The CSD defines card operating
parameters like maximum data access time, data transfer speed.
Some of the CSD fields are one-time or multiple programmable by the customer or provider. All other
field values are fixed. The following section describes the CSD fields and their values for these Hitachi
MultiMediaCards:
• CSD_STRUCTURE
The CSD version of these Hitachi MultiMediaCards is related to the “MultiMediaCard system
specification, Version 3.1”. The parameter CSD_STRUCTURE has permanently the value “10”.
SPEC Version
The Spec version of these Hitachi MultiMediaCards is related to the “MultiMediaCard system
specification, Version 3.1”. The parameter SPEC_VERS has permanently the value “0011”.
• TAAC
Defines the asynchronous data access time:
The value for the asynchronous delay for these Hitachi MultiMediaCards is 1 ms. The coded TAAC value
is 0x0E (= 1 ms). For more details refer to Chapter “Operating Characteristics”.
• NSAC
Defines the worst case for the synchronous data access time. The unit for NSAC is 100-clock cycles.
Therefore, maximum value for the data access time is 25.6k clock cycles. The total access time NAC as
expressed in the Table “Timing Values” is the sum of both TAAC and NSAC. It has to be computed by
the host for the actual clock rate. The read access time should be interpreted as a typical delay for the first
data bit of a data block or stream. The value of NSAC for these Hitachi MultiMediaCards is 0x01 (100-
clock cycles). For more details refer to Chapter “Operating Characteristics”.
These Hitachi MultiMediaCards support a transfer rate between 0 and 20 Mbit/s. The parameter
TRAN_SPEED is 0x2A.
• CCC
The MultiMediaCard command set is divided into subsets (command classes). The card command class
register CCC defines which command classes are supported by this card. A set CCC bit means that the
corresponding command class is supported. For command class definition refer to Table “Command
Classes”.
These Hitachi MultiMediaCards support the command classes 0, 1, 2, 3, 4, 5, 6 and 7. The parameter CCC
is permanently assigned to the value 0x0FF.
The block length might therefore be in the range 1, 2, 4...2048 bytes. This parameter defines the block
length if READ_BLK_PARTIAL is not set. If READ_BLK_PARTIAL is set this parameter contains the
maximum allowed value of the block length in bytes. All block lengths between one and this value are
permitted. The actual block size is programmed by the command SET_BLOCKLEN (CMD16). These
Hitachi MultiMediaCards support block lengths from 1 byte up to 2048 bytes. The default value of the
parameter READ_BLK_LEN is 0x9 (512 bytes).
• READ_BLK_PARTIAL
READ_BLK_PARTIAL defines whether partial block sizes can be used in block read command.
READ_BLK_PARTIAL = 0 means that only the block size defined by READ_BLK_LEN can be used for
block-oriented data transfers. READ_BLK_PARTIAL = 1 means that smaller blocks can be used as well.
The minimum block size will be equal to minimum addressable unit (one byte). These Hitachi
MultiMediaCards support partial block read. The parameter READ_BLK_PARTIAL is permanently
assigned to the value ‘1’.
• WRITE_BLK_MISALIGN
Defines if the data block to be written by one command can be spread over more than one physical blocks
of the memory device. The size of the memory block is defined in WRITE_BLK_LEN.
WRITE_BLK_MISALIGN is permanently assigned to the value ‘0’, signaling that crossing physical block
boundaries is not allowed.
• READ_BLK_MISALIGN
Defines if the data block to be read by one command can be spread over more than one physical block of
the memory device. The size of the data block is defined in READ_BLK_LEN.
READ_BLK_MISALIGN = 0 signals that crossing physical block boundaries is not allowed.
READ_BLK_MISALIGN = 1 signals that crossing physical block boundaries is allowed. These Hitachi
MultiMediaCards do not support read block operations with boundary crossing. The parameter
READ_BLK_MISALIGN is permanently assigned to the value ‘0’.
DSR Implementation
These Hitachi MultiMediaCards' output drivers are not configurable. The parameter DSR_IMP is
permanently assigned to the value ‘0’.
• C_SIZE
This parameter is used to compute the card capacity. The card capacity is computed from the entries
C_SIZE, C_SIZE_MULT and READ_BLK_LEN as follows:
Where
BLOCKNR = (C_SIZE+1)*MULT
(C_SIZE_MULT < 8)
C_SIZE_MULT+2
MULT = 2
The following table shows the card capacity for each model.
VDD_R_CURR_MIN
VDD_W_CURR_MIN Code for current consumption at 2.7 V
2:0 0 = 0.5 mA; 1 = 1 mA; 2 = 5 mA; 3 = 10 mA; 4 = 25 mA; 5 = 35 mA; 6
= 60 mA; 7 = 100 mA
The parameter VDD_R_CURR_MIN and VDD_W_CURR_MIN are permanently assigned. The value of
VDD_R_CURR_MIN and VDD_W_CURR_MIN for each model is following:
Model Value
HB28H016MM2 6 (60 mA)
HB28D032MM2 6 (60 mA)
HB28B064MM2 6 (60 mA)
HB28B128MM2 6 (60 mA)
• VDD_R_CURR_MAX, VDD_W_CURR_MAX
The maximum supply current at the maximum supply voltage VCC (3.6 V) is coded as follows:
VDD_R_CURR_MAX
VDD_W_CURR_MAX Code for current consumption at 3.6 V
2:0 0 = 1 mA; 1 = 5 mA; 2 = 10 mA; 3 = 25 mA; 4 = 35 mA; 5 = 45 mA; 6 =
80 mA; 7 = 200 mA
The parameter VDD_R_CURR_MAX and VDD_W_CURR_MAX are permanently assigned. The value
of VDD_R_CURR_MAX and VDD_W_CURR_MAX for each model is following:
Model Value
HB28H016MM2 6 (80 mA)
HB28D032MM2 6 (80 mA)
HB28B064MM2 6 (80 mA)
HB28B128MM2 6 (80 mA)
• ERASE_GRP_SIZE
The contents of this register is a 5 bit binary coded value, used to calculate the size of the erasable unit of
these Hitachi MultiMediaCards. The size of the erase unit (also referred to as erase group in chapter
“Memory Array Partitioning”) is determined by the ERASE_GRP_SIZE and the ERASE_GRP_MULT
entries of the CSD, using the following equation:
The parameter ERASE_GRP_SIZE is permanently assigned to the value ‘0’. The size of erasable unit for
these Hitachi MultiMediaCards is (0+1) * (15+1) = 16, which means that the 8 kByte area can be erased in
a single erase group command (CMD35 to CMD38).
• ERASE_GRP_MULT
A 5 bit binary coded value is used for calculating the size of the erasable unit of these Hitachi
MultiMediaCards. The parameter ERASE_GRP_MULT is permanently assigned to the value 0x0F. See
ERASE_GRP_SIZE section for detailed description.
• WP_GRP_SIZE
The size of a write protection group. The content of this register is a binary coded value defining the
number of erase group. This parameter's value is 1, which means that a write protect group size is 16
kByte.
• WP_GRP_ENABLE
The value is set to ‘1’, meaning group write protection is enabled.
• R2W_FACTOR
Defines the typical block program time as a multiple of the read access time. The following table defines
the field format.
R2W_FACTOR
• WRITE_BLK_LEN
WRITE_BLK_LEN
The data block length is computed as 2 .
The block length might therefore be in the range 1, 2, 4...2048 bytes. This parameter defines the block
length if WRITE_BLK_PARTIAL is not set. If WRITE_BLK_PARTIAL is set this parameter contains the
maximum allowed value of the block length in bytes. All block lengths between one and this value are
permitted. The actual block size is programmed by the command SET_BLOCKLEN (CMD16). These
Hitachi MultiMediaCards support blocks with the length 512 bytes. The parameter WRITE_BLK_LEN is
permanently assigned to the value 0x9 (512 bytes).
• FILE_FORMAT_GRP
Indicates the selected group of file formats. The default value is ‘0’. This field is read-only for ROM. The
usage of this field is shown in table “File_Formats”.
• COPY
Defines if the contents are an original (COPY = ‘0’) or a copy (= ‘1’). The COPY bit is a one time
programmable bit, being set by the customer. The default value is ‘0’.
• PERM_WRITE_PROTECT
Permanently protects the whole card content against overwriting or erasing (all write and erase commands
for this card is a permanently disabled). This parameter is one-time programmable by the customer. The
default value is ‘0’ (not protected).
• TMP_WRITE_PROTECT
Temporarily protects the whole card content from being overwritten or erased (all write and erase
commands for this card are temporarily disabled). This parameter is programmable by the customer. The
default value is ‘0’ (not protected).
• FILE_FORMAT
Indicates the file format on the card. The default value is ‘0’. This field is read-only for ROM. The
following formats are defined:
File_Formats
ECC
The content provider or customer defines which kind of error correction may be used to protect the
contents of the MultiMediaCard. This value is programmable.
• CRC7
The CRC7 contains the check sum for the CSD content. The check sum is computed according to chapter
“Cyclic Redundancy Check (CRC)”.
The user has to recalculate a new CRC7 after defining a new CSD.
MultiMediaCard Communication
All communication between host and cards is controlled by the host (master). The host sends commands
and, depending on the command, receives a corresponding response from the selected card. In this chapter
the commands to control these Hitachi MultiMediaCards, the card responses and the contents of the status
and error field included in the responses, are defined.
The basic unit of data transfer to/from the MultiMediaCard is one byte. All data transfer operations which
require a block size always define block lengths as integer multiples of bytes. Some special functions need
other partition granularity. For block-oriented commands, the following definition is used:
• Block: is the unit which is related to the block-oriented read and write commands. Its size is the
number of bytes which will be transferred when one block command is sent by the host. The size of a
block is either programmable or fixed. The information about allowed block sizes and the
programmability is stored in the CSD.
For devices which have erasable memory cells, special erase commands are defined. The granularity of the
erasable units is:
• Sector: is the unit which is related to the tagged sector commands (CMD32 to CMD34). In these
Hitachi MultiMediaCards, this size is same as the WRITE_BLK_LEN in CSD.
• Erase Group: is the smallest number of consecutive write blocks, which can be addressed for erased.
The size of the Erase Group is card specific and stored in the CSD.
• WP-Group: is the minimal unit which may have individual write protection. Its size is the number of
erase groups which will be write protected by one bit. The size of a WP-group is fixed for each device.
The information about the size is stored in the CSD.
Each erasable unit (erase group and sector) has a special “tag” bit. This bit may be set or cleared by special
commands to tag the unit. All tagged units will be erased in parallel by one erase command following a
number of tag commands. All tag bits are cleared by each command except a tag or untag command.
Therefore, immediately after a sequence of tag commands an erase command has to be sent by the host.
Commands others than tagging or erasing abort a tag-erase cycle irregularly.
MultiMediaCard
ERASE
GROUP 0
Block 0 Block 1 Block 2 Block 3 Block n
Sector 0.0
Sector tagging
Sector 0.1
Group tagging
Sector 0.2
Sector 0.3
Sector 0.n
ERASE
GROUP 1
ERASE
GROUP n
Each WP-group may have an additional write protection bit. The write protection bits are programmable
via special commands (refer to Chapter “Commands”). The information about the availability is stored in
the CSD.
Group write protection
WP-GROUP 0
WP-GROUP 1
WP-GROUP n
Write Protection
Commands
The command set of the MultiMediaCard system is divided into classes corresponding to the type of card
(see also [1]). These Hitachi MultiMediaCards support the following command classes:
Supported commands
Card command 0 1 2 3 4 7 9 10 11 12 13 15 16 17 18
class (CCC) Class description
Class 0 basic + + + + + + + + + + +
Class 1 stream read +
Class 2 block read + + +
Supported commands
Card command 20 23 24 25 26 27 28 29 30 32 33 34 35 36 37 38 42
class (CCC) Class description
Class 2 block read +
Class 3 stream write +
Class 4 block write + + + + +
Class 5 erase + + + + + + +
Class 6 write protection + + +
Class 7 lock card +
Class 0 is mandatory and supported by all cards. It represents the card identification and initialization
commands, which are intended to handle different cards and card types on the same bus lines. The Card
Command Class (CCC) is coded in the card specific data register of each card, so that the host knows how
to access the card. There are four kinds of commands defined on the MultiMediaCard bus:
The start bit is always ‘0’ in command frames (sent from host to MultiMediaCard). The host bit is always
‘1’ for commands. The command field contains the binary coded command number. The argument
depends on the command (refer to Table “Basic Commands (class 0) and Table “Block-Oriented Read
Commands (class 2)”). The CRC field is defined in Chapter “Cyclic Redundancy Check (CRC)”.
Read
The read access time is defined as the sum of the two times given by the CSD parameters TAAC and
NSAC (refer to Table “Card Specific Data (CSD)”). These card parameters define the typical delay
between the end bit of the read command and the start bit of the data block. This number is card dependent
and should be used by the host to calculate throughput and the maximal frequency for stream read.
Write
The R2W_FACTOR field in the CSD is used to calculate the typical block program time obtained by
multiplying the read access time by this factor. It applies to all write/erase commands (e.g.
SET(CLEAR)_WRITE_PROTECT, PROGRAM_CSD(CID) and the block write commands). It should be
used by the host to calculate throughput and the maximal frequency for stream write.
Erase
The duration of an erase command will be (order of magnitude) the number of sectors to be erased
multiplied by the block write delay.
CMD
index Type Argument Resp Abbreviation Command description
CMD0 bc [31:0] stuff bits — GO_IDLE_STATE resets all cards to Idle State
CMD1 bcr [31:0] OCR R3 SEND_OP_COND checks for cards not supporting the full
without busy range of 2.0 V to 3.6 V. After receiving
CMD1 the card sends an R3 response
(refer to Chapter “Responses”).
CMD2 bcr [31:0] stuff bits R2 ALL_SEND_CID asks all cards in ready state to send
1
their CID* numbers on CMD-line
CMD3 ac [31:16] RCA R1 SET_RELATIVE_A assigns relative address to the card in
[15:0] stuff bits DDR identification state.
CMD4 bc [31:16] DSR — SET_DSR programs the DSR of all cards in
[15:0] stuff bits stand-by state.
CMD7 ac [31:16] RCA R1b (only SELECT/ command toggles a card between the
[15:0] stuff bits the DESELECT_CARD standby and transfer states or between
selected the programming and disconnect state.
card) In both cases the card is selected by
its own relative address while
deselecting the prior selected card.
Address 0 deselects all.
CMD9 ac [31:16] RCA R2 SEND_CSD asks the addressed card to send its
2
[15:0] stuff bits card-specific data (CSD)* on CMD-
line.
CMD10 ac [31:16] RCA R2 SEND_CID asks the addressed card to send its
[15:0] stuff bits card identification (CID) on CMD- line.
CMD11 adtc [31:0] data R1 READ_DAT_UNTIL reads data stream from the card,
address _STOP starting at the given address, until a
STOP_TRANSMISSION follows.
3
CMD12 ac [31:0] stuff bits R1b* STOP_TRANSMISS forces the card to stop transmission
ION
CMD13 ac [31:16] RCA R1 SEND_STATUS Asks the addressed card to send its
[15:0] stuff bits status register.
CMD15 ac [31:16] RCA — GO_INACTIVE_ST Sets the card to inactive state in order
[15:0] stuff bits ATE to protect the card stack against
communications breakdowns.
Notes: 1. CID register consists of 128 bits (starting with MSB, it is preceded by an additional start bit, ends
with an end bit)
2. CSD register consists of 128 bits (starting with MSB, it is preceded by an additional start bit,
ends with an end bit)
3. This command is indicating the busy status of the MultiMediaCard via the data channel.
CMD
index Type Argument Resp Abbreviation Command description
CMD16 ac [31:0] block R1 SET_BLOCKLEN Selects a block length (in bytes) for all
length following block-oriented read
1
commands and lock card command.*
CMD17 adtc [31:0] data R1 READ_SINGLE_BL Reads a block of the size selected by
2
address OCK the SET_BLOCKLEN command.*
CMD18 adtc [31:0] data R1 READ_MULTIPLE_ Continuously send blocks of data until
address BLOCK interrupted by a stop.
Notes: 1. The default block length is as specified in the CSD. These Hitachi MultiMediaCards do not
support partial block write, so the write block size defined by WRITE_BLK_LEN is parmanently
assigned to the value 512 bytes.
2. The data transferred must not cross a physical block boundary unless READ_BLK_MISALIGN is
set in the CSD. These Hitachi MultiMediaCards do not support read block operations with
boundary crossing (READ_BLK_MISALIGN = ‘0’), so the data transferred must not cross a
physical block boundary.
CMD
index Type Argument Resp Abbreviation Command description
CMD20 adtc [31:0] data R1 WRITE_DAT_ Writes data stream from the host,
address UNTIL_STOP starting at the given address, until a
STOP_TRANSMISSION follows.
CMD
index Type Argument Resp Abbreviation Command description
CMD23 ac [31:16] set to 0 R1 SET_BLOCK_COU Defines the number of blocks which
[15:0] number of NT are going to be transferred in the
blocks immediately succeeding multiple block
read or write command.
CMD
index Type Argument Resp Abbreviation Command description
CMD24 adtc [31:0] data R1 WRITE_BLOCK Write a block. The write-block-length
address of the Hitachi MultiMediaCard is
permanently assigned to the value 512
1
bytes.*
CMD25 adtc [31:0] data R1 WRITE_MULTIPLE Continuously writes blocks of data until
address _ BLOCK a STOP_TRANSMISSION follows.
CMD26 adtc [31:0] stuff bits R1 PROGRAM_CID Programming of the card identification
register. This command is only done
once per MultiMediaCard card. The
card has some hardware to prevent
this operation after the first
programming. Normally this command
is reserved for the manufacturer. The
CID register is programmed at the
manufacture.
CMD27 adtc [31:0] stuff bits R1 PROGRAM_CSD Programming of the programmable bits
of the CSD.
Note: 1. The data transferred must not cross a physical block boundary unless WRITE_BLK_MISALIGN
is set in the CSD. These Hitachi MultiMediaCards do not support write block operations with
bondary crossing (WRITE_BLK_MISALIGN = ‘0’), so the data transferred must not cross a
physical block boundary.
CMD
index Type Argument Resp Abbreviation Command description
CMD32 ac [31:0] data R1 TAG_SECTOR_ST Sets the address of the first sector of
1
address ART the erase group.*
CMD33 ac [31:0] data R1 TAG_SECTOR_EN Sets the address of the last sector in a
address D continuous range within the selected
erase group to be selected for erase,
or the address of a single sector to be
1
selected.*
CMD34 ac [31:0] data R1 UNTAG_SECTOR Removes one previously selected
address sector from the erase selection.*1
CMD35 ac [31:0] data R1 TAG_ERASE_GRO Sets the address of the first erase
address UP_START group within a range to be selected for
erase
CMD36 ac [31:0] data R1 TAG_ERASE_GRO Sets the address of the last erase
address UP_END group within a continuous range to be
selected for erase
CMD37 ac [31:0] data R1 UNTAG_ERASE_G Removes one previously selected
1
address ROUP erase group from the erase selection*
CMD38 ac [31:0] stuff bits R1b ERASE Erases all previously selected sectors
Note: 1. “MultiMediaCard system specification Version 3.1” does not support these commands, but these
Hitachi MultiMediaCards support them to keep backward compatibility with former
MultiMediaCard series.
CMD
index Type Argument Resp Abbreviation Command description
CMD28 ac [31:0] data R1b SET_WRITE_PROT if the card has write protection
address features, this command sets the write
protection bit of the addressed group.
The properties of write protection are
coded in the card specific data
(WP_GRP_SIZE).
CMD29 ac [31:0] data R1b CLR_WRITE_PROT if the card provides write protection
address features, this command clears the
write protection bit of the addressed
group.
CMD30 adtc [31:0] write R1 SEND_WRITE_PR if the card provides write protection
protect data OT features, this command asks the card
address to send the status of the write
1
protection bits.*
Note: 1. 32 write protection bits (representing 32 write protect groups starting at the specified address)
followed by 16 CRC bits are transferred in a payload format via the data line. The last (least
significant) bit of the protection bits corresponds to the first addressed group. If the addresses
of the last groups are outside the valid range, then the corresponding write protection bits shall
be set to zero.
CMD
index Type Argument Resp Abbreviation Command description
CMD42 adtc [31:0] stuff bits R1b LOCK_UNLOCK used to set/reset the password or
lock/unlock the card. The size of the
data block is set by the
SET_BLOCK_LEN command.
All the data communication in the card identification mode uses only the command line (CMD).
Power on
CMD2
Identification state
(ident)
The host starts the card identification process in open drain mode with the identification clock rate fOD
(generated by a push pull driver stage). The open drain driver stages on the CMD line allow the parallel
card operation during card identification. After the bus is activated the host will request the cards to send
their valid operation conditions with the command SEND_OP_COND (CMD1). Since the bus is in open
drain mode, as long as there is more than one card with operating conditions restrictions, the host gets in
the response to the CMD1 a “wired or” operation condition restrictions of those cards. The host then must
pick a common denominator for operation and notify the application that cards with out of range
parameters (from the host perspective) are connected to the bus. Incompatible cards go into Inactive State
(refer to also Chapter “Operating Voltage Range Validation”). The busy bit in the CMD1 response can be
used by a card to tell the host that it is still working on its power-up/reset procedure (e.g. downloading the
register information from memory field) and is not ready yet for communication. In this case the host must
repeat CMD1 until the busy bit is cleared. After an operating mode is established, the host asks all cards
for their unique card identification (CID) number with the broadcast command ALL_SEND_CID (CMD2).
All not already identified cards (i.e. those which are in Ready State) simultaneously start sending their CID
numbers serially, while bit-wise monitoring their outgoing bitstream. Those cards, whose outgoing CID
bits do not match the corresponding bits on the command line in any one of the bit periods, stop sending
The MultiMediaCard standards operating range validation is intended to support reduced voltage range
MultiMediaCards. These Hitachi MultiMediaCards support the range of 2.7 V to 3.6V supply voltage. So
these Hitachi MultiMediaCards send a R3 response to CMD1 which contains an OCR value of
0x80FF8000 if the busy flag is set to “ready” or 0x00FF8000 if the busy flag is active (refer to Chapter
“Responses”). By omitting the voltage range in the command, the host can query the card stack and
determine the common voltage range before sending out-of-range cards into the Inactive State. This bus
query should be used if the host is able to select a common voltage range or if a notification to the
application of non usable cards in the stack is desired. Afterwards, the host must choose a voltage for
operation and reissue CMD1 with this condition, sending incompatible cards into the Inactive State.
When in Standby State, both CMD and DAT lines are in the push-pull mode. As long as the content of all
CSD registers is not known, the fPP clock rate is equal to the slow fOD clock rate. SEND_CSD (CMD9)
allows the host to get the Card Specific Data (CSD register), e.g. ECC type, block length, card storage
capacity, maximum clock rate etc..
CMD9, 10
CMD20, 24, 25, 26, 27, 42
''operation
''operation complete''
complete''
CMD7 CMD12 or
Disconnect state Programming state
(dis) (prg) ''transfer end''
CMD7
The command SELECT_DESELECT_CARD (CMD7) is used to select one card and place it in the
Transfer State. If a previously selected card is in the Transfer State its connection with the host is released
and it will move back to the Stand-by State. Only one card can be, at any time, in the Transfer State. A
selected card is responding the CMD7, the deselected one does not respond to this command. When
CMD7 is sent including the reserved relative card address 0x0000, all cards transfer back to Stand-by State.
This command is used to identify new cards without resetting other already acquired cards. Cards to which
an RCA has already been assigned, do not respond to the identification command flow in this state. All the
data communication in the Data Transfer Mode is consequently a point-to point communication between
the host and the selected card (using addressed commands). All addressed commands are acknowledged
by a response on the CMD line. All read commands (data is sent from the card via data lines) can be
interrupted at any time, by a stop command. The data transfer will terminate and the card will stop or start
working on the next command. The DAT bus line signal level is high when no data is transmitted. 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
• Stream read
There is a stream oriented data transfer controlled by READ_DAT_UNTIL_STOP (CMD11). This
command instructs the card to send its payload, starting at a specified address, until the host sends a
STOP_TRANSMISSION command (CMD12). The stop command has an execution delay due to the serial
command transmission. The data transfer stops after the end bit of the stop command. If the end of the
memory range is reached while sending data and no stop command has been sent yet by the host, the
contents of the further transferred payload is undefined. The maximum clock frequency for stream read
operation is given by the following formula:
READ_BL_LEN
max. speed = min (TRAN_SPEED, (8*2 -NSAC)/TAAC),
these parameters being defined in Chapter “Registers”. If the host attempts to use a higher frequency, the
card may not be able to sustain data transfer. If this happens, the card will set the UNDERRUN error bit in
the status register, abort the transmission and wait in the data state for a stop command.
• Block read
The basic unit of data transfer is a block whose maximum size is defined in the CSD (READ_BLK_LEN).
READ_BLK_PARTIAL is set, thus smaller blocks whose starting and ending address are wholly contained
within one physical block (as defined by READ_BLK_LEN) may also be transmitted. A 16-bit CRC is
appended to the end of each block ensuring data transfer integrity. READ_SINGLE_BLOCK (CMD17)
starts a block read and after a complete transfer the card goes back to Transfer State.
If the card detects an error (e.g. out of range, address misalignment, internal error, etc.) during a multiple
block read operation (both types) it will stop data transmission and remain in the Data State. The host must
If the host sends a stop transmission command after the card transmits the last block of a multiple block
operation with a pre-defined number of blocks, it will be responded to as an illegal command, since the
card is no longer in data state.
If the host uses partial blocks whose accumulated length is not block aligned and block misalignment is not
allowed, the card shall detect a block misalignment error condition at the beginning of the first misaligned
block (ADDRESS_ERROR error bit will be set in the status register).
• Stream write
Stream write (CMD20) starts the data transfer from the host to the card beginning from the starting address
until the host issues a stop command. If partial blocks are allowed (if CSD parameter
WRITE_BL_PARTIAL is set) the data stream can start and stop at any address within the card address
space, otherwise it shall start and stop only at block boundaries. Since the amount of data to be transferred
is not determined in advance, CRC can not be used. If the end of the memory range is reached while
sending data and no stop command has been sent by the host, all further transferred data is discarded. The
maximum clock frequency for stream write operation is given by the following formula:
WRITE_BL_LEN
max. speed = min ( TRAN_SPEED, (8*2 -NSAC)/(TAAC*R2W_FACTOR)),
9
= min (20, (8*2 – 100 [cycles])/1000 [µs]*4)[MHz] = min (20, 0.999) 0.999 [MHz]
these parameters being defined in Chapter “Registers”. If the host attempts to use a higher frequency, the
card may not be able to process the data and will stop programming, set the OVERRUN 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 shall also be aborted if the host tries to write over a write-protected area.
In this case, however, the card shall set the WP_VIOLATION bit.
• Block write
Block write (CMD24 - 27) means that one or more blocks of data are transferred from the host to the card
with a 16-bit CRC appended to the end of each block by the host. A card supporting block write must
always be able to accept a block of data defined by WRITE_BLK_LEN. If the CRC fails, the card will
indicate the failure on the DAT line; the transferred data will be discarded and not written and all further
transmitted blocks (in multiple block write mode) will be ignored.
If the card detects an error (e.g. write protect violation, out of range, address misalignment, internal error,
etc.) during a multiple block write operation (both types) it will ignore any further incoming data blocks
and remain in the Receive State. The host must than abort the operation by sending the stop transmission
command. The write error is reported in the response to the stop transmission command.
If the host sends a stop transmission command after the card received the last block of a multiple block
write with a pre-defined number of blocks, it will be responded to as an illegal command, since the card is
no longer in rcv state.
If the host uses partial blocks whose accumulated length is not block aligned and block misalignment is not
allowed (CSD parameter WRITE_BLK_MISALIGN is not set), the card will detect the block misalignment
error and abort programming before the beginning of the first misaligned block. The card will set the
ADDRESS_ERROR error bit in the status register, and wait (in the Receive-data-State) for a stop
command while ignoring all further data transfer. 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 CID and CSD register does not require a previous block length setting. The
transferred data is also CRC protected.
• Erase
It is desirable to erase as many sectors at a time as possible 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 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). The
following exception conditions are detected by the card: An erase or tag/untag command is received out of
sequence. The card will set the ERASE_SEQUENCE 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 LSB’s below the group
or sector size. The number of untags commands (CMD34 and CMD37) which are used in a sequence is
• ERASE: 1 Defines Forced Erase Operation (all other bits shall be ‘0’) and only the cmd byte is
sent.
• LOCK/UNLOCK: 1 = Locks the card. 0 = Unlock the card (note that it is valid to set this bit
together with SET_PWD but it is not allowed to set it together with CLR_PWD).
• CLR_PWD: 1 = Clears PWD.
The data block size shall be defined by the host before it sends the card lock/unlock command. This will
allow different password sizes. The following paragraphs define the various lock/unlock command
sequences:
Note that the password length register (PWD_LEN) indicates if a password is currently set. When it equals
‘0’ there is no password set. If the value of PWD_LEN is not equal to zero the card will lock itself after
power up. It is possible to lock the card immediately in the current power session by set-ting the
LOCK/UNLOCK bit (while setting the password) or sending additional command for card lock.
If the PWD content equals to the sent password then the card will be locked and the card-locked status bit
will be set in the status register. If the password is not correct then LOCK_UNLOCK_FAILED error bit
will be set in the status register. Note that it is possible to set the password and to lock the card in the same
sequence. In such case the host shall perform all the required steps for setting the password (as described
above) including the bit LOCK set while the new password command is sent. If the password was
previously set (PWD_LEN is not ‘0’), then the card will be locked automatically after power on reset. An
attempt to lock a locked card or to lock a card that does not have a password will fail and the
LOCK_UNLOCK_FAILED error bit will be set in the status register.
If the PWD content equals to the sent password then the card will be unlocked and the card-locked status
bit will be cleared in the status register. If the password is not correct then the LOCK_UNLOCK_FAILED
error bit will be set in the status register. Note that the unlocking is done only for the current power
session. As long as the PWD is not cleared the card will be locked automatically on the next power up.
The only way to unlock the card is by clearing the password. An attempt to unlock an unlocked card will
fail and LOCK_UNLOCK_FAILED error bit will be set in the status register.
• Forcing Erase:
In case that the user forgot the password (the PWD content) it is possible to erase all the card data content
along with the PWD content. This operation is called Forced Erase.
If the ERASE bit is not the only bit in the data field then the LOCK_UNLOCK_FAILED error bit will be
set in the status register and the erase request is rejected. If the command was accepted then ALL THE
CARD CONTENT WILL BE ERASED including the PWD and PWD_LEN register content and the
locked card will get unlocked. An attempt to force erase on an unlocked card will fail and
LOCK_UNLOCK_FAILED error bit will be set in the status register.
Current state
Command idle ready ident stby tran data rcv prg dis ina
1
CRC fail —* — — — — — — — — —
Commands out of the — — — — — — — — — —
supported class(es)
Class0 CMD0 idle idle idle idle idle idle idle idle idle —
CMD1, card VCC ready — — — — — — — — —
range compatible
CMD1, card is idle — — — — — — — — —
busy
CMD1, card VCC ina — — — — — — — — —
range not
compatible
CMD2, card wins — ident — — — — — — — —
bus
CMD2, card loses — ready — — — — — — — —
bus
CMD3 — — stby — — — — — — —
CMD4 — — — stby — — — — — —
CMD7, card is — — — tran — — — — prg —
addressed
CMD7, card is not — — — — stby stby — dis — —
addressed
CMD9 — — — stby — — — — — —
CMD10 — — — stby — — — — — —
CMD12 — — — — — tran prg — — —
CMD13 — — — stby tran data rcv prg dis —
CMD15 — — — ina ina ina ina ina ina —
Class1 CMD11 — — — — data — — — — —
Class2 CMD16 — — — — tran — — — — —
CMD17 — — — — data — — — — —
CMD18 — — — — data — — — — —
CMD 23 — — — — tran — — — — —
Class3 CMD20 — — — — rcv — — — — —
Responses
All responses are sent via command line (CMD), all data starts with the MSB.
R1b is identical to R1 with an optional busy signal transmitted on the data line. The card may become
busy after receiving these commands based on its state prior to the command reception.
Note: Bit 127 down to bit 1 of CID and CSD are transferred, the reserved bit [0] is replaced by the end bit.
0 0 bit5...bit0 bit127...bit1 1
start bit card reserved CID or CSD register end bit
including internal CRC
The OCR is sent as a response to the CMD1 to signalize the supported voltage range. These Hitachi
MultiMediaCards support the range from 2.7 V to 3.6 V. Respectively the value of all bits of the OCR
field of these Hitachi MultiMediaCards is set to 0x80FF8000. So the R3 frame contains the value
0x3F80FF8000FF if the card is ready and 0x3F00FF8000FF if the card is busy.
Status
The response format R1 contains a 32-bit field with the name card status. This field is intended to transmit
status information which is stored in a local status register of each card to the host. The following table
defines the status register structure. The Type and Clear-Condition fields in the table are coded as follows:
• Type:
• E: Error bit.
• S: Status bit.
• R: Detected and set for the actual command response.
• X: Detected and set during command execution. The host must poll the card by sending status
command in order to read these bits.
• Clear Condition:
• A: According to the card state.
• B: Always related to the previous command. Reception of a valid command will clear it (with a
delay of one command).
• C: Clear by read.
S: Start bit (= 0)
P: One-cycle pull-up (= 1)
E: End bit (= 1)
D: Data bits
*: repeater
CRC: Cyclic redundancy check bits (7 bits for command or response, 16 bits for block data)
The difference between the P-bit and Z-bit is that a P-bit is actively driven to HIGH by the card
respectively host output driver, while the Z-bit is driven to (respectively kept) HIGH by the pull-up
resistors RCMD respectively RDAT. Actively driven P-bits are less sensitive to noise superposition. For the
timing of these Hitachi MultiMediaCards, the following values are defined:
Timing Values
There is just one Z bit period followed by P bits pushed up by the responding card. The following timing
diagram is relevant for all host commands followed by a response, except CMD1, CMD2 and CMD3:
In the case the CMDn command was a last identification command (no more response sent by a card), then
the next CMDn+1 command is allowed to follow after at least NCC +136 (the length of the R2 response) clock
periods.
NCR
Host command Card response
CMD S T content CRC E S T content CRC E
NWR
Host active Card active Write data
DAT Z Z Z **** Z Z Z Z Z Z Z Z Z **** Z Z Z Z Z P S content
Host active
CMD
If the card does not have any more free data receive buffer, the card indicates it by pulling down the data
line to LOW. The card stops pulling down the data line as soon as at least one receive buffer for the
defined data transfer block length becomes free. This signaling does not give any information about the
data write status. This information has to be polled by the status polling command (SEND_STATUS).
Reset
GO_IDLE_STATE (CMD0) is the software reset command, which sets the MultiMediaCard into the Idle
State independently of the current state. In the Inactive State the MultiMediaCard is not affected by this
command. After power-on the MultiMediaCard is always in the Idle State. After power-on or command
GO_IDLE_STATE (CMD0) all output bus drivers of the MultiMediaCard is in a high-impedance state and
the card will be initialized with a default relative card address (0x0001). The host runs the bus at the
identification clock rate fOD generated by a push-pull driver stage (refer to also Chapter “Power on” for
more details).
CMD0 is valid in all states with the exception of the Inactive State. While in Inactive state the card will not
accept CMD0 unless it is used to switch the card into SPI mode.
SPI Communication
The SPI mode consists of a secondary communication protocol. This mode is a subset of the
MultiMediaCard protocol, designed to communicate with a SPI channel, commonly found in Motorola’s
(and lately a few other vendors’) microcontrollers. The interface is selected during the first reset command
after power up (CMD0) and cannot be changed once the part is powered on. The SPI standard defines the
physical link only, and not the complete data transfer protocol. The MultiMediaCard SPI implementation
uses a subset of the MultiMediaCard protocol and command set. It is intended to be used by systems
which require a small number of card (typically one) and have lower data transfer rates (compared to
MultiMediaCard protocol based systems). From the application point of view, the advantage of the SPI
mode is the capability of using an off-the-shelf host, hence reducing the design-in effort to minimum. The
disadvantage is the loss of performance of the SPI system versus MultiMediaCard (lower data transfer rate,
fewer cards, hardware CS per card etc.). While the MultiMediaCard channel is based on command and
data bitstreams which are initiated by a start bit and terminated by a stop bit, the SPI channel is byte
oriented. Every command or data block is built of 8-bit bytes and is byte aligned to the CS signal (i.e. the
length is a multiple of 8 clock cycles). Similar to the MultiMediaCard protocol, the SPI messages consist
of command, response and data-block tokens (refer to Chapter “Commands” and Chapter “Responses” for
a detailed description). All communication between host and cards is controlled by the host (master). The
host starts every bus transaction by asserting the CS signal low. The response behavior in the SPI mode
differs from the MultiMediaCard mode in the following three aspects:
Single block and multiple read and write operations are supported in SPI mode. In addition to the
command response, every data block sent to the card during write operations will be responded with a
special data response token. A data block may be as big as one card sector and as small as a single byte.
Partial block read/write operations are enabled by card options specified in the CSD register.
Mode Selection
The MultiMediaCard wakes up in the MultiMediaCard mode. It will enter SPI mode if the reset command
(CMD0) is received during the CS signal is asserted (negative). Selecting SPI mode is not restricted to Idle
state (the state the card enters after power up) only. Every time the card receives CMD0, including while
in Inactive state, CS signal is sampled.
If the card recognizes that the MultiMediaCard mode is required it will not respond to the command and
remain in the MultiMediaCard mode. If SPI mode is required the card will switch to SPI and respond with
the SPI mode R1 response.
The only way to return to the MultiMediaCard mode is by entering the power cycle. In SPI mode the
MultiMediaCard protocol state machine is not observed. All the MultiMediaCard commands supported in
SPI mode are always available.
Every MultiMediaCard token transferred on the bus is protected by CRC bits. In SPI mode, the
MultiMediaCard offers a non-protected mode which enables systems built with reliable data links to
exclude the hardware or firmware required for implementing the CRC generation and verification
functions. In the non-protected mode the CRC bits of the command, response and data tokens are still
required in the tokens. However, they are defined as “don’t care” for the transmitter and ignored by the
receiver. The SPI interface is initialized in the non protected mode. However, the RESET command
(CMD0), which is used to switch the card to SPI mode, is received by the card while in MultiMediaCard
mode and, therefore, must have a valid CRC field.
The host can turn this option on and off using the CRC_ON_OFF command (CMD59).
The SPI mode supports single and multiple block read operations (CMD17 and CMD18 in the
MultiMediaCard protocol). The main difference between SPI and MultiMediaCard modes is that the data
and the response are both transmitted to the host on the DataOut signal (refer to Figure 43 and Figure 45).
Therefore the card response to the STOP_COMMAND may cut-short and replace the last data block (refer
to Figure “Read Operation”).
Data out response data block CRC data block CRC data B. response
The basic unit of data transfer is a block whose maximum size is defined in the CSD (READ_BL_LEN). If
READ_BL_PARTIAL is set, smaller blocks whose starting and ending addresses are entirely contained
within one physical block (as defined by READ_BL_LEN) may also be transmitted. A 16-bit CRC is
appended to the end of each block ensuring data transfer integrity (also refer to chapter “Cyclic
Redundancy Check (CRC)”). CMD17 (READ_SINGLE_BLOCK) initiates a single block read. CMD18
The host can abort reading at any time, within a multiple block operation, regardless of the its type.
Transaction abort is done by sending the stop transmission command.
In case of a data retrieval error, the card will not transmit any data. Instead, a special data error token will
be sent to the host. Figure “Read Operation-Data Error” shows a data read operation which terminated
with an error token rather than a data block.
As for the read operation, while in SPI mode the MultiMediaCard supports single and multiple block write
commands. Upon reception of a valid write command (CMD24 and CMD25 in the MultiMediaCard
protocol), the card will respond with a response token and will wait for a data block to be sent from the
host. CRC suffix, block length and start address restrictions are (with the exception of the CSD parameter
WRITE_BL_PARTIAL controlling the partial block write option) identical to the read operation (refer to
Figure “Single Block Write Operation”). If a CRC error is detected it will be reported in the data-response
token and the data block will not be programmed.
After a data block has been received, the card will respond with a data-response token. If the data block
has been received without errors, it will be programmed. As long as the card is busy programming, a
continuous stream of busy tokens will be sent to the host (effectively holding the DataOut line low).
In Multiple Block write operation the stop transmission will be done by sending ‘Stop Tran’ token instead
of ‘Start Block’ token at the beginning of the next block.
data
from from Start data from response and Stop
data from
host card Block host busy from Tran
host
to card to host Token to card card Token
to card
Two types of multiple block write transactions, identical to the multiple block read, are defined (the host
can use either one at any time):
Transaction abort is done by sending the ‘Stop Tran’ token. If a multiple block write with predefined
block count is aborted, the data in the remaining blocks is not defined.
If the card detects a CRC error or a programming error (e.g. write protect violation, out of range, address
misalignment, internal error, etc.) during a multiple block write operation (both types) it will report the
If the host uses partial blocks whose accumulated length is not block aligned and block misalignment is not
allowed (CSD parameter WRITE_BLK_MISALIGN is not set), the card shall detect the block
misalignment error before the beginning of the first misaligned block and respond with an error indication
in the dataresponse token and ignore any further incoming data blocks. The host must than abort the
operation by sending the ‘Stop Tran’ token.
Once the programming operation is completed, the host must check the results of the programming using
the SEND_STATUS command (CMD13). Some errors (e.g. address out of range, write protect violation
etc.) are detected during programming only. The only validation check performed on the data block and
communicated to the host via the data-response token is the CRC.
If the host sends a ‘Stop Tran’ token after the card received the last block of a multiple block operation
with pre-defined number of blocks, it will be responded to as the beginning of an illegal command and
responded accordingly.
While the card is busy, resetting the CS signal will not terminate the programming process. The card will
release the DataOut line (tri-state) and continue with programming. If the card is reselected before the
programming is finished, the DataOut line will be forced back to low and all commands will be rejected.
Resetting a card (using CMD0) will terminate any pending or active programming operation. This may
destroy the data formats on the card. It is in the responsibility of the host to prevent it.
The erase and write protect management procedures in the SPI mode are identical to those of the
MultiMediaCard mode. While the card is erasing or changing the write protection bits of the predefined
sector list, it will be in a busy state and hold the DataOut line low. Figure “No Data Operations” illustrates
a ‘no data’ bus transaction with and without busy signaling.
Unlike the MultiMediaCard protocol (where the register contents are sent as a command response), reading
the contents of the CSD and CID registers in SPI mode is a simple read-block transaction. The card will
respond with a standard response token (refer to Figure “Read Operation”) followed by a data block of 16
bytes suffixed with a 16-bit CRC. The data timeout for the CSD command cannot be set to the card TAAC
since this value is stored in the CSD. Therefore the standard response timeout value (NCR) is used for read
latency of the CSD register.
Reset Sequence
The MultiMediaCard requires a defined reset sequence. After power on reset or CMD0 (software reset) the
card enters an idle state. At this state the only legal host command is CMD1 (SEND_OP_COND) and
CMD58 (READ_OCR). In SPI mode, as opposed to MultiMediaCard mode, CMD1 has no operands and
does not return the contents of the OCR register. Instead, the host may use CMD58 (available in SPI mode
only) to read the OCR register. Furthermore, it is in the responsibility of the host to refrain from accessing
cards that do not support its voltage range. The usage of CMD58 is not restricted to the initializing phase
only, but can be issued at any time. The host must poll the card (by repeatedly sending CMD1) until the
‘in-idle-state’ bit in the card response indicates (by being set to 0) that the card completed its initialization
processes and is ready for the next command. The host must poll the card (by repeatedly sending CMD1)
until the ‘in-idle-state’ bit in the card response indicates (by being set to 0) that the card completed its
initialization processes and is ready for the next command.
Error Conditions
Unlike the MultiMediaCard protocol, in the SPI mode the card will always respond to a command. The
response indicates acceptance or rejection of the command. A command may be rejected if it is not
supported (illegal opcode), if the CRC check failed, if it contained an illegal operand, or if it was out of
sequence during an erase sequence.
Card Lock/Unlock
Usage of card lock and unlock commands in SPI mode is identical to MultiMediaCard mode. In both cases
the command response is of type R1b. After the busy signal clears, the host should obtain the result of the
operation by issuing a GET_STATUS command. Please refer to Chapter “Card lock/unlock operation” for
details.
Commands
All the MultiMediaCard commands are 6 bytes long. The command transmission always starts with the
left bit of the bitstring corresponding to the command codeword. All commands are protected by a CRC7.
The commands and arguments are listed in Table
The following table provides a detailed description of the SPI bus commands. The responses are defined in
Chapter “Responses”. The Table “Commands and Arguments” lists all MultiMediaCard commands. A
“yes” in the SPI mode colon indicates that the command is supported in SPI mode. With these restrictions,
the command class description in the CSD is still valid. If a command does not require an argument, the
value of this field should be set to zero. The reserved commands are reserved in MultiMediaCard mode as
well. The binary code of a command is defined by the mnemonic symbol. As an example, the content of
the command index field is (binary) ‘000000’ for CMD0 and ‘100111’ for CMD39.
Responses
There are several types of response tokens. As in the MultiMediaCard mode, all are transmitted MSB first:
• Format R1
This response token is sent by the card after every command with the exception of SEND_STATUS
commands. It is one byte long, and the MSB is always set to zero. The other bits are error indications, an
error being signaled by a ‘1’. The structure of the R1 format is given in Figure “R1 Response Format”.
The meaning of the flags is defined as following:
• In idle state: The card is in idle state and running the initializing process.
• Erase reset: An erase sequence was cleared before executing because an out of erase sequence
command was received.
• Illegal command: An illegal command code was detected.
• Communication CRC error: The CRC check of the last command failed.
• Erase sequence error: An error in the sequence of erase commands occurred.
• Address error: A misaligned address, which did not match the block length, was used in the
command.
• Parameter error: The command’s argument (e.g. address, block length) was out of the
allowed range for this card.
7 0
0
in idle state
erase reset
illegal command
com crc error
erase sequence error
address error
parameter error
R1 Response Format
• Format R1b
This response token is identical to the R1 format with the optional addition of the busy signal. The busy
signal token can be any number of bytes. A zero value indicates card is busy. A non-zero value indicates
the card is ready for the next command.
1. Byte 2. Byte
7 0 7 0
0
card is locked
wp erase skip | lock/unlock command failed
error
CC error
card ecc failed
wp violation
erase param
out of range | csd_overwrite
in idle state
erase reset
illegal command
com crc error
erase sequence error
address error
parameter error
R2 Response Format
The first byte is identical to the response R1. The content of the second byte is described in the following:
• Out of range csd_overwrite: This status bit has two functions. It is set if the command
argument was out of its valid range or if the host is trying to change the ROM section or reverse
the copy bit (set as original) or permanent WP bit (un-protect) of the CSD register.
• Erase param: An invalid selection, sectors or groups, for erase.
• Write protect violation: The command tried to write a write protected block.
• Card ECC failed: Card internal ECC was applied but failed to correct the data.
• CC error: Internal card controller error
• Error: A general or an unknown error occurred during the operation.
• Write protect erase skip | lock/unlock command failed: This status bit has two functions
overloaded. It is set when the host attempts to erase a write protected sector or if a sequence or
password error occurred during card lock/unlock operation.
• Card is locked: Set when the card is locked by the user. Reset when it is unlocked.
39 32 31 0
0 0
R1 OCR
R3 Response Format
• Data Response
Every data block written to the card will be acknowledged by a data response token. It is one byte long
and has the following format:
7 0
× × × 0 status 1
Data Response
Data Tokens
Read and write commands have data transfers associated with them. Data is being transmitted or received
via data tokens. All data bytes are transmitted MSB first. Data tokens are 4 to 2051 bytes long and have
the following format:
If a read operation fails and the card cannot provide the required data, it will send a data error token
instead. This token is one byte long and has the following format:
7 0
0 0 0
Error
CC Error
Card ECC failed
out of range
Card is locked
The 4 least significant bits (LSB) are the same error bits as in the response format R2.
As described in the previous paragraphs, in SPI mode, status bits are reported to the host in three different
formats: response R1, response R2 and data error token (the same bits may exist in multiple response
types— e.g Card ECC failed).
As in the MultiMediaCard mode, error bits are cleared when read by the host, regardless of the response
format. State indicators are either cleared by reading or in accordance with the card state. All Error/Status
bits defined in MultiMediaCard mode, with the exception of underrun and overrun, have the same meaning
and usage in SPI mode. The following table summarizes the set and clear conditions for the various status
bits:
• Type:
• E: Error bit.
• S: Status bit.
• R: Detected and set for the actual command response.
• X: Detected and set during command execution. The host must poll the card by sending status
command in order to read these bits.
• Clear Condition:
• A: According to the card state.
• C: Clear by read.
Included Clear
Identifier in resp Type Value Description condition
Out of range R2 ERX ’0’= no error The command argument was out of C
DataErr ’1’= error allowed range for these Hitachi
MultiMediaCards.
Address error R1 R2 ERX ’0’= no error An address which did not match the C
’1’= error block length was used in the
command.
Erase sequence R1 R2 ER ’0’= no error An error in the sequence of erase C
error ’1’= error command sequence.
Error param R2 EX ’0’= no error An error in the parameters of the C
’1’= error erase command sequence.
Parameter error R1 R2 ERX ’0’= no error An error in the parameters of the C
’1’= error command.
WP violation R2 ERX ’0’= not protected Attempt to program a write protected C
’1’= protected block.
Com CRC error R1 R2 ER ’0’= no error The CRC check of the previous C
’1’= error command failed.
X: Don’t care
*: Repeater
All timing values are defined in Table “Timing Values”. The host must keep the clock running for at least
NCR clock cycles after receiving the card response. This restriction applies to both command and data
response tokens.
Command/Response
CS H H L L L ****************** L L L L H H H
NCS NEC
Datain X X H H H H 6 bytes command H H H H H ******* H H H H X X X
NCR
Dataout Z Z Z H H H H ******* H H H H H 1 or 2 bytes response H H H H H Z Z
CS H L L L ****************** L L L L H H H L L L L L L H H
NCS NEC NDS NEC
Datain X H H H H 6 bytes command H H H H H H H H H H H H H X X X H H H H H H X X
NCR
Dataout Z Z H H H H ******* H H H H card response busy L Z Z Z busy H H H H Z
CS L L L L L ****************** L L H H H
NRC
Dataout H H H H H 1 or 2 bytes response H H H H ************* H H H H H Z Z
CS H L L L ****************** L L L L H H H
NCS NEC
Datain X H H H H Read command H H H H H ********** H H H X X X
NCR NAC
Dataout Z Z H H H H ******* H H H H Card response H H H H Data block H H Z Z
CS H L L ****************** L L L L L
NCS
Datain X H * * H Read Cmd H H H H ********** H H Stop Cmd H H H H H H H
NCR NAC NAC NCR
Dataout Z Z H H H **** H * * H Card Resp H * * H Data block H * * H Data block H H * * H Card Resp
CS H L L ****************** L L L L L
NCS
Datain X H * * H Read Cmd H H H H ********** H H H Stop Cmd H H H H H H H H H H
NCR NAC NAC NCR
Dataout Z Z H H H **** H * * H Card Resp H * * H Data block H * * H Data X X H * * H Card Resp
CS H L L L ****************** L L L H H H H
NCS NEC
Datain X H H H H read command H H H H H ******* H H H X X X X
NCR NCX
Dataout Z Z H H H H ******* H H H H card response H H H H data block H H H H Z Z Z
CS H L ****************** L L L L L L L L H H H L L L L
NCS NWR NEC NDS
Datain X H ** H Write command H H H H H H H H ** H Data block H H H H ** H X ** X H H H H
NCR
Dataout Card Data
Z Z H H H ******* H ** H response H H H H H H H resp Busy L Z Z Z Busy H
CS L ****************** L L L L L L L L L L L L L L L L L L L L
NWR NWR
Dataout
H H H H H Data Resp Busy H H H H H H H Data Resp Busy H H H H H H X * * X Busy
Timing Values
Error Handling
MultiMediaCards are defined as error free devices or as devices with a defined maximum bit error rate
(with external error correction circuitry). To correct defects in the memory field of the cards the system
may include error correction codes in the payload data (ECC). This correction is intended to correct static
errors. Additionally two methods of detecting errors generated during the data transfer (dynamic errors)
via a cyclic redundancy check (CRC) are implemented.
These Hitachi MultiMediaCards is free of static errors. All errors are covered inside the card, even errors
occurring during the lifetime of these Hitachi MultiMediaCards are covered for the user. The only effect
which may be notified by the end user is, that the overall memory capacity may be reduced by small
number of blocks. All flash handling is done on card, so that no external error correction is needed.
The CRC is intended for protecting MultiMediaCard commands, responses and data transfer against
transmission errors on the MultiMediaCard bus. One CRC is generated for every command and checked
for every response on the CMD line. For data blocks one CRC per transferred block is generated. The
CRC is generated and checked as described in the following.
• CRC7
The CRC7 check is used for all commands, for all responses except type R3, and for the CSD and CID
registers. The CRC7 is a 7-bit value and is computed as follows:
7 3
generator polynomial: G(x) = x + x + 1
n n-1 0
M(x) = (first bit) * x + (second bit) * x +...+ (last bit) * x
7
CRC[6...0] = Remainder [(M(x) * x )/G(x)]
All CRC registers are initialized to zero. The first bit is the most left bit of the corresponding bitstring (of
the command, response, CID or CSD). The degree n of the polynomial is the number of CRC protected
bits decreased by one. The number of bits to be protected is 40 for commands and responses (n = 39), and
120 for the CSD and CID (n = 119).
• CRC16
The CRC16 is used for payload protection in block transfer mode. The CRC check sum is a 16-bit value
and is computed as follows:
16 12 5
generator polynomial: G(x) = x + x +x + 1,
n n-1 0
M(x) = (first bit) * x + (second bit) * x +...+ (last bit) * x
16
CRC[15...0] = Remainder [(M(x) * x ) / G(x)]
All CRC registers are initialized to zero. The first bit is the first data bit of the corresponding block. The
degree n of the polynomial denotes the number of bits of the data block decreased by one (e.g. n = 4095 for
a block length of 512 bytes). The generator polynomial G(x) is a standard CCITT polynomial. The code
has a minimal distance d=4 and is used for a payload length of up to 2048 Bytes (n <= 16383).
Power Supply
The VSS1, VSS2 and VCC lines supply the card with operating voltage. For this, decoupling capacitors for
buffering current peak are used. These capacitors are placed on the bus side corresponding to Figure
“Power Supply Decoupling”.
VSS1
C MultiMediaCard
VCC
VSS2
C = 0.1 µF
The host controller includes a central buffer capacitor for VCC. Its value is Cbuf = 1µF/slot
Power on
Each card has its own power on detection circuitry which puts the card into a defined state after the power-
on. No explicit reset signal is necessary. The cards can also be reset by a special software command:
GO_IDLE_STATE (CMD0). In case of emergency the host may also reset the cards by switching the
power supply off and on again.
VCC
Power up ASYNC.RESET command ENABLE core memory
detection parser controller core
VSS
MultiMediaCard controller
Power on Detection
A power on reset is generated on chip as long as VCC is below a certain limit. After this reset the command
parser of these Hitachi MultiMediaCards works properly but the access to the memory core is not
guaranteed. So in the power up phase (or when these Hitachi MultiMediaCards are inserted during power
up) the host has to wait after sending SEND_OP_COND (CMD1) for the identification delay before the
ALL_SEND_CID (CMD2) can be interpreted by the card:
3.6 V
2.0 V
Time
Power-up Diagram
• After power up (including hot insertion, i.e. inserting a card when the bus is operating) the
MultiMediaCard enters the idle state. During this state the MultiMediaCard ignores all bus transactions
until CMD1 is received.
• CMD1 is a special synchronization command used to negotiate the operation voltage range and to poll
the cards until they are out of their power-up sequence. Besides the operation voltage pro-file of the
cards, the response to CMD1 contains a busy flag, indicating that the card is still working on its power-
up procedure and is not ready for identification. This bit informs the host that at least one card is not
ready. The host has to wait (and continue to poll the cards) until this bit is cleared.
• Getting individual cards, as well as the whole MultiMediaCard system, out of idle state is up to the
responsibility of the bus master. Since the power up time and the supply ramp up time depend on
application parameters such as the maximum number of MultiMediaCards, the bus length and the
power supply unit, the host must ensure that the power is built up to the operating level (the same level
which will be specified in CMD1) before CMD1 is transmitted.
• After power up the host starts the clock and sends the initializing sequence on the CMD line. This
sequence is a contiguous stream of logical ‘1’s. The sequence length is the maximum of 1 msec, 74
clocks or the supply-ramp-up-time; The additional 10 clocks (over the 64 clocks after what the card
should be ready for communication) are provided to eliminate power-up synchronization problems.
The MultiMediaCards can be inserted/removed into/from the bus without damage. If the card
insertion/removal is occured during card operation (read/write), the data in the MultiMediaCard would be
broken. If one of the supply pins (VCC or VSS) is not connected properly, then the current is drawn through
a data line to supply the card. Naturally the card can not operate properly under this conditions.
VCC
VSS
VCC
Ishort
worst case shortcut
card
CMD, DAT controller
Ishort
VSS
connector
Characteristics
This chapter defines following characteristics:
• Temperature characteristics
• Electrical characteristics
Temperature Characteristics
Electrical Characteristics
In this chapter the electrical characteristics for these Hitachi MultiMediaCards are defined in three steps:
Pad Characteristics
The total capacitance CL of each line of the MultiMediaCard bus is the sum of the bus master capacitance
CHOST, the bus capacitance CBUS itself and the capacitance CCARD of each card connected to this line:
where N is the number of connected cards. Requiring the sum of the host and bus capacitance’s not to
exceed 30 pF for up to 10 cards, and 40 pF for up to 30 cards, the following values must not be exceeded:
The recommended operating conditions define the parameter ranges for optimal performance and
durability of these Hitachi MultiMediaCards.
Operating Characteristics
The operating characteristics are parameters measured in a MultiMediaCard system assuming the
recommended operating conditions (refer to Chapter “Recommended Operating Conditions”).
DAT
Clock
Input
Output
; ;; Valid data
: Invalid
command frame
tIH
tOH
tWH
tPP
HB28H016/D032/B064/B128MM2
tHL
• TAAD: The asynchronous access time to read a byte out of the memory field.
TSAD
tAT
Access Time
TAAD
tISU
Valid data
tOSU
tLH
Valid data
• TSAD: The synchronous access time. This time defines the time of the maximum number of cycles
which are required to access a byte of the memory field.
The synchronous part of the access time is sum of the command frame length and some additional internal
cycles (NSAD = 16 cycles). At 20 MHz one cycle is 50 ns (1/fPP), multiplied with NSAD the resulting frame
time is TSAD = 0.8 µs. The asynchronous access delay of these Hitachi MultiMediaCards is TAAD = 300 µs
maximum. The resulting memory access time tAT is the sum of both parts:
response frame
data
VIH
VIL
VIH
VIL
VOH
VOL
In the CSD are two fields to code the asynchronous and the synchronous access delay time:
The value for the CSD field NSAC is calculated from NSAD (maximum: 16 cycles) by division with 100
and rounding up to the next integer:
• NSAC = 0x01
TAAC = [TAAD] = 1 ms
• TAAC = 0x0E
For more details on NSAC and TAAC CSD-entries refer to Chapter “Card Specific Data (CSD)”.
References
[1] The MultiMediaCard, System Specification 3.1, MultiMediaCard Association
Number Representations
• decimal numbers: 1234, no special characters
• hexadecimal numbers: 0xAB, leading 0x, each digit represents 4 bits.
• binary numbers (single bit): ‘0’.
• binary number (unsigned bit vector): “100100”.
• 1k is equal to 1024.
• 1M is equal to 1k * 1k, except the card capacity. In the card capacity, 1M is equal to 10 (“Features”
6
Physical Outline
As of January, 2002
Unit: mm
Tolerance: 0.1 mm
Front
27.3
25.9
4.0 2.1
21.8
R02 Min. all around
Back
1.4
19.65 Min/20.60 Max
0.2
18.10 Max
15.60 Max
13.10 Max
10.60 Max
17.15 Min
14.65 Min
12.15 Min
8.10 Max
5.60 Max
9.65 Min
7.15 Min
4.65 Min
C7
24.00 ± 0.08
C6
C5
C4
C3
C2
C1
2 × R0.5
4.0
4.0
32.0
Cautions
1. Hitachi neither warrants nor grants licenses of any rights of Hitachi’s or any third party’s patent,
copyright, trademark, or other intellectual property rights for information contained in this document.
Hitachi bears no responsibility for problems that may arise with third party’s rights, including
intellectual property rights, in connection with use of the information contained in this document.
2. Products and product specifications may be subject to change without notice. Confirm that you have
received the latest product standards or specifications before final design, purchase or use.
3. Hitachi makes every attempt to ensure that its products are of high quality and reliability. However,
contact Hitachi’s sales office before using the product in an application that demands especially high
quality and reliability or where its failure or malfunction may directly threaten human life or cause risk
of bodily injury, such as aerospace, aeronautics, nuclear power, combustion control, transportation,
traffic, safety equipment or medical equipment for life support.
4. Design your application so that the product is used within the ranges guaranteed by Hitachi particularly
for maximum rating, operating supply voltage range, heat radiation characteristics, installation
conditions and other characteristics. Hitachi bears no responsibility for failure or damage when used
beyond the guaranteed ranges. Even within the guaranteed ranges, consider normally foreseeable
failure rates or failure modes in semiconductor devices and employ systemic measures such as fail-
safes, so that the equipment incorporating Hitachi product does not cause bodily injury, fire or other
consequential damage due to operation of the Hitachi product.
5. This product is not designed to be radiation resistant.
6. No one is permitted to reproduce or duplicate, in any form, the whole or part of this document without
written approval from Hitachi.
7. Contact Hitachi’s sales office for any questions regarding this document or Hitachi semiconductor
products.
Hitachi, Ltd.
Semiconductor & Integrated Circuits
Nippon Bldg., 2-6-2, Ohte-machi, Chiyoda-ku, Tokyo 100-0004, Japan
Tel: (03) 3270-2111 Fax: (03) 3270-5109
URL http://www.hitachisemiconductor.com/