<?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>Measuring time between events</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33484/measuring-time-between-events</link><description>Hi all, 
 I am struggling measuring time between events. I thought to use the timer driver and the nrf_drv_timer_capture_get function. This is my test code: 
 
 I expected to see the current value getting greater, instead it is always 0. 
 Why? 
 Thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 17 Nov 2019 12:35:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33484/measuring-time-between-events" /><item><title>RE: Measuring time between events</title><link>https://devzone.nordicsemi.com/thread/220436?ContentTypeID=1</link><pubDate>Sun, 17 Nov 2019 12:35:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2579e3e3-69ff-4621-8eac-4730a82c1068</guid><dc:creator>1730143</dc:creator><description>&lt;p&gt;still 0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Measuring time between events</title><link>https://devzone.nordicsemi.com/thread/128778?ContentTypeID=1</link><pubDate>Wed, 18 Apr 2018 11:00:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37c76b1b-e45a-42eb-8cb1-f885e4941b1f</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;To read the current value of the timer, the function&amp;nbsp;nrf_drv_timer_capture() should be used.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nrf_drv_timer_capture()&lt;/strong&gt; does the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;TASKS_CAPTURE[channel number]: the current value of the timer is placed in CC[channel number]&lt;/li&gt;
&lt;li&gt;Read&amp;nbsp; the value of CC[channel number]&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;nrf_drv_timer_capture_get() only reads the value in CC[channel number]&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>