<?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>nRF51: is it possible to read the timer counter register?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11849/nrf51-is-it-possible-to-read-the-timer-counter-register</link><description>Is it possible to directly read the timer module counter register in the nRF51?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 Jul 2016 10:06:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11849/nrf51-is-it-possible-to-read-the-timer-counter-register" /><item><title>RE: nRF51: is it possible to read the timer counter register?</title><link>https://devzone.nordicsemi.com/thread/44864?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2016 10:06:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53e1ddb0-46a0-4b6c-b4ac-1d2488cf758c</guid><dc:creator>Ankush</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;can any one tell me how to read counter register value of real time counter example of nrf51?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: is it possible to read the timer counter register?</title><link>https://devzone.nordicsemi.com/thread/44863?ContentTypeID=1</link><pubDate>Sat, 13 Feb 2016 09:17:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5abecb6-e111-4e1c-a178-bc731ad05a9d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;This is internal to peripheral so It should be not be more than one system clock cycle.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: is it possible to read the timer counter register?</title><link>https://devzone.nordicsemi.com/thread/44862?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2016 17:31:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48ac5115-cc0e-4d67-a2cb-1375f91290f6</guid><dc:creator>mstrouse</dc:creator><description>&lt;p&gt;Thanks Aryan. Can you give me an idea of the delay (number of clock cycles) in &amp;quot;capturing&amp;quot; the counter?&lt;/p&gt;
&lt;p&gt;Marshall.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: is it possible to read the timer counter register?</title><link>https://devzone.nordicsemi.com/thread/44861?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2016 08:10:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7cdf2e7-f4fc-4846-ba80-3a8cbc6ec596</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;RTC Counter you CAN read directly, You CANNOT read TIMER counter directly. You need to capture it into one compare register.&lt;/p&gt;
&lt;p&gt;If you are using SDK timer driver&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t captured_value = current_nrf_drv_timer_capture(instance, cc_channel);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you are not using driver, then&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_TIMERX-&amp;gt;TASKS_CAPTURE[channel_number] = 1;
uint32_t captured_value = NRF_TIMERx-&amp;gt;CC[cc_channel];
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;@Note: Capturing into CC register means that previous values in those registers are lost. If your application is waiting for some events based on previous values, then your app will malfunction. Capture only into a free CC register.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>