<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/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/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How to recover calendar data after a reset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4213/how-to-recover-calendar-data-after-a-reset</link><description>Dear Nordic Developer Zone, 
 I have implemented a real-time-clock using application timer which is based on the on-chip real-time counter on NRF51822. 
 A concern of mine is that after a reset due to a unpredictable error( i.e. stack error), is there</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Oct 2014 17:15:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4213/how-to-recover-calendar-data-after-a-reset" /><item><title>RE: How to recover calendar data after a reset</title><link>https://devzone.nordicsemi.com/thread/15039?ContentTypeID=1</link><pubDate>Wed, 29 Oct 2014 17:15:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d53d5cb6-6a17-4d7b-9ade-43b6ea9de256</guid><dc:creator>Paul Russell</dc:creator><description>&lt;p&gt;You might need to adjust the RAM settings in the compiler to have some uninitialized RAM.
Most compilers will zero the main block of variables, but addresses declared VOLATILE may not be cleared by the compiler. If volatile or similar keyword isn&amp;#39;t supported, then check if you can adjust the RAM definitions so a few addresses at one end of RAM block are not in the initialized variable RAM block&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;may need to be absolute addresses\&lt;/li&gt;
&lt;li&gt;add the CRC as Clem suggests (even a CRC8 from a table lookup is better than no CRC).&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to recover calendar data after a reset</title><link>https://devzone.nordicsemi.com/thread/15038?ContentTypeID=1</link><pubDate>Wed, 29 Oct 2014 15:06:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5227d8ef-29c9-4c37-98e4-65bb7f4a7f6a</guid><dc:creator>Tony.X</dc:creator><description>&lt;p&gt;I agree on John&amp;#39;s point of view of wearing flash too quick if keep saving it in a fix location.
I haven&amp;#39;t tried out what&amp;#39;s RAM behavior after a reset but I think Clem&amp;#39;s approach is worth trying.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to recover calendar data after a reset</title><link>https://devzone.nordicsemi.com/thread/15037?ContentTypeID=1</link><pubDate>Wed, 29 Oct 2014 02:40:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0994a7d-90de-4991-b3bf-a426b01de3c4</guid><dc:creator>Clem Taylor</dc:creator><description>&lt;p&gt;Are the RAMs really zeroed on reset or is it just an issue that the behavior is undefined? If the ram doesn&amp;#39;t really have a global reset you might be able to stick the current time and a crc in ram someplace and at least have a chance at recovering the current time. I&amp;#39;ve done this with DRAM (filled one page with the data we wanted to keep and a 64bit CRC, repeated over and over) the data could often survive for 10s of seconds with a complete power loss. DRAM != SRAM, but it might be something to try.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to recover calendar data after a reset</title><link>https://devzone.nordicsemi.com/thread/15036?ContentTypeID=1</link><pubDate>Tue, 28 Oct 2014 19:03:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2021504e-54b9-442f-ab13-364e85021599</guid><dc:creator>John</dc:creator><description>&lt;p&gt;I would add a caveat to writing the time to flash: We don&amp;#39;t know Tony&amp;#39;s time accuracy requirement which would dictate how often he needs to save the time. If the time needs to be saved frequently, flash wear would be important. He may need to rotate the saved time through a large set of flash locations to prevent wearing out a single location. He&amp;#39;d also need a way to locate the latest time in flash after a reset. That might be simple if the time was something like a seconds since epoch counter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to recover calendar data after a reset</title><link>https://devzone.nordicsemi.com/thread/15035?ContentTypeID=1</link><pubDate>Tue, 28 Oct 2014 17:40:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:193921ad-3150-45de-a264-eb4f3cad21f8</guid><dc:creator>Asbj&amp;#248;rn</dc:creator><description>&lt;p&gt;As @scytulip says, you would have to write the value of the clock/time to flash periodically. This would save it during a reset. RAM will be lost if a reset occurs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to recover calendar data after a reset</title><link>https://devzone.nordicsemi.com/thread/15034?ContentTypeID=1</link><pubDate>Tue, 28 Oct 2014 02:27:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d81b54c-3a84-486d-a6a5-892581e833af</guid><dc:creator>scytulip</dc:creator><description>&lt;p&gt;Save time info in Flash periodically?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>