<?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>RTC Registers state after soft reset and OTA.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60552/rtc-registers-state-after-soft-reset-and-ota</link><description>Hardware Description: 
 MKBN02A00 module based on nRF52832 SOC 
 Software Description 
 nRF SDK 15.2.0 , SoftDevice S112 
 Application 
 I&amp;#39;m logging sensor data in external flash memory with the timestamp. I used RTC2 to count time in the application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Apr 2020 14:46:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60552/rtc-registers-state-after-soft-reset-and-ota" /><item><title>RE: RTC Registers state after soft reset and OTA.</title><link>https://devzone.nordicsemi.com/thread/246308?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2020 14:46:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f1fc7ce-7500-458c-90a8-5db97296bbe6</guid><dc:creator>Mukesh Kumar</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;I really appreciate your quick and detailed response.&lt;/p&gt;
&lt;p&gt;Your answer was really helpful and it cleared all my doubts.&lt;/p&gt;
&lt;p&gt;Thanks a lot !!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC Registers state after soft reset and OTA.</title><link>https://devzone.nordicsemi.com/thread/246256?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2020 12:19:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88f615f6-5e89-4c3e-bb0d-882c974f1d5c</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The RTC is a peripheral, and unfortunately, all the peripherals are reset on all reset reasons, even soft resets, as you can see &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=4_2_0_17_7#unique_832471788" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;. This means that you will reset the counter whenever you reset the nRF52832. (OTA triggers several soft resets).&lt;/p&gt;
&lt;p&gt;If you want to retain the value, you can try to write it to RAM, which is never actively reset (but may reset if the nRF reset was caused by a power out or brown out). But remember that before you start up again, the RTC will not be running, so you may loose some time every time you reset. You also need to consider how often you want to copy the counter register to RAM. every minute? Every second? More often?&lt;/p&gt;
&lt;p&gt;The last option is to save the time in flash, which requires you to do flash operation every time you want to save the time. This will of course cost some power, and it is fairly slow (compared to ram, or the register itself). Perhaps an external battery driven RTC (Real time clock), and not the Real time counter that is present on the nRF is what you need, in order to keep track of time between resets and power outs.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>