<?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 get count, App Timer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/1847/rtc-get-count-app-timer</link><description>Hi,
I am trying to understand how can I have a running counter based on the low power 32.768 KHz oscilator that does not trigger any timeout interrupts (I am using the soft device). I am thinking there should be some way by which I can start the counter</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Mar 2017 22:37:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/1847/rtc-get-count-app-timer" /><item><title>RE: RTC get count, App Timer</title><link>https://devzone.nordicsemi.com/thread/8003?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2017 22:37:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca5e8963-5c67-4e86-8991-a8bc651a336c</guid><dc:creator>Brantel</dc:creator><description>&lt;p&gt;Can&amp;#39;t delete&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC get count, App Timer</title><link>https://devzone.nordicsemi.com/thread/8006?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2016 10:31:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0955c780-c50b-465e-8c55-7d2b44e6d58b</guid><dc:creator>Ankush</dc:creator><description>&lt;p&gt;Hi Ole,&lt;/p&gt;
&lt;p&gt;I just seen this post and your comment is useful to me.Can you tell me specifically, how can I read counter register of real time counter without activating any interrupt? can I simply get value from this &amp;quot;tempvar = NRF_RTC0-&amp;gt;COUNTER register&amp;quot;?&lt;/p&gt;
&lt;p&gt;I am using these statements, but they didn&amp;#39;t help me much.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_drv_rtc_t const *const    p_instance;
temp=nrf_drv_rtc_counter_get   (p_instance)    ;
printf(&amp;quot;current value is=%d\r\n&amp;quot;,temp);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Please guide me in this regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC get count, App Timer</title><link>https://devzone.nordicsemi.com/thread/8005?ContentTypeID=1</link><pubDate>Tue, 11 Mar 2014 18:14:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2dd0e7d0-f5d3-4598-9e25-fe9707090310</guid><dc:creator>Camilo</dc:creator><description>&lt;p&gt;Hi Ole,
Thanks very much for your really prompt reply, My initial thought was to use the RTC get current tick count to measure the execution time of some routines I have in my code. Upon deeper examination my program will also benefit from repeated interrupts at 500 ms for transmission so using a plain simple repeating app_timer based on the LFCLK would work perfect, using this running timer I can also get the tick count so it meets that purpose as well.
Thanks Ole.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC get count, App Timer</title><link>https://devzone.nordicsemi.com/thread/8004?ContentTypeID=1</link><pubDate>Tue, 11 Mar 2014 11:16:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1da0c479-db07-4375-8ca6-58ea52f9e236</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;May I ask why you want this?&lt;/p&gt;
&lt;p&gt;However, if you just need a running RTC, without any software on top, I guess the easiest may be to just do everything manually, based on the descriptions in the nRF51 Reference Manual. Given that the LFCLK is already running (see the lfclk_config() function in the rtc_example), you can start the RTC by doing this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
NRF_RTC0-&amp;gt;TASKS_START = 1;

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you don&amp;#39;t enable any events or interrupts (i.e. don&amp;#39;t write to INTENSET or EVTENSET), the RTC will just keep going, and you can read the value by checking the NRF_RTC0-&amp;gt;COUNTER register. You can refer to the RTC example and chapter 18 of the Reference manual for further details.&lt;/p&gt;
&lt;p&gt;Beware that some of the SDK modules depends on app_timer, so you have to change them if you want to use them. That goes for at least ble_conn_params and app_button.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>