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

Damian Slee damian at commtech.com.au
Wed Jun 2 04:35:04 CEST 2004


thats what i have done.  started my db at 0x81 in eeprom.

________________________________

From: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] On Behalf Of Zheng Anding
Sent: Wednesday, June 02, 2004 10:18 AM
To: Ethernut User Chat (English)
Subject: Re: [En-Nut-Discussion] Save Data to the EEPROM


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
<http://messenger.yahoo.com/> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20040602/e4e28ae7/attachment.html>


More information about the En-Nut-Discussion mailing list