<?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>How to reset the tick value in application timer?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14858/how-to-reset-the-tick-value-in-application-timer</link><description>My code detects an external signal using GPIOTE. Whenever the signal falls, GPIOTE calls a handler, audio_stimulus_handler . The code is shown below. Essentially, after detecting the first fall, it starts the timer and gets the tick value when the subsequent</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Jun 2016 07:32:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14858/how-to-reset-the-tick-value-in-application-timer" /><item><title>RE: How to reset the tick value in application timer?</title><link>https://devzone.nordicsemi.com/thread/56712?ContentTypeID=1</link><pubDate>Thu, 30 Jun 2016 07:32:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4aa3128b-6d40-4346-9fa8-d41d5b873bd7</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can reinitialise the timer with a new call to &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v11.0.0%2Fgroup__app__timer.html&amp;amp;cp=5_0_0_6_8_22_17&amp;amp;anchor=ga3e3f54705d54d1c7fe0f68facd3ae957"&gt;app_timer_create()&lt;/a&gt; after it is stopped:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Note: (...) The function can be called again on
the timer instance and will
re-initialize the instance if the
timer is not running.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Alternatively, you can save the old time value and use &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v11.0.0%2Fgroup__app__timer.html&amp;amp;cp=5_0_0_6_8_22_15&amp;amp;anchor=gaad9b5fc66ed908c54281370f690d0c4e"&gt;app_timer_cnt_diff_compute()&lt;/a&gt; for finding the elapsed time.&lt;/p&gt;
&lt;p&gt;Regards, Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>