How often can I write the EEPROM ?

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I'm not sure if this a general question or Xmega specific, but how many write cycles are possible on the internal EEPROM of the Xmega ? I'd like to save some counters in rather short time and every minute and am not sure if that memory survives this a long time.
thank you,

mat

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Surely it's 100,000 per cell like in the previous AVRs? You can, of course, do wear levelling to spread the writes.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I thought about that too, but how to realize it in a practical way, the storage address has to be stored somewhere too. Do you have a suggestion ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Assuming (for example) that your timer values are in uint32_t and they never hold 0xFFFFFFFF then you could use the fact that erased EEPROM holds 0xFFFFFFFF. So to find the "next space" to use at power on you just search until you find four 0xFF's and use that "slot" next. When you get to the end of the EEPROM erase the lot and start back at the beginning - this spreads the writes across the entire EEPROM.

(if you do need to store 0xFFFFFFFF then you will need to think a bit more ;-))

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

XMEGA D3 data sheet 30.4 Flash and EEPROM Memory Characteristics shows 80K cycles for EEPROM at room temperature.
One alternative is M-RAM (via SPI, or, 1+ ports); it has no cycle limit and is non-volatile.

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thank you,
that sounds interesting, I have found only one manufacturer for M-RAM yet, "everspin" they have some SPI chips. Do you mean there is a part with something like one-wire ? Can you give me a link maybe ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I have found only one manufacturer for M-RAM yet,

Look also to Ramtron's FRAM.

But in this day and age I'd just interface to an SD/MMC memory card I think. The storage will be virtually limitless and you can use FAT and let the card controller handle the wear levelling.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mzeu wrote:
... "everspin" they have some SPI chips.
And also chips with SRAM interfaces (use XMEGA A1's EBI, or, parallel via ports on other XMEGAs).
mzeu wrote:
Do you mean there is a part with something like one-wire ?
Not that I'm aware of for MRAM. For 1-wire there is the 200K cycle (room temperature) 1kbit EEPROM DS2431: http://datasheets.maxim-ic.com/en/ds/DS2431.pdf
clawson wrote:
Look also to Ramtron's FRAM.
Yes indeed. Been around longer than MRAM.
clawson wrote:
... SD/MMC ...
Definitely much lower price per byte to use its flash versus EEPROM (one USD for SD?) The concerns for mzeu's application could be form factor and power usage. Though could mount a microSD, an FRAM/MRAM CSP/SOT/SOIC is likely easier though eMMC (MMC in a chip) is another option. Chip versus SD's "chip", MRAM or FRAM may have lower power consumption. SD/MMC is easier to use due to the amount of off-the-shelf software available for it.

"Dare to be naïve." - Buckminster Fuller