chipKIT® Development Platform

Inspired by Arduino™

SD card lifecycle

Created Thu, 28 Aug 2014 15:55:03 +0000 by tcsaba101


Thu, 28 Aug 2014 15:55:03 +0000

I am browsed to get answer but haven't got the right one. I found 100.000 write cycle or 10 years. If I log in 1s resolution for full day will yield 86400 records, close to the life cycle. It sounds quite bad at first.

It is also written somewhere there is an embedded control logic what is organising the cell write cycles to have even distribution of the cell usage.

For exaple in my case 1 record is about 20 bytes.

If there is a perfect distribution controller, 20 byte can be written to a 2GB card 100M times, touching once every cell, and it can be done in 100.000 cyles. So I can write on the card 10T record of my application till the expected life cycle. This is more than 3000 years if continously logging at 10ms resolution. And the 32GB card.....

Looks like the 10 years is the expected life cycle.

This sounds good, if I am right.


Thu, 28 Aug 2014 16:27:32 +0000

It's 100,000 times that you can erase each individual bit. That is if the bit is 0. An erased bit is 1, so if it is already 1 then erasing has no effect.

So logging data, as long as you are adding to the data, not replacing it, never involves erasing per se. All that ever gets erased is the FAT entry for the file to change the size and block allocations.

And yes, the SD card has "wear levelling" logic in it to minimize the number of erases of any one cell.


Thu, 28 Aug 2014 19:31:22 +0000

So the reality is better (it is rare in life!) because a write to the cell is an erase or keep the state = doing nothing. Depending on the data content the life cycle can extend.

The question is the FAT area. Is this also included in the "wear levelling" or not?

Probably it depends on manufacturer how efficient the levelling works. Which brans are the innovators in SD tech?

The conclusion: I don't worry anymore to make 100ms sampling on a DUT for 10 days, repeating on 10 DUTs. And that card still will serve for the 10 years lifecycle.

I was thinking to make a "differential logging": when the log will be made if data change more than 5% compared to the prevoius sample or the last period average. This log then needs a "software recondition" before analysis.

The SD wear out level producing HW cost, the additional coding is software cost, what I have to create and debug.

I decided fast: I will do the 100ms dumb logging and drink a beer instead of coding. It is more comfortable.

Good night!


Thu, 28 Aug 2014 20:41:31 +0000

I think that's a fantastic idea. Who knows, you might hit the ballmer peak and create your differential logging system ;)

The FAT area is part of the filesystem, not the SD card - the SD card has no concept of it. It just sees it as data just like any other area. It undergoes the same wear levelling as the "normal" data.

I'm not sure off hand, but the 10 year value you are quoting might be the "data retention" time - i,e, how long the data will last on the SD card if you leave it in the back of a drawer doing nothing.


Fri, 29 Aug 2014 04:08:28 +0000

Yesterday the performance was out of the "ability peak" area, the differential logging still on the to do list. :)

The 10 years is the data retention period as you noted.

As a conclusion about what we can expect from an SD card:

  • 10 years data storage (depends on temperature and static environment)
  • i have found post about case when the SD was washed in washmasine more than once and survived, so in some cases waterproof. ;)
  • the actual write cycles should be calculated based on the size of the data written to. I suppose the 100.000 cycle is regarding to huge files, when the size is close to the card's storage space. As the file /record size is decreasing the practical write cycles are increasing.


Mon, 08 Sep 2014 10:07:29 +0000

I do not think your 100k writing endurance estimation into a single cell is correct. I would rather expect <5000 (with the modern flash fab process used). Seems bad, but the cards do "wear leveling". Btw, the latest SSD disks have got ~1000 per cell.

I would expect following (for example):

  1. card size 4Gb
  2. amount of written data per day 2Gb
  3. the card may last for 4Gb/2Gb*5000 = 10000 days.

PS: you cannot compare high density flash memories with those used in the Mcus. Mcu ones can do 1k - 100k based on the vendor/fab process etc.
The larger the fab node (in nanometers) and simpler flash technology (ie. 1bit pre cell), the more times you can write it over. The Mcu's flash mems store 1 bit per flash cell and the fab is 90-350nm (typical endurance 10k-100k). The >Gb large flash mem chips are 20-65nm, and can store up to ~4 bits in a single flash cell (they measure the charge in the flash cell capacitor with an 4 bit adc). Therefore the single cell life expectancy is something like 500-1000 writings with the latest technology, and the tendency is negative :(. I would personally count with 1000 for the flash memories (sdcards) in >Gb range.


Mon, 08 Sep 2014 18:33:13 +0000

Thanks for this professional answer.

10.000 days still over the expected life time, but to undersatnd the theory is important.

This means the larger cards are better for big size records/files. The smaller for smaller files to have the maximum performance.

There should be an optimum for a given data size which card lasts the longest:

  • small cards have 1 bit cells will have more write cycles,
  • large cards have multiple bit cells but less cycles for the same amount of data.

The manufacturers should specify for expected write cycles of different data sizes.