<?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>Single Shot timer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47735/single-shot-timer</link><description>Hi, 
 I wanted to build a single shot timer using the nrf_timer library. I went into the library code and I couldn&amp;#39;t understand some of the enumeration due to some lack of documentation. In the example simple_timer application, the single shot timer uses</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 May 2019 11:54:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47735/single-shot-timer" /><item><title>RE: Single Shot timer</title><link>https://devzone.nordicsemi.com/thread/189301?ContentTypeID=1</link><pubDate>Mon, 27 May 2019 11:54:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db74381c-da33-48be-bc28-a55b5c28debd</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Does STOP mean that the timer stops or does it keep counting under the hood?[/quote]
&lt;p&gt;&amp;nbsp;Yes, this is a low-level driver for the TIMER hardware peripheral. Triggering the STOP task will stop the timer.&lt;/p&gt;
[quote user=""]Also does&amp;nbsp;nrfx_timer_disable() mean that the counting stops in the physical timer or the software abstraction of the timer?[/quote]
&lt;p&gt;See answer above.&lt;/p&gt;
[quote user=""]Can you give me a brief explanation of STOP vs CLEAR as well as COMPARE(x) types? Does&amp;nbsp;CLEAR/STOP&amp;nbsp;indicate that it reloads the timer thus making it a normal repeating timer?[/quote]
&lt;p&gt;STOP task will stop the timer from running/counting. CLEAR will reset the counter in the timer to 0. COMPARE is events that will be generated whenever the counter in the timer match whatever you have set in the CC registers. If you clear the timer on a compare event, it will become a repeated timer. Stopping the timer on a compare event will give you a one-shot timer.&lt;/p&gt;
&lt;p&gt;See the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/timer.html?cp=3_1_0_23#concept_xbd_hqp_sr"&gt;TIMER&lt;/a&gt;&amp;nbsp;peripheral documentation for more details.&lt;/p&gt;
&lt;p&gt;If you do not need high-precision timers, you should consider using the app_timer library. This runs on the RTC/LFCLK, giving you much lower current consumption. There is a &lt;a href="https://devzone.nordicsemi.com/nordic/tutorials/b/software-development-kit/posts/application-timer-tutorial"&gt;tutorial available here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>