<?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>Reading the timer counter value using the Capture Task</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16600/reading-the-timer-counter-value-using-the-capture-task</link><description>Hi, 
 Is this the right way of reading the timer value using the capture task. In this code i am trying to read the updated value of counter for every event generated in the interrupt handler. 
 &amp;gt; int main() {
&amp;gt; NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;
&amp;gt;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Sep 2016 09:51:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16600/reading-the-timer-counter-value-using-the-capture-task" /><item><title>RE: Reading the timer counter value using the Capture Task</title><link>https://devzone.nordicsemi.com/thread/63512?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2016 09:51:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e7bda5e-6b53-49d4-8404-d7f2f951e244</guid><dc:creator>soumil</dc:creator><description>&lt;p&gt;Thanks RK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading the timer counter value using the Capture Task</title><link>https://devzone.nordicsemi.com/thread/63511?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2016 09:23:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95413526-055b-4e04-af11-b2f2d7a9f180</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;no - you should do the task capture before you read the value, else you will get the previous value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading the timer counter value using the Capture Task</title><link>https://devzone.nordicsemi.com/thread/63510?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2016 09:20:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c22df53-d9ef-4967-bfa8-15902cb9eef6</guid><dc:creator>soumil</dc:creator><description>&lt;p&gt;So after i read the value in the interrupt handler should i again do this &lt;code&gt;NRF_TIMER2-&amp;gt;TASKS_CAPTURE[1] =1;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reading the timer counter value using the Capture Task</title><link>https://devzone.nordicsemi.com/thread/63509?ContentTypeID=1</link><pubDate>Thu, 22 Sep 2016 09:18:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbb26b83-b8b3-45c1-929f-b925e3b000c8</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;No, the value in the CC[] register is only updated once &lt;em&gt;each time&lt;/em&gt; you trigger the TASK_CAPTURE task. You&amp;#39;re only triggering it once in the setup, so you&amp;#39;ll get the same value every time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>