<?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>RTC0 IRQ/event on overflow?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16639/rtc0-irq-event-on-overflow</link><description>In my project I need to be able to get time from a continuously running RTC. The softdevice uses RTC0, and app_timer uses RTC1 (and starts and stops it). 
 (annoyingly I have to support nRF51 and nRF52 so I can&amp;#39;t just use RTC2) 
 I&amp;#39;ve been using RTC0</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Sep 2016 14:15:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16639/rtc0-irq-event-on-overflow" /><item><title>RE: RTC0 IRQ/event on overflow?</title><link>https://devzone.nordicsemi.com/thread/63647?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2016 14:15:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:206fcd0b-84d6-4667-bd2a-2b9b4121d066</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Thanks - looks like a great solution. It&amp;#39;s a shame it requires app_timer changes though - it&amp;#39;s hard enough changing SDK versions even without having modified anything!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC0 IRQ/event on overflow?</title><link>https://devzone.nordicsemi.com/thread/63646?ContentTypeID=1</link><pubDate>Sat, 24 Sep 2016 22:37:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a090c5e4-4b0a-45dd-bebb-acd0bd49a83d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;please go through &lt;a href="https://devzone.nordicsemi.com/question/53893/best-way-to-implement-system-clock-on-nrf51/"&gt;this&lt;/a&gt; thread. @clemtaylor has implemented a good way of counting the overflows mostly using LFCLK. Even though the solution is on older SDK, it should not be too many API changes in app_timer in latest SDK&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC0 IRQ/event on overflow?</title><link>https://devzone.nordicsemi.com/thread/63645?ContentTypeID=1</link><pubDate>Sat, 24 Sep 2016 15:23:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96c35852-689d-4bec-bd5c-dec13000c468</guid><dc:creator>butch</dc:creator><description>&lt;p&gt;Queueing a &amp;lt;512 second repeating timer is a simpler solution than I had in mind.  The handler would tick the long-running clock MSB.  But wouldn&amp;#39;t you need to start it so that it expired exactly when the RTC rolls over?  I don&amp;#39;t understand why the RTC would stop (if the app_timer library is bulletproof)?  But it would be nice to have an existing implementation of a long-running clock (using app_timer) that is provably correct.  In my case I am not using SoftDevice, so I can use the RTC that app_timer is not using, at the expense of more current.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC0 IRQ/event on overflow?</title><link>https://devzone.nordicsemi.com/thread/63644?ContentTypeID=1</link><pubDate>Sat, 24 Sep 2016 14:07:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b8b453d-54e4-4864-8bce-d438db0d018d</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;Yes - enhancing app_timer would be really good. I guess simply queuing a &amp;lt;512 second repeating task would probably be fine, but some kind of example of doing this would be really helpful (especially to give me a bit more reassurance that the RTC would never stop).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC0 IRQ/event on overflow?</title><link>https://devzone.nordicsemi.com/thread/63643?ContentTypeID=1</link><pubDate>Sat, 24 Sep 2016 11:33:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b251691-8c91-4a61-a3f5-74cae04de4e8</guid><dc:creator>butch</dc:creator><description>&lt;p&gt;I have the same need.   I think this is a request for an enhancement to app_timer: even if the app does not have any timers running, app_timer should generate an event/callback when the RTC rolls over so that the app can keep a long-running (64-bit) clock.  Lacking that enhancement, as Gordon says, the app needs to always have a timer running with timeout less than 512 seconds.  The handler for that timer checks the counter of the RTC to determine whether it has rolled over, and makes appropriate &amp;quot;ticks&amp;quot; on the high order bits of the long running clock.  The timer must be for less than 512 seconds else the RTC rolls over twice, missing a tick on MSB of the long running clock.  Maybe the request is for a long running clock library that wraps or cooperates with app_timer library.  Or the request is for a reference to example code for a long-running clock that uses app_timer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC0 IRQ/event on overflow?</title><link>https://devzone.nordicsemi.com/thread/63642?ContentTypeID=1</link><pubDate>Sat, 24 Sep 2016 09:12:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33dbdeb3-2751-4238-9aec-2305159fa4a6</guid><dc:creator>Gordon</dc:creator><description>&lt;p&gt;ok, so what&amp;#39;s the suggested solution for getting a usable RTC for getting the time on an nRF51? It seems like a common thing to want to do.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC0 IRQ/event on overflow?</title><link>https://devzone.nordicsemi.com/thread/63641?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2016 19:18:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39b092b3-cb51-47c6-9f51-7af220a5a22c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;You are right that the softdevice is using RTC0 and you are not allowed to use it in anyways unless you use &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.sds%2Fdita%2Fsoftdevices%2Fs130%2Fconcurrent_multiprotocol_tsl_api%2Fconcurrent_multiprotocol_tsl_api.html"&gt;TImeslot API&lt;/a&gt;. How are you using RTC0?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>