This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

EEProm write time



I new of TM4C123AH microcontroller.

I need to use the EEprom module for write data.

The write operation will take place when I am about to turn off (detected by analog input), so I need to to know the exatcly maximum time of writing.

Reading the datashhet (Table 22-24. EEPROM Characteristics), the time depend from buffer space, endurance and number of cycle.

I do not understand what you mean by endurance and cycles. The write time depend on the number of the times written ?

Plase can explain me the write access.

Thanks

  • Hello Stefano

    The EEPROM on TM4C devices is emulated over flash (not be confused with the main program flash). Hence a series of structures are designed in HW state machine that will allow a Flash with 50K program erase cycles to be able to withstand 500K program erases.

    As the program and erases are done over lifetime of a flash, the cells become weak in holding charge and this changes the time it takes to program/erase them making the EEPROM write time not very consistent over extended periods.

    Regards
    Amit
  • The short answer is yes. Amit has explained why.

    That, I think, leaves you with two options.

    The first is to design a hold-up supply for the longest write time. this involves not just a single write but presumably also the write of a checksum and maybe a mirrored copy as well. That's some security against corruption. This size of supply is likely to be expensive.

    The second is to use a faster external non-volatile memory. My preference would be FRAM since its write times are in nS and it has a very high endurance. That means your hold-up supply can be much smaller. This can be put on the SPI bus and with 20MHz write speeds your write window becomes quite small. You could also use SPI based EEPROM, your write time would increase by 5 or 6 orders of magnitude and your write routines need to have waits added but it would still be orders of magnitude faster than the on-board memory.

    Robert

    If you feel like a doing lot of work you could use an IIC EEPROM/FRAM but it is slower.

  • Posts are being moderated now?
  • Hello Robert,

    Excellent options. May be the I2C application note with FRAM memory device and code would help the user.

    Regards
    Amit
  • The problem of the timing is also that after 6 single write of 100 mic.sec is execute the erase and the time pass a 8 ms !!!
    If at the start, after reading the eeprom i execute a masserase i think that i solve the problem, but i have reduced the eeprom life !

    Regard

    Stefano
  • Hello Stefano,

    Yes that is correct. Let the EEPROM controller handle the erase program. I have seen noticeable difference on time it takes to erase and program almost after 2 days of non stop EEPROM access (nothing but EEPROM write and reads)

    Regards
    Amit
  • Umm, I think you need to re-read the timing.

    From my copy of the datasheet

    Program time for 32 bits of data - requires a copy to the copy buffer, copy buffer requires an erase and greater than 90% of
    EEPROM endurance used --> 1800 ms

    Even if you limit yourself to the low endurance case

    Program time for 32 bits of data - requires a copy to the copy buffer, copy buffer requires an erase and less than 10% of
    EEPROM endurance used --> 60 ms nominal (note they do not specify the maximum in this case).

    You have to budget for a lot longer than 8mS. I would say if you use the internal EE and want to detect and avoid writing during a powerdown you need to budget a 2s hold-up. If you want to write after a powerdown it's much larger.

    Robert
  • I have changed idea, I use the flash instead the EEProm, the program time is 300 µsec maximum.

    At the power up, I read the Flash and after I execute a mass erase  in this way, when I need to write the maximum time is 300 µsec.


    Correct ?

  • According to my experiences, a maximum of 300us for Flash/EEPROM programming seems a little low. Most of the Flash I came across specifies several milliseconds. BTW, EEPROM is today just a kind of 'specialised' Flash, with single byte access and trimmed for higher durability (erase/write cycles). But otherwise they are usually the same.

    Another point to note - Flash performance very much depends on temperature. Expect the maximum write cycle time for tempreratures near the specified limit. Also, wear increases the write cycle time, and chip operation at elevated temperatures also increases Flash wear. The good thing is - you can expect the guaranteed number of erase/write cycles even at maximum temperature. And if your devices are less temperature-stressed, Flash endurance is much higher - usually one order of magnitude for each 10 deg. less.

    But foremost, I would evaluate the "worst"-use-case for your device, i.e. how often it can be turned on/off during your specified life time, and how many erase/write cycles would be required to guarantee it's function. I witnessed companies taking this too lightly, being punished subsequently by largely increased field returns. And as a side note, include caps (electrolytic capacitors) in this use-case evaluation. They are usually the sole energy storage for Flash writes after mains-off events, and significantly loose capacity when aging.

  • The 300 µse. is declared in data sheet pag 1214
    www.ti.com/.../tm4c123ah6pm.pdf
  • TI's approach to their EEPROM peripheral seems not so close to the hardware. I'm not quite sure what "Program time for 32 bits of data - space available" means as a last consequence, but surely this looks like the best case, with no previous erase of the cell required. Rather look at the "not so sunny" cases, which specify 30/60ms as average and 900/1800ms as maximum. I think your application must be able to deal with this times, too.

    Perhaps some TI guy can explain what such cryptic phrases like "Program time for 32 bits of data - requires a copy to the copy buffer, copy buffer has space and less than 10% of EEPROM endurance used " really mean. To me, it looks like a Flash-based emulation, with lower bus priority than instruction fetch cycles (core access to Flash).

    For a commercial device, I would abstain from using it for anything more than occasional changes. And that's not said to bash TI - other vendors provide similiar EEPROM quality ...

  • Yes, but....

    You have to consider the 1/2 s maximum erase time as well. Can you guarantee you have enough time on startup to do that? If power can start and stop you have to guarantee it will be valid long enough to start, do an erase and write the value you are storing before shutting down.

    Also the 300uS is per double word more writes will take longer.

    Robert

    With FRAM, you can write the value "continuously" (many read/write cycles available) and only need a warning of a few uS before power failure with SPI and maybe a few mS with IIC. You only need long enough to complete any current write, not to gather data and perform a write.
  • One notes how pleasurable it is to deal w/one who's, "Mind is made up."

    The external solution - fast, specified & robust - is sacrificed at the altar of, "low/no cost!"
    Seems proper that "punishment" provides a strong, corrective input... (perhaps that one will (at last) be heard & admitted...)
  • Hello Stefano,

    Mass Erase the flash? So where does the application code reside if the power failure occurs?

    Regards
    Amit
  • Sorry . . . . Page erase !! 1Kb only
  • cb1-,

    Many pursue low BOM cost under the belief that it is the same as low board cost. And they pursue low board cost under the belief it is the same as low system cost. And of course software is free and infinitely malleable at no cost. Not only developers but many corporations act this way, even while giving lip service to the contrary. I am no longer surprised by that, it seems engrained into our public morality. Still occasionally raising a hand to say that that it ain't necessarily so seems worthwhile even if not fruitful.

    Robert
  • Still occasionally raising a hand to say that that it ain't necessarily so seems worthwhile even if not fruitful.

    But it might put you on the hit list ...

  • f. m. said:
    But it might put you on the hit list ...

    And - one suspects - that would not be "first time" for we three...

    "Proceed by Refinement" lives/thrives.   (somewhere - but not this "cost-down centric" thread)