On Wed, 08 Jun 2005 13:19:51 -0000, soren_t_hansen wrote: >--- In lpc2000@yahoogroups.com, Sridhar gadda <sridhargadda@y...> wrote: >> Hello, >> >> I want to write a program which stores a variable in RAM >so that when processors get reset, the stored value in RAM should not >loose data. Again after reset the processor, I want to read the >variable. I am using lpc2129 and ULINK for downlaoding firmware. Can >any one suggests me how to proceed ?? does someone encounterd this >problem before ?? >> >> I am looking forward to your replies >> >> best regards, >> >> Sridhar >The RAM looses its content in a reset. If you want your program to >hold variables after a reset, you have to store them in Flash. >Best Regards >Soren Soren Not necessarily. Static RAM loses it contents on power loss but not on processor reset. Sridhar can accomplish what he desires by creating a new memory segment that is not initialized by the processor during the boot process and place the desired variables in that memory segment. I would suggest adding a CRC or checksum to confirm the values are correct and checking it just after coming out of reset. If the check fails, then default values should be used. The details of creating the memory segment and placing variables are specific to the compiler and linker used. Regards -Bill Knight R O SoftWare & http://www.theARMPatch.com
Message
Re: [lpc2000] Re: Storing in RAM
2005-06-08 by Bill Knight
Attachments
- No local attachments were found for this message.