Re: EEPROM guarantees after power loss during a write



Arlet <usenet+5@xxxxxxxxxx> writes:

On Feb 8, 11:58 am, John Devereux <jdREM...@xxxxxxxxxxxxxxxxxx> wrote:

I would still love to know, for sure, that a write to part of a page
does not involve an internal erasure of the entire page. Without
knowing this each version stamp needs a page of its own as far as I
can see. The act of writing the version number must be guaranteed not
to upset the data it refers to, if it gets interrupted.

I think I will have to try and test this.

To test the system, you could make a simple test jig that switches the
power to your board. Use another controller to switch the power in
random intervals. The random interval timing should match the
discharge rate of the power supply capacitors such that the board
suffers a lot of brown out conditions. Add an extra R/C filter if
necessary.

On the device you're testing, set up some special firmware that
continously writes updates to the EEPROM. Instead of real data, write
a verifiable test pattern, and have the software check it regularly.
If it finds corrupted data in a 'valid' block, trigger an alarm.

Then leave the test setup in a corner of the lab, 24/7.

That sounds like a good idea to test a finished routine.

But to get the initial information needed to write it, I am thinking
of this:

- Hack the electronics so the EEPROM can be powered from an output
pin
- hack my eeprom_write routine so that a timer can interrupt power to
the EEPROM and hold the I2C pins low (so the eeprom is definitely
unpowered).

That allows the timer to interrupt programming using a precise time
delay that I can sweep though a range of values. For each value I can

- print the eeprom page contents (to a serial port)
- reprogram the entire page with a test pattern
- start the timer and the page programming test
(different pattern, only alters part of page)

I should be able to see any partial erasures, partial programming, and
also any erasure of bytes on the same page outside of the program
area.

Perhaps I would printout extra regions like address 0 and parts of
adjacent pages.

This does not simulate a real system since there is no "brownout"
state. So I still need something like your setup as a final
verification.

--

John Devereux
.



Relevant Pages

  • Re: EEPROM checksum error
    ... Think about the programming sequence. ... You just assume that the power comes up all at once, ... > I'm guessing your example eeprom wasn't one of these, ... Atmel EEPROM AT25128 is used in the radio. ...
    (sci.electronics.design)
  • Re: EEPROM checksum error
    ... Think about the programming sequence. ... You just assume that the power comes up all at once, ... > I'm guessing your example eeprom wasn't one of these, ... Atmel EEPROM AT25128 is used in the radio. ...
    (sci.electronics.basics)
  • Re: Writing to EEPROM
    ... I am programming 89LPC932 in assembly using Keil uVision V2.40a. ... application is countng 500hrs and giving a output high for 10 seconds. ... And the data should be loaded when power returns ... long enough to write the information to the EEPROM. ...
    (sci.electronics.design)
  • Re: Encrypting Harddisk?
    ... > motherboards eeprom. ... Any service interruption in the webcam coverage, motion, power interruption, ... If you want to get wacko about it, use the really *old* aluminum disk packs ... the disk, finely spraying the case with finely powdered, fresh, ...
    (comp.os.linux.security)
  • Re: Encrypting Harddisk?
    ... > motherboards eeprom. ... Any service interruption in the webcam coverage, motion, power interruption, ... If you want to get wacko about it, use the really *old* aluminum disk packs ... the disk, finely spraying the case with finely powdered, fresh, ...
    (comp.os.linux.security)