Flash memory

From Helpful
Jump to navigation Jump to search

Memory card types

📃 These are primarily notes, intended to be a collection of useful fragments, that will probably never be complete in any sense.


For different kinds of memory cards, see Common plugs and connectors#Memory_cards



Secure Digital (SD, miniSD, microSD), and MMC details

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.


Capacity types / families

  • SD (now named SDSC, 'standard capacity', to distinguish it)
    • size (somewhat artificially) limited to 1-4GB
  • SDHC (high capacity), since approx 2006
    • physically identical but conforming to a new standard that allows for higher capacity and speed.
    • adressing limited to 32GB
  • SDXC (eXtended-Capacity), since approx 2009
    • successor to SDHC that allows for higher capacity and speed
    • UHS was introduced since roughly then. Note that only some cards use UHS.
    • adressing limited to 2TB
  • Ultra-Capacity (SDUC), since approx 2018
    • limited to 128TB
  • SDIO
    • allows more arbitrary communication, basically a way to plug in specific accessories on supporting hosts - not really an arbitrarily usable bus for consumers
    • (supports devices like GPS, wired and wireless networking)



The above is partly about capacity, and partly about function. It's also not entirely aligned with SD versions, protocolwise it's even more interesting, particularly with the extra buses for the faster (UHS and Express) modes.

I think most people have list track of the details by now.




Electrically

Power is 3.3V, though there are some lower-voltage details - in particular the LVDS being lower voltage (1.8V(verify)).

(MMC had 7 pins)

SD has 9 pins before up until UHS-II

SD with UHS-II adds 8 pins for a total of 17 pins

two more LVDS pairs, and more power and ground


MicroSD has 8 pins

MicroSD with UHS-II has 17 pins

On fake flash

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

Fake flash refers to a scam where cards's controller reports a larger size than the actual storage has.


These seem to come in roughly two variants:

addressing storage that isn't there will fail,
or it will wrap back on itself and write in existing area.

...which isn't an important distinction, in that the result is just that it appears to be broken. It will seem to work for a little while, and in both cases it will corrupt later.


There are some tools to detect fake flash. You can e.g. read out what flash memory chips are in there and whether that adds up. Scammers don't go so far to fake this.

But the more thorough check is a write-and-verify test, see below.

Memory card health

This article/section is a stub — some half-sorted notes, not necessarily checked, not necessarily correct. Feel free to ignore, or tell me about it.

While memory cards and USB sticks are flash memory much like SSDs, most lack all wear leveling and health introspection.

So you should assume that they will fail completely, without warning.


At lower level, even if they are still completely readable (and that's not a guarantee), filesystems are not made to deal with write failure, so you may need special tools and/or a technical friend for recovery.


You can check whether it's still readable (non-destructive) with test consisting of "read all disk surface" (for chkdsk it's the 'scan for an attempt recovery of bad sectors" checkbox)

The only real test of whether it's fully writable is to write to all of it (necessarily destructive). But this only proves that it hasn't failed already, not that it won't soon.


One useful tool is H2testw, which creates a file in free space (if empty, then almost all the SD card)

It will also tell you actual average write and read speed, not the potential lie on the front.

And implicitly be a fake flash test.

What's stored