NAND vs SD on GTA02

Michael Sokolov msokolov at ivan.Harhan.ORG
Sat Sep 24 02:42:07 CEST 2011

Hello again,

As I was browsing through the Om community documentation, I saw a note
somewhere (I think it was somewhere in the wiki, but I have a hard time
finding it again) saying that the native NAND flash on the GTA02 should
not be used for anything but the bootloader, and that the OS/distro
should live on the micro-SD card instead.  No explanation was given as
to why.  I wonder, would anyone here happen to know the rationale for
that recommendation?  And does the Om community actually follow that
recommendation?  Where do most GTA02 users keep their OS/distro: NAND
or micro-SD?

Unless I'm missing an elephant somewhere, my common sense suggests that
JFFS2 on the native NAND ought to be much more convenient: SD is a
serial bus, and it hangs off the Glamo on the GTA02, whereas the native
NAND is, well, native, it's right there inside the MCU.  It also seems
to me that the native NAND ought to be an outright win in terms of power
management: NAND is powered from the IO_1V8 rail which is fed from a
switching converter in the PMIC, whereas SD is powered via an HCLDO at
3.3 V.  The IO_1V8 supply has to stay on all the time anyway as it keeps
the SDRAM in self-refresh, so whatever tiny idle current the NAND draws
is going to be the same whether one uses it to store a file system or
not.  But for the SD one needs 3.3 instead of 1.8 V, the linear regulator
is inherently more wasteful than a switcher, and what happens when the
battery voltage falls below 3.3 V?  If I've read the PMIC datasheet
correctly, one ought to be able to keep running a GTA02 on battery until
it goes down to almost 2.8 V: I reason it ought to be doable with NAND,
but not with SD.

The only truly valid reason I've been able to come up with for using SD
instead of NAND is flash wear concerns.  As all good embedded system
engineers know, NAND flash is finicky: you've got read disturb, program
disturb, and a limited number of erase cycles in each block.  Of course
the actual physics of NAND flash is exactly the same whether you use it
directly or if it's hidden from you behind an interface like SD.  The
actual "magic smoke" in those SD cards, USB sticks etc is the exact same
NAND which people dislike using directly; the only difference is that
with native NAND you as a Linux developer get to implement the necessary
algorithms yourself (JFFS2 et al) in a fully visible, free / open source
manner, whereas with SD cards etc someone else has done that work, in
the form of a closed source circuit which you have no visibility into.
I tend to agree with Linux MTD maintainer dwmw2's preference of doing it
all yourself with JFFS2 et al.

Of course the underlying problem of flash wear exhaustion remains there:
no matter how good your flash management algorithms are, eventually the
available number of erase/program cycles will be exhausted for more
blocks than the maximum number of bad blocks one can tolerate.  What do
we do then?  This concern is the ONLY area where I can see an advantage
with SD: once the micro-SD card's flash wear cycles have been exhausted
(forgetting for the moment that you can't actually depend on the card
reporting this condition to you), you simply throw that card in the
trash and get a fresh one.  OTOH, if you exhaust the available erase/
program cycles for the NAND flash inside that oddball Samsung chip on
the GTA02, getting a replacement chip and getting it swapped out on the
board would be problematic.

Hence my question to the community: is the flash wear-out concern I've
just outlined the primary reason for the recommendation of using SD
instead of NAND to hold the OS/distro, or was that recommendation driven
by some other, completely unrelated concerns?  Has anyone here actually
exhaused the available number of flash erase/program cycles, on any HW
platform, ever?  (I personally haven't, in my ~10 y of doing embedded
Linux work on various systems: I know from the physics and from device
datasheets that the number is finite, I just haven't had a personal
experience exhausting it.)

Just trying to figure out whether I should use NAND or SD to store the
OS/distro on my GTA02 (when I get it), and have a rationale for that

And if I do end up wearing out the NAND flash in the Samsung ARM chip on
my GTA02...

Dr. H. Nikolaus Schaller <hns at> wrote:

> For us, the GTA02 devices have mostly become sources for plastic parts [...]

So when you cannibalize a good GTA02 for its plastic parts (for use with
a GTA04 board or whatever), what happens to the good GTA02 PCBA?  I hope
you don't throw them out, do you?  Perhaps those boards could be made
available to those hapless GTA02 users who have worn out their NAND
flash?  Developing a new from-scratch distro generally involves a lot
more reloading of the flash than a normal user would do...

And while we are on that subject, I wonder, how many of these new-in-box
GTA02 devices are still left?  At what rate is this legacy stock being
depleted?  (Unless you consider that a business secret, of course...
But methinks the community has a right to know.)


More information about the community mailing list