[U-Boot] at91sam9g20 MAC address in EEPROM?
Wolfgang Denk
wd at denx.de
Sat Sep 18 21:39:43 CEST 2010
Dear Reinhard Meyer,
In message <4C600C3D.3060501 at emk-elektronik.de> you wrote:
>
> > We're not concerned about u-boot's environment not being reliable, we just want the ability to completely erase the nand without worrying about losing essential data (like a MAC address). I suppose we could work around that area of the flash if/when
> erasing the nand is necessary, but then we would have to keep track of each environment variable that could be stored there.
>
> That is exactly my concern as well.
> >
> >> I have seen _way_ more cases where data in EEPROM got lost than data
> >> loss from the environment.
> >
> > That's discouraging, do you have any advice for where to store the MAC outside of nand, and not in an EEPROM?
>
> I cannot second that, we have always stored environment and vital product
> data in EEPROM (AT24C64). But VPD (includes MAC adresses) is never writen
> by u-boot; only read and made into respective setenv() variables. Check
> boards/emk/common/vpd.c for an idea.
Most people think they are safe when they only read the EEPROM. They
are under a misapprehension. If you reset the processor at the right
time within a I2C read command, and if you (or your I2C controller)
don't take special care, the next read access might cause a write
operation on that device. See doc/I2C_Edge_Conditions for details.
Note that this is NOT a theoretical case. Many people have seen this.
I had this myself with a customer who was switching to another,
cheaper power supply. Upon power on, the voltage ramp up was
relatively slow, which caused the system watchdog to reset the system
2 or 3 times because of too low voltages - and with 3 out of 5
power-ons the EEPROM content got corrupted.
If you need reliable read-only storage, use NOR.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
grep me no patterns and I'll tell you no lines.
More information about the U-Boot
mailing list