<?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>Setting nrf_drv_timer into single shot mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15924/setting-nrf_drv_timer-into-single-shot-mode</link><description>I would need to change a timer into single shot mode. My code is as follows: 
 static const nrf_drv_timer_t m_timer = NRF_DRV_TIMER_INSTANCE(MY_SAMPLE_TIMER);
nrf_drv_timer_init(&amp;amp;m_timer, NULL, timerHandler)
nrf_drv_timer_extended_compare(
 &amp;amp;m_timer</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Aug 2016 10:27:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15924/setting-nrf_drv_timer-into-single-shot-mode" /><item><title>RE: Setting nrf_drv_timer into single shot mode</title><link>https://devzone.nordicsemi.com/thread/60751?ContentTypeID=1</link><pubDate>Thu, 25 Aug 2016 10:27:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbeff3e8-8d23-4fae-8908-6c69200e2c52</guid><dc:creator>Jarmo</dc:creator><description>&lt;p&gt;It seems that using  NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK | NRF_TIMER_SHORT_COMPARE0_STOP_MASK does the thing in the extended_compare function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Setting nrf_drv_timer into single shot mode</title><link>https://devzone.nordicsemi.com/thread/60750?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2016 15:03:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e54440e-611f-4d3c-8637-9f0158d20fd5</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Jarmo&lt;/p&gt;
&lt;p&gt;To make a singleshot timer, I think you could just call nrf_drv_timer_compare function instead of nrf_drv_timer_extended_compare function.&lt;/p&gt;
&lt;p&gt;The nrf_drv_timer uses TIMER peripheral which runs on 16MHz clock, it is relatively high current and accurate.&lt;/p&gt;
&lt;p&gt;The app_timer library uses RTC peripheral timer in the background, which runs on 32kHz clock. It is low current but not so accurate.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>