Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
SD card
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Technical details== {{More citations needed|section|date=September 2023}} {{multiple image | direction = vertical | width = 175 | header = microSD card and standard SD card adapter | image1 = SD card adapter.jpg | image2 = SD card adapters.jpg }} ===<span class="anchor" id="Physical size"></span>Physical size=== {{More citations needed|section|date=September 2023}} The SD card specification defines three physical sizes. The SD and SDHC families are available in all three sizes, but the SDXC and SDUC families are not available in the mini size, and the SDIO family is not available in the micro size. Smaller cards are usable in larger slots through use of a passive adapter. ====Standard==== [[File:MicroSD MemoryCard 002.jpg|thumb|upright|Size comparison of families: SD (blue), miniSD (green), microSD (red)]] * SD (SDSC), SDHC, SDXC, SDIO, SDUC * {{Nowrap|{{cvt|32|x|24|x|2.1|mm|frac=64}}}} * {{Nowrap|{{cvt|32|x|24|x|1.4|mm|frac=64}}}} (as thin as MMC) for '''Thin SD''' (rare) ====<span class="anchor" id="MiniSD"></span>MiniSD==== * miniSD, miniSDHC, miniSDIO * {{Nowrap|{{cvt|21.5|x|20|x|1.4|mm|frac=64}}}} ====<span class="anchor" id="microSD"></span> microSD==== The micro form factor is the smallest SD card format.<ref name="sdcard_choices">{{cite web|title=About|publisher=SD Association|url=https://www.sdcard.org/consumers/choices/|access-date=2011-05-02|archive-date=2011-11-21|archive-url=https://web.archive.org/web/20111121065042/https://www.sdcard.org/consumers/choices/|url-status=live}}</ref> * microSD, microSDHC, microSDXC, microSDUC * {{Nowrap|{{cvt|15|x|11|x|1|mm|frac=64}}}} ===Transfer modes=== {{More citations needed|section|date=September 2023}} Cards may support various combinations of the following bus types and transfer modes. The SPI bus mode and one-bit SD bus mode are mandatory for all SD families, as explained in the next section. Once the host device and the SD card negotiate a bus interface mode, the usage of the numbered pins is the same for all card sizes. * '''SPI bus mode:''' [[Serial Peripheral Interface Bus]] is primarily used by embedded [[microcontroller]]s. This bus type supports only a 3.3-volt interface. This is the only bus type that does not require a host license.{{Citation needed|date=August 2019}} * '''One-bit SD bus mode:''' Separate command and data channels and a proprietary transfer format. * '''Four-bit SD bus mode:''' Uses extra pins plus some reassigned pins. This is the same protocol as the one-bit SD bus mode which uses one command and four data lines for faster data transfer. All SD cards support this mode. UHS-I and UHS-II require this bus type. * '''Two differential lines SD UHS-II mode:''' Uses two [[low-voltage differential signaling]] interfaces to transfer commands and data. UHS-II cards include this interface in addition to the SD bus modes. The physical interface comprises 9 pins, except that the miniSD card adds two unconnected pins in the center and the microSD card omits one of the two V<sub>SS</sub> (Ground) pins.<ref>{{cite web |url=https://www.sdcard.org/downloads/pls/simplified_specs/part1_410.pdf |title=SD Part 1, Physical Layer Simplified Specification, Version 4.10 |access-date=2014-01-02 |url-status=dead |archive-url=https://web.archive.org/web/20131202232415/https://www.sdcard.org/downloads/pls/simplified_specs/part1_410.pdf |archive-date=2013-12-02 }}</ref> [[File:MMC-SD-miniSD-microSD-Color-Numbers-Names.gif|thumb|upright|Official pin numbers for each card type (top to bottom): [[MultiMediaCard|MMC]], SD, miniSD, microSD. This shows the evolution from the older MMC, on which SD is based. NOTE: This drawing does not show 8 new UHS-II contacts that were added in spec 4.0.]] {| class="wikitable" style="text-align:center" |+ SPI bus mode |- ! [[MultiMediaCard|MMC]]<br />pin !! SD<br />pin !! miniSD<br />pin !! microSD<br />pin !! Name !! I/O !! Logic !! Description |- | 1 ||1 ||1 ||2 ||nCS ||I ||PP ||style="text-align:left"|SPI Card Select [CS] (Negative logic) |- | 2 ||2 ||2 ||3 ||DI ||I ||PP ||style="text-align:left"|SPI Serial Data In [MOSI] |- | 3 ||3 ||3 ||style="background: gray" | {{sp}} ||VSS ||S ||S ||style="text-align:left"|Ground |- | 4 ||4 ||4 ||4 ||VDD ||S ||S ||style="text-align:left"|Power |- | 5 ||5 ||5 ||5 ||CLK ||I ||PP ||style="text-align:left"|SPI Serial Clock [SCLK] |- | 6 ||6 ||6 ||6 ||VSS ||S ||S ||style="text-align:left"|Ground |- | 7 ||7 ||7 ||7 ||DO ||O ||PP ||style="text-align:left"|SPI Serial Data Out [MISO] |- | style="background: gray" | {{sp}} ||8 ||8 ||8 ||NC<br />nIRQ ||.<br />O ||.<br />OD ||style="text-align:left"|Unused (memory cards)<br />Interrupt (SDIO cards) (negative logic) |- | style="background: gray" | {{sp}} ||9 ||9 ||1 ||NC ||. ||. ||style="text-align:left"|Unused |- | style="background: gray" | {{sp}} ||style="background: gray" | {{sp}} ||10 ||style="background: gray" | {{sp}} ||NC ||. ||. ||style="text-align:left"|Reserved |- | style="background: gray" | {{sp}} ||style="background: gray" | {{sp}} ||11 ||style="background: gray" | {{sp}} ||NC ||. ||. ||style="text-align:left"|Reserved |} {| class="wikitable" style="text-align:center" |+ One-bit SD bus mode |- ! [[MultiMediaCard|MMC]]<br />pin !! SD<br />pin !! miniSD<br />pin !! microSD<br />pin !! Name !! I/O !! Logic !! Description |- | 1 ||1 ||1 ||2 ||CD ||I/O ||. ||style="text-align:left"|Card detection (by host) and<br />non-SPI mode detection (by card) |- | 2 ||2 ||2 ||3 ||CMD ||I/O ||PP,<br />OD ||style="text-align:left"|Command,<br />Response |- | 3 ||3 ||3 ||style="background: gray" | {{sp}} ||VSS ||S ||S ||style="text-align:left"|Ground |- | 4 ||4 ||4 ||4 ||VDD ||S ||S ||style="text-align:left"|Power |- | 5 ||5 ||5 ||5 ||CLK ||I ||PP ||style="text-align:left"|Serial clock |- | 6 ||6 ||6 ||6 ||VSS ||S ||S ||style="text-align:left"|Ground |- | 7 ||7 ||7 ||7 ||DAT0 ||I/O ||PP ||style="text-align:left"|SD Serial Data 0 |- | style="background: gray" | {{sp}} ||8 ||8 ||8 ||NC<br />nIRQ ||.<br />O ||.<br />OD ||style="text-align:left"|Unused (memory cards)<br />Interrupt (SDIO cards) (negative Logic) |- | style="background: gray" | {{sp}} ||9 ||9 ||1 ||NC ||. ||. ||style="text-align:left"|Unused |- | style="background: gray" | {{sp}} ||style="background: gray" | {{sp}} ||10 ||style="background: gray" | {{sp}} ||NC ||. ||. ||style="text-align:left"|Reserved |- | style="background: gray" | {{sp}} ||style="background: gray" | {{sp}} ||11 ||style="background: gray" | {{sp}} ||NC ||. ||. ||style="text-align:left"|Reserved |} {| class="wikitable" style="text-align:center" |+ Four-bit SD bus mode |- ! [[MultiMediaCard|MMC]]<br />pin !! SD<br />pin !! miniSD<br />pin !! microSD<br />pin !! Name !! I/O !! Logic !! Description |- | . ||1 ||1 ||2 ||DAT3 ||I/O ||PP ||style="text-align:left"|SD Serial Data 3 |- | . ||2 ||2 ||3 ||CMD ||I/O ||PP,<br />OD ||style="text-align:left"|Command,<br />Response |- | . ||3 ||3 ||style="background: gray" | {{sp}} ||VSS ||S ||S ||style="text-align:left"|Ground |- | . ||4 ||4 ||4 ||VDD ||S ||S ||style="text-align:left"|Power |- | . ||5 ||5 ||5 ||CLK ||I ||PP ||style="text-align:left"|Serial clock |- | . ||6 ||6 ||6 ||VSS ||S ||S ||style="text-align:left"|Ground |- | . ||7 ||7 ||7 ||DAT0 ||I/O ||PP ||style="text-align:left"|SD Serial Data 0 |- | style="background: gray" | {{sp}} ||8 ||8 ||8 ||DAT1<br />nIRQ ||I/O<br />O ||PP<br />OD ||style="text-align:left"|SD Serial Data 1 (memory cards)<br />Interrupt Period (SDIO cards share pin via protocol) |- | style="background: gray" | {{sp}} ||9 ||9 ||1 ||DAT2 ||I/O ||PP ||style="text-align:left"|SD Serial Data 2 |- | style="background: gray" | {{sp}} ||style="background: gray" | {{sp}} ||10 ||style="background: gray" | {{sp}} ||NC ||. ||. ||style="text-align:left"|Reserved |- | style="background: gray" | {{sp}} ||style="background: gray" | {{sp}} ||11 ||style="background: gray" | {{sp}} ||NC ||. ||. ||style="text-align:left"|Reserved |} Notes: # Direction is relative to card. I = Input, O = Output. # PP = [[Pushβpull output|Push-Pull]] logic, OD = [[Open collector|Open-Drain]] logic. # S = [[IC power supply pin|Power Supply]], NC = Not Connected (or [[Pull-up resistor|logical high]]). ===Interface=== [[File:Sd insides.png|thumb|Inside a 512 MB SD card: [[NAND flash]] chip that holds the data (bottom) and [[SD controller]] (top)]] [[File:SD-extreMEmory 2GB alt innen.jpg|thumb|upright|Inside a 2 GB SD card: two [[NAND flash]] chips (top and middle), SD controller chip (bottom)]] [[File:Pretec 16GB SDHC without cover 20090420.jpg|thumb|upright|Inside a 16 GB SDHC card]] ====Command interface==== SD cards and host devices initially communicate through a [[synchronous]] one-bit interface, where the host device provides a clock signal that strobes single bits in and out of the SD card. The host device thereby sends 48-bit commands and receives responses. The card can signal that a response will be delayed, but the host device can abort the dialogue.<ref name="SDHCspec"/> Through issuing various commands, the host device can:<ref name="SDHCspec"/> * Determine the type, memory capacity and capabilities of the SD card * Command the card to use a different voltage, different clock speed, or advanced electrical interface * Prepare the card to receive a block to write to the flash memory, or read and reply with the contents of a specified block. The command interface is an extension of the [[MultiMediaCard]] (MMC) interface. SD cards dropped support for some of the commands in the MMC protocol, but added commands related to copy protection. By using only commands supported by both standards until determining the type of card inserted, a host device can accommodate both SD and MMC cards. ====Electrical interface==== All SD card families initially use a 3.3 [[volt]] electrical interface. On command, SDHC and SDXC cards can switch to 1.8 V operation.<ref name="SDHCspec"/> At power-up or card insertion, the voltage on pin 1 selects either the Serial Peripheral Interface (SPI) bus or the SD bus. The SD bus starts in one-bit mode, but the host device may issue a command to switch to the four-bit mode, if the SD card supports it. For various card types, support for the four-bit SD bus is either optional or mandatory.<ref name="SDHCspec"/> After determining that the SD card supports it, the host device can also command the SD card to switch to a [[#Speed|higher transfer speed]]. Until determining the card's capabilities, the host device should not use a clock speed faster than 400 kHz. SD cards other than SDIO (see below) have a "Default Speed" clock rate of 25 MHz. The host device is not required to use the maximum clock speed that the card supports. It may operate at less than the maximum clock speed to conserve power.<ref name="SDHCspec"/> Between commands, the host device can stop the clock entirely. ====MBR and FAT==== {{More citations needed|section|date=September 2023}} Most SD cards ship preformatted with one or more [[Master boot record|MBR partitions]], where the first or only partition contains a [[file system]]. This lets them operate like the [[hard disk]] of a [[personal computer]]. Per the SD card specification, an SD card is formatted with MBR and the following file system: * For SDSC cards: ** Capacity of less than 32,680 logical sectors<!-- This is the exact condition as per the SD card spec. For operating systems to properly recognize this as FAT12, the cluster values used on the resulting volume must not be outside the range 002h..FF5h, a condition normally (but not necessarily) met implicitly when applying standard logical geometries on a FAT filesystem with less than 32680 logical sectors. We mention the logical sector count rather than the allowed cluster range here as this article is about SD cards specifically. --> (smaller than 16 MB{{efn|name="here, MB = 1024"|reference=here, MB = 1024<sup>2</sup> B}}): [[FAT12]] with partition type [[Partition type#PID 01h|01h]] and [[BPB 3.0]] or [[EBPB 4.1]]<ref name="SDG_2000_SD-P2-V1.0">{{cite book |title=SD Memory Card Specifications β PART 2 FILE SYSTEM SPECIFICATION β Version 1.0 |author=<!-- Staff writer(s); no by-line --> |publisher=SD Group, Matsushita Electric Industrial Co., Ltd. (MEI), SanDisk Corporation, Toshiba Corporation |date=February 2000 |version=1.0}}</ref> ** Capacity of 32,680 to 65,535 logical sectors (between 16 MB and 32 MB):{{efn|name="here, MB = 1024"}} [[FAT16]] with partition type [[Partition type#PID 04h|04h]] and [[BPB 3.0]] or [[EBPB 4.1]]<ref name="SDG_2000_SD-P2-V1.0"/> ** Capacity of at least 65,536 logical sectors (larger than 32 MB):{{efn|name="here, MB = 1024"}} [[FAT16B]] with partition type [[Partition type#PID 06h|06h]] and [[EBPB 4.1]]<ref name="SDG_2000_SD-P2-V1.0"/> * For SDHC cards: ** Capacity of less than 16,450,560<!-- CHS: 0..1023 / 0..254 (but not 255!) / 1 (but not 0!)..63 -> limit: 1024x255x63 = 16450560 --> logical sectors (smaller than 7.8 GB): [[FAT32]] with partition type [[Partition type#PID 0Bh|0Bh]] and [[EBPB 7.1]] ** Capacity of at least 16,450,560 logical sectors (larger than 7.8 GB): [[FAT32]] with partition type [[Partition type#PID 0Ch|0Ch]] and [[EBPB 7.1]] * For SDXC cards: [[exFAT]] with partition type [[Partition type#PID 07h|07h]] Most consumer products that take an SD card expect that it is partitioned and formatted in this way. Universal support for FAT12, FAT16, FAT16B and FAT32 allows the use of SDSC and SDHC cards on most host computers with a compatible SD reader, to present the user with the familiar method of named files in a hierarchical directory tree.{{citation needed|date=September 2023}} On such SD cards, standard utility programs such as Mac OS X's "{{Nowrap|[[Disk Utility]]}}" or Windows' [[SCANDISK]] can be used to repair a corrupted filing system and sometimes recover deleted files. [[Defragmentation]] tools for FAT file systems may be used on such cards. The resulting consolidation of files may provide a marginal improvement in the time required to read or write the file,<ref name="Fragmentation_and_Speed">{{Citation | url = https://www.sdcard.org/developers/overview/speed_class/ | title = Fragmentation and Speed | date = 11 December 2020 | publisher = SD Card | access-date = 21 November 2011 | archive-date = 3 June 2018 | archive-url = https://web.archive.org/web/20180603051813/https://www.sdcard.org/developers/overview/speed_class/ | url-status = live }}</ref> but not an improvement comparable to defragmentation of hard drives, where storing a file in multiple fragments requires additional physical and relatively slow, movement of a drive head.{{citation needed|date=September 2023}} Moreover, defragmentation performs writes to the SD card that count against the card's rated lifespan. The write endurance of the physical memory is discussed in the article on [[Flash memory degradation|flash memory]]; newer technology to increase the storage capacity of a card provides worse write endurance.{{citation needed|date=September 2023}} When reformatting an SD card with a capacity of at least 32 MB{{efn|name="here, MB = 1024"}} (65,536 logical sectors or more), but not more than 2 GB,{{efn|name="GiB"}} [[FAT16B]] with partition type [[Partition type#PID 06h|06h]] and [[EBPB 4.1]]<ref name="SDG_2000_SD-P2-V1.0"/> is recommended if the card is for a consumer device. (FAT16B is also an option for 4 GB cards, but it requires the use of 64 KB [[cluster (file system)|clusters]], which are not widely supported.) FAT16B does not support cards above 4 GB{{efn|name="GiB"}} at all. The SDXC specification mandates the use of [[Microsoft]]'s [[proprietary format|proprietary]] [[exFAT]] file system,<ref name="engadget_sdxc_2t_300m">{{cite web | url = https://www.engadget.com/2009/01/07/sdxc-memory-cards-promise-2tb-of-storage-300mbps-transfer/ | title = SDXC memory cards promise 2 TB of storage, 300 MBps transfer | publisher = Engadget | date = 2009-01-07 | access-date = 2010-08-22 | archive-date = 2010-02-11 | archive-url = https://web.archive.org/web/20100211152502/http://www.engadget.com/2009/01/07/sdxc-memory-cards-promise-2tb-of-storage-300mbps-transfer | url-status = live }}</ref> which sometimes requires appropriate drivers (e.g. <code>exfat-utils</code>/<code>exfat-fuse</code> on Linux). ====Risks of reformatting==== Reformatting an SD card with a different file system, or even with the same one, may make the card slower, or shorten its lifespan. Some cards use [[wear leveling]], in which frequently modified blocks are mapped to different portions of memory at different times, and some wear-leveling algorithms are designed for the access patterns typical of FAT12, FAT16 or FAT32.<ref>{{cite web |url=https://lwn.net/Articles/428584/ |title=Optimizing Linux with cheap flash drives |publisher=Linux Weekly News |access-date=2011-04-11 |archive-date=2013-10-07 |archive-url=https://web.archive.org/web/20131007144837/http://lwn.net/Articles/428584/ |url-status=live }}</ref> In addition, the preformatted file system may use a cluster size that matches the erase region of the physical memory on the card; reformatting may change the cluster size and make writes less efficient. The SD Association provides freely downloadable SD Formatter software to overcome these problems for Windows and Mac OS X.<ref name=sdfmt>[https://www.sdcard.org/downloads/formatter/ SD Formatter 3.1 for SD/SDHC/SDXC] {{Webarchive|url=https://web.archive.org/web/20210207122439/https://www.sdcard.org/downloads/formatter/ |date=2021-02-07 }}, SD Association</ref> SD/SDHC/SDXC memory cards have a "Protected Area" on the card for the SD standard's security function. Neither standard formatters nor the SD Association formatter will erase it. The SD Association suggests that devices or software which use the SD security function may format it.<ref name=sdfmt/> ===Power consumption=== The power consumption of SD cards varies by its speed mode, manufacturer and model.{{citation needed|date=September 2023}} During transfer it may be in the range of 66β330 mW (20β100 mA at a supply voltage of 3.3 V). Specifications from [[TwinMOS|TwinMOS Technologies]] list a maximum of 149 mW (45 mA) during transfer. Toshiba lists 264β330 mW (80β100 mA).<ref>{{Citation | url = http://www.toshiba-memory.com/en/micro_sd_cards.html | contribution = microSD & microSDHC Cards | publisher = Toshiba | title = Memory Solutions | access-date = 2011-02-27 | archive-date = 2013-08-18 | archive-url = https://web.archive.org/web/20130818222944/http://www.toshiba-memory.com/en/micro_sd_cards.html | url-status = dead }}</ref> Standby current is much lower, less than 0.2 mA for one 2006 microSD card.<ref>{{Citation | url = http://www.dtt8.com/images/micro-sd%20specification.pdf | publisher = DTT | title = Micro SD specification | url-status = dead | archive-url = https://web.archive.org/web/20130207004550/http://www.dtt8.com/images/micro-sd%20specification.pdf | archive-date = 2013-02-07 }}</ref> If there is data transfer for significant periods, battery life may be reduced noticeably; for reference, the capacity of smartphone batteries is typically around 6 Wh (Samsung Galaxy S2: 1650 mAh @ 3.7 V). Modern UHS-II cards can consume up to 2.88 W, if the host device supports bus speed mode SDR104 or UHS-II. Minimum power consumption in the case of a UHS-II host is 720 mW.{{citation needed|date=September 2023}} {| class="wikitable" style="text-align:center" |+ Card requirements in different bus speed modes<ref>{{Citation | url = https://docs.google.com/viewer?url=https://www.sdcard.org/downloads/pls/simplified_specs/part1_410.pdf | contribution = SD Specifications Version 4.10 | publisher = SD Association | title = 3.10.5 β Summary of Bus Speed Mode for UHS-II Card | access-date = 2013-09-01 | archive-date = 2013-10-29 | archive-url = https://web.archive.org/web/20131029011727/https://docs.google.com/viewer?url=https://www.sdcard.org/downloads/pls/simplified_specs/part1_410.pdf | url-status = live }}</ref> |- ! Bus speed<br />mode !! Max. bus<br />speed<br />[MB/s] !! Max. clock<br />frequency<br />[MHz] !! Signal<br />voltage<br />[V] !! SDSC<br />[W] !! SDHC<br />[W] !! SDXC<br />[W] |- | HD312 || 312 || 52 || 0.4 || β || 2.88 || 2.88 |- | FD156 || 156 || 52 || 0.4 || β || 2.88 || 2.88 |- | SDR104 || 104 || 208 || 1.8 || β || 2.88 || 2.88 |- | SDR50 || 50 || 100 || 1.8 || β || 1.44 || 1.44 |- | DDR50 || 50 || 50 || 1.8 || β || 1.44 || 1.44 |- | SDR25 || 25 || 50 || 1.8 || β || 0.72 || 0.72 |- | SDR12 || 12.5 || 25 || 1.8 || β || 0.36 || 0.36 / 0.54 |- | High Speed || 25 || 50 || 3.3 || 0.72 || 0.72 || 0.72 |- | Default Speed || 12.5 || 25 || 3.3 || 0.33 || 0.36 || 0.36 / 0.54 |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)