Saturday, February 11, 2012

Technical details

Transfer modes

The concrete interface comprises 9 pins, except that the miniSD agenda adds two alone pins in the centermost and the microSD agenda omits one of the two VSS (Ground) pins.

SD agenda pin appointment miniSD agenda pin appointment microSD agenda pin assignment

SD agenda pinning.jpg Mini SD agenda pinning.jpg Micro SD agenda pinning.jpg

Various SD cards may abutment assorted combinations of the afterward bus types and alteration modes. The SPI bus and one-bit SD bus are binding for all SD families, as explained in the next section.

SPI: Consecutive Peripheral Interface Bus is primarily acclimated by anchored microcontrollers. This bus blazon supports alone a 3.3-volt interface.

One-bit SD: Abstracted command and abstracts channels and a proprietary alteration format.

Four-bit SD: Uses added pins additional some reassigned pins. UHS-I and UHS-II requires this bus type.

Once the host accessory and the SD agenda board a bus interface, the acceptance of the numbered pins is the aforementioned for all three agenda sizes:

SPI Bus Pin Name I/O Logic Description

1 nCS I PP Card Baddest (Neg True)

2 DI I PP Data In MOSI

3 VSS S S Ground

4 VDD S S Power

5 CLK I PP Clock SCLK

6 VSS S S Ground

7 DO O PP Data Out MISO

8 NC

nIRQ .

O .

OD NC (Memory Cards)

Interrupt (SDIO Cards)

9 NC . . NC

One-Bit SD Bus Pin Name I/O Logic Description

1 NC . . NC

2 CMD I/O PP,OD Command, Response

3 VSS S S Ground

4 VDD S S Power

5 CLK I PP Clock

6 VSS S S Ground

7 DAT0 I/O PP Data 0

8 NC

nIRQ .

O .

OD NC (Memory Cards)

Interrupt (SDIO Cards)

9 NC . . NC

Four-Bit SD Bus Pin Name I/O Logic Description

1 DAT3 I/O PP Data 3

2 CMD I/O PP,OD Command, Response

3 VSS S S Ground

4 VDD S S Power

5 CLK I PP Clock

6 VSS S S Ground

7 DAT0 I/O PP Data 0

8 DAT1

nIRQ I/O

O PP

OD Data 1. SDIO Cards share

with Interrupt Period

9 DAT2 I/O PP Data 2

Notes:

Direction is about to card. I = Input, O = Output.

PP = Push-Pull logic, OD = Open-Drain logic.

S = Adeptness Supply, NC = Not Connected (or analytic high).

edit Interface

Inside a 512 MB SD card: NAND beam dent that holds the abstracts (bottom) and SD ambassador (top)

Inside a 2 GB SD card: two NAND beam chips (top and middle), SD ambassador dent (bottom)

Inside a SDHC card

Command interface

SD cards and host accessories initially acquaint through a ancillary one-bit interface, area the host accessory provides a alarm arresting that strobes individual $.25 into and out of the SD card. The host accessory thereby sends 48-bit commands and receives responses. The agenda can arresting that a acknowledgment will be delayed, but the host accessory can arrest the dialogue.

Through arising assorted commands, the host accessory can:

Determine the type, anamnesis capacity, and capabilities of the SD card

Command the agenda to use a altered voltage, altered alarm speed, or avant-garde electrical interface

Prepare the agenda to accept a block to address to the beam memory, or apprehend and acknowledgment with the accommodation of a defined block.

The command interface is an addendum of the MultiMediaCard (MMC) interface. SD cards alone abutment for some of the commands in the MMC protocol, but added commands accompanying to archetype protection. By application alone commands accurate by both standards until free the blazon of agenda inserted, a host accessory can board both SD and MMC cards.

Electrical interface

All SD agenda families initially use a 3.3-volt electrical interface. On command, SDHC and SDXC cards about-face to 1.8-volt operation.39

At antecedent power-up or agenda insertion, the host accessory selects either the Consecutive Peripheral Interface (SPI) bus or the one-bit SD bus by the voltage akin present on Pin 1. Thereafter, the host accessory may affair a command to about-face to the four-bit SD bus interface, if the SD agenda supports it. For assorted agenda types, abutment for the four-bit SD bus is either alternative or mandatory.39

After free that the SD agenda supports it, the host accessory can aswell command the SD agenda to about-face to a college alteration speed. Until free the card's capabilities, the host accessory should not use a alarm acceleration faster than 400 kHz. SD cards added than SDIO (see below) accept a Default Acceleration alarm amount of 25 MHz. The host accessory is not appropriate to use the best alarm acceleration that the agenda supports. It may accomplish at beneath than the best alarm acceleration to conserve power.39 Amid commands, the host accessory can stop the alarm entirely.

SDIO cards

The SDIO ancestors comprises Low-Speed and Full-Speed cards. Both types of SDIO cards abutment SPI and one-bit SD bus types. Low-Speed SDIO cards are accustomed to aswell abutment the four-bit SD bus; Full-Speed SDIO cards are appropriate to abutment the four-bit SD bus. To use a SDIO agenda as a "combo card" (for both anamnesis and I/O), the host accessory accept to aboriginal baddest four-bit SD bus operation. Two added altered appearance of Low-Speed SDIO are a best alarm amount of 400 kHz for all communications, and the use of Pin 8 as "interrupt" to try to admit chat with the host device.57

Ganging cards together

The one-bit SD agreement was acquired from the MMC protocol, which envisaged the adeptness to put up to 3 cards on a bus of accepted arresting lines. The cards use accessible beneficiary interfaces, area a agenda may cull a band to the low voltage level; the band is at the top voltage akin (because of a pull-up resistor) if no agenda pulls it low. Though the cards aggregate alarm and arresting lines, anniversary agenda had its own dent baddest band to faculty that the host accessory had alleged it.

The SD agreement envisaged the adeptness to assemblage 30 cards calm after abstracted dent baddest lines. The host accessory would advertisement commands to all cards and analyze the agenda to acknowledge to the command application its altered consecutive number.

In practice, cards are rarely ganged calm because open-collector operation has problems at top speeds and increases adeptness consumption. Newer versions of the SD blueprint acclaim abstracted curve to anniversary card.

Achieving college agenda speeds

The SD blueprint defines four-bit-wide transfers. (The MMC blueprint supports this and aswell defines an eight-bit-wide mode.) Transferring several $.25 on anniversary alarm beating improves the agenda speed. Avant-garde SD families accept aswell bigger acceleration by alms faster alarm frequencies and bifold abstracts amount (explained here).

edit Book system

Like added types of beam anamnesis card, an SD agenda of any SD ancestors is a block-addressable accumulator device, in which the host accessory can apprehend or address fixed-size blocks by allegorical their block number.

MBR and FAT

Most SD cards address preformatted with one or added MBR partitions, area the aboriginal or alone allotment contains a book system. This lets them accomplish like the harder deejay of a claimed computer. Per the SD agenda specification, an SD agenda is formatted with MBR and the afterward book system:

For SDSC cards: FAT16

For SDHC cards: FAT32

For SDXC cards: exFAT

Most customer articles that yield an SD agenda will apprehend it to be abstracted and formatted in this way. The accepted abutment for FAT16 and FAT32 acquiesce the acceptance of SDSC and SDHC cards on a lot of host computers with a accordant SD reader, to present the user with the accustomed adjustment of alleged files in a hierarchical agenda tree.

On such SD cards, accepted account programs such as Mac OS X's "Disk Utility" or Windows' SCANDISK can be acclimated to adjustment or retrieve besmirched data, and sometimes balance deleted files. Defragmentation accoutrement for FAT book systems may be acclimated on such cards. The consistent alliance of files may accommodate a bordering advance in the time appropriate to apprehend or address the file,40 but not an advance commensurable to defragmentation of harder drives, area autumn a book in assorted bits may absorb a time amends to move amid concrete areas of the drive. Moreover, defragmentation performs writes to the SD agenda that calculation adjoin the card's rated lifespan. The address ability of the concrete anamnesis is discussed in the commodity on beam memory; newer technology to admission the accumulator accommodation of a agenda currently provides worse address endurance.

When reformatting an SD agenda abate than 4 GB, FAT16 should be used. (This is aswell an advantage for 4 GB cards, but it requires the use of 64 kiB clusters, which are not broadly supported.) FAT16 does not abutment cards aloft 4 GB.

The SDXC blueprint makes Microsoft's proprietary exFAT book arrangement mandatory,58 which is accurate alone by some proprietary operating systems.

Other book systems

Because the host angle the SD agenda as a block accumulator device, the agenda does not crave MBR partitions or any specific book system. The agenda can be reformatted to use any book arrangement the operating arrangement supports. For example:

Under Unix-like operating systems such as Linux or FreeBSD, SD cards can be formatted application the UFS, EXT3, ext4, btrFS, HFS Plus, or the ReiserFS book systems.

Under Mac OS X, SD cards can be abstracted as GUID accessories and formatted with the HFS Additional book system.

Under Windows and some Unix systems, SD cards can be formatted application NTFS and, on after versions, exFAT.

Additionally, an SD agenda alleged Live SD can accommodate an anchored operating arrangement (such as Live USB). Computers that can bootstrap from an SD agenda (either application a USB adapter or amid into the computer's beam media reader) instead of the harder deejay drive may thereby be able to balance from a besmirched harder deejay drive. A Live SD can be write-locked to bottle the system's integrity.

Risks of reformatting

Reformatting an SD agenda with a altered book system, or even with the aforementioned one, may accomplish the agenda slower, or abbreviate its lifespan. Some cards use abrasion leveling, in which frequently adapted blocks are mapped to altered portions of anamnesis at altered times, and some wear-leveling algorithms are advised for the admission patterns archetypal of the book allocation table on a FAT16 or FAT32 device.59 In addition, the preformatted book arrangement may use a array admeasurement that matches the abolish arena of the concrete anamnesis on the card; reformatting may change the array admeasurement and accomplish writes beneath efficient.

edit Adeptness use

The adeptness burning of microSD cards varies by manufacturer, but appears to be in the ambit of 66-330 mW (20-100 mA at a accumulation voltage of 3.3 V). Specifications from TwinMos technologies account a best of 149 mW (45 mA) during transfer. Toshiba, on the added hand, lists 264-330 mW (80-100 mA).60

No comments:

Post a Comment