[En-Nut-Discussion] Save Data to the EEPROM

Zheng Anding adzheng at yahoo.com
Wed Jun 2 04:17:52 CEST 2004


I thought the first 64 bytes of EEPROM are reserved by Nut/OS and the next 64 bytes are reserved by Nut/Net, we can use the remaining 3968 bytes, according to the software manual...

Harald Kipp <harald.kipp at egnite.de> wrote:Joerg,


>I found the commands EEPROM_READ and EEPROM_WRITE.
>
>#define EEPROM_WRITE(addr,src)
>
>My problem now is to get the value for "addr". There are some constant 
>value in the examples like CONFNET_EE_OFFSET, but whats the value I need?

There's no pre-defined value, AFAIK. I recommend to
start at address 512. Anything from 0 to 511 is
weakly reserved for Nut/OS.

>Perhaps anybody knows a another way to save the Data?

No, EEPROM is the right place. Have a look into
nut/os/confos.c, NutLoadConfig() and NutSaveConfig().
This works with ICC and GCC. Note, that the value
is read before writing, which reduces wear out.
(Was it Alexander, who gave this hint?)

Harald

_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion

		
---------------------------------
Do you Yahoo!?
Friends.  Fun. Try the all-new Yahoo! Messenger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20040601/7ab89868/attachment-0001.html>


More information about the En-Nut-Discussion mailing list