<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>RTC RAM problem of LPC2378</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/23570/rtc-ram-problem-of-lpc2378</link><description> 
Dear all 
I am storing some variable(normal variable, unsigned char ,int, float
,char Array etc.) in RTC RAM. 
After some time processor stop execuation.If I delete all RTC RAM
variable from program,and downloading hex file again.but still it is
not</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: RTC RAM problem of LPC2378</title><link>https://community.arm.com/thread/125220?ContentTypeID=1</link><pubDate>Wed, 28 Jan 2009 04:20:02 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bfa9ce0a-342f-484a-8d41-046dcd0fa63d</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
You clear the battery-backed RAM just like you clear any other
RAM:&lt;/p&gt;

&lt;pre&gt;
memset(NVRAM_PTR,0,NVRAM_SIZE);
&lt;/pre&gt;

&lt;p&gt;
The NXP datasheet contains information how to use IAP to write to
flash sectors. You do not use flash sectors to store &amp;quot;variables&amp;quot;,
since the flash supports a limited number of write cycles, and you
have to erase the flash sector before writing to it. But the flash
sectors are excellent for storing configuration.&lt;/p&gt;

&lt;p&gt;
By removing the battery, the contents in the RAM will deteriorate.
But there is no guarantee that the RAM will end up in any given
state. All you are allowed to know is that after removal of the
battery, the RAM will be in an unknown state.&lt;/p&gt;

&lt;p&gt;
But as I have already said: You should not worry so much about how
to erase the RAM - you should worry about writing an application that
works even with broken contents in the RAM. Any other solution is a
broken solution. Since the result of using a broken pointer is fatal,
you should avoid storing pointers in this RAM - and if you do, you
should then &amp;quot;protect&amp;quot; your pointers by a high-end checksum so you can
decide with a very high probability if the pointer values are valid
or if they are broken.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC RAM problem of LPC2378</title><link>https://community.arm.com/thread/114631?ContentTypeID=1</link><pubDate>Wed, 28 Jan 2009 03:15:05 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e0dfc382-6e41-4f46-b5ac-1eda0b350450</guid><dc:creator>shyam ST</dc:creator><description>&lt;p&gt;&lt;p&gt;
yes I am storing pointer variables in battary backup ram.I am
using silver-oxide button cell for battary power.&lt;br /&gt;
&lt;b&gt;Can u tell me how to use flash sector for storing user
variables?&lt;br /&gt;
and also tell me how to errase RTC ram?&lt;br /&gt;
by removing battary cell is it possible to errae battary back up
ram?&lt;/b&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC RAM problem of LPC2378</title><link>https://community.arm.com/thread/101587?ContentTypeID=1</link><pubDate>Wed, 28 Jan 2009 02:51:19 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9766ba54-f4f6-48d6-a50a-b225e39fbe63</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Are you storing pointers in the battery-backed RAM?&lt;br /&gt;
You should try to just store configuration (even better to use a
flash sector for this) and state information that must survive a
reboot or power loss in the battery-backed RAM.&lt;/p&gt;

&lt;p&gt;
Your application _must_ be written in a way that main() starts to
validate the contents before it may start to use it. If the contents
is found to be broken (for example not matching a crc-32 evaluatinon)
your program should explicitly clear all variables and set them to
suitable default values.&lt;/p&gt;

&lt;p&gt;
When you release an application, that application must survive
even if you get random bits that loose their contents in the
battery-backed RAM. Maybe you are using a super-cap that can supply
power for hours up to weeks. But when the voltage goes down, you will
get bit errors. Possibly you have a lithium or silver-oxide button
cell. But if the user replaces that battery, they may do it just fast
enough that you get a partial loss of data.&lt;/p&gt;

&lt;p&gt;
A program that does not survives this is a dangerous
program...&lt;/p&gt;

&lt;p&gt;
So, keep update your application until it can start and run no
matter what contents you have in this RAM.&lt;/p&gt;

&lt;p&gt;
By the way - exactly how are you powering the nonvolatile RAM?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC RAM problem of LPC2378</title><link>https://community.arm.com/thread/77113?ContentTypeID=1</link><pubDate>Wed, 28 Jan 2009 02:22:25 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c8c06844-c315-46df-a6bf-4e98f327f5fb</guid><dc:creator>shyam ST</dc:creator><description>&lt;p&gt;&lt;p&gt;
Dear sir&lt;br /&gt;
Yes I am powering battary backup ram.&lt;br /&gt;
Shall it create problem for execuation when i loaded battary back up
ram with lots of variable?&lt;br /&gt;
I think few pointer variable are creating problems.&lt;br /&gt;
shall I am right?&lt;/p&gt;

&lt;p&gt;
After processor stops its execuation When I will get normal
operation of processor?&lt;br /&gt;
If eraseing RAM but how to erase it?&lt;/p&gt;

&lt;p&gt;
regards&lt;br /&gt;
Shyam t&lt;br /&gt;
Pune India.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC RAM problem of LPC2378</title><link>https://community.arm.com/thread/55289?ContentTypeID=1</link><pubDate>Wed, 28 Jan 2009 01:48:47 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:583f1195-2e1e-4149-a41c-af5eccbae8cf</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Are you powering the battery-backed RAM?&lt;/p&gt;

&lt;p&gt;
By the way - if your program keeps variables that should survive a
power loss, you must also write your application so it can detect if
the RAM has valid content. There is no configuration bit available
that will magically tell if the RAM has been initialized or not, or
if the power loss has been too long so a supercap has discharged too
low.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>