[En-Nut-Discussion] Non-Volatile user data

Kowalsky, Richard richard.kowalsky at fluke.com
Sun Dec 4 18:08:55 CET 2005


 Hello,

I have a custom ATMEGA-128 board I am using with 64K of external battery backed up RAM attached and Ethernut 3.9.8.

In my application I have a lot of variables that hold user data. For example, in my main source file I declare global space for user specified analog alarm limits and messages as shown:

#include "stuff"
/* Declare an analog limit structure for each of the posible analog channels */
ANALOG_MONITOR aMon[MAX_ANALOG_ALARMS];
/* Declare a digital monitor structure for each possible digital monitor bits */
DIGITAL_MONITOR dMon[MAX_DIGITAL_ALARMS];
/* Storage for canned messages */
char message[MAX_MSGS][MAX_MSG_LEN];
---------------------------------------------------------------------
My question is, how can I set things up so that if my application is restarted, the global variables retain any values that were previously stored in them?  I guess, on thinking about it more, if they are stored in the battery backed up external RAM, they are automatically non-volatile. (unless you change the battery).
Does that sound correct?   Obviously I need to make sure that those variables are stored off-chip in the backed-up external RAM.  How do I do that?
Any thought would be appreciated.  I Love Ethernut, it's really cool!.
Richard


This message (including any attachments) contains confidential 
and/or proprietary information intended only for the addressee.  
Any unauthorized disclosure, copying, distribution or reliance on 
the contents of this information is strictly prohibited and may 
constitute a violation of law.  If you are not the intended 
recipient, please notify the sender immediately by responding to 
this e-mail, and delete the message from your system.  If you 
have any questions about this e-mail please notify the sender 
immediately.  
 
Ce message (ainsi que les eventuelles pieces jointes) est 
exclusivement adresse au destinataire et contient des 
informations confidentielles. La copie, la communication ou la 
distribution du contenu de ce message sans l'accord prealable de 
l'expediteur sont strictement interdits et peuvent constituer un 
delit. Si vous n'etes pas destinataire de ce message, merci de le 
detruire et d'avertir l'expediteur. Si vous avez des questions se 
rapportant a ce courrier electronique, merci de bien vouloir 
notifier 
l'expediteur immediatement.


More information about the En-Nut-Discussion mailing list