<?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>Timer interrupt interval question</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4460/timer-interrupt-interval-question</link><description>I have been working on making at least 1us Timer interval(expect faster than 1MHz) using interrupt. 
 To do this we need to set the prescaler of Timer to 4, since formula of making Timer Tick is
TimerTick = 16MHz / 2^prescaler. 
 or set the cc to 16</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Nov 2014 07:27:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4460/timer-interrupt-interval-question" /><item><title>RE: Timer interrupt interval question</title><link>https://devzone.nordicsemi.com/thread/15834?ContentTypeID=1</link><pubDate>Fri, 14 Nov 2014 07:27:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eab76078-c33e-4b5c-bf8b-acddebd1a892</guid><dc:creator>Krzysztof Chruscinski</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;when your expected interrupt frequency is 1MHz it means that you have 16 instruction per interrupt. I&amp;#39;m affraid that it won&amp;#39;t be enough to enter,execute and exit the interrupt so you are probably loosing some interrupts.&lt;/p&gt;
&lt;p&gt;However, there are few things that can be recommended:&lt;/p&gt;
&lt;p&gt;use SHORTS register in NRF_TIMERx to clear the counter once COMPARE0 event happens. Then you don&amp;#39;t need TASK_CLEAR = 1 in the interrupt&lt;/p&gt;
&lt;p&gt;if the purpose of your interrupt is to generate external 1 MHz clock by pin toggling look into PPI module and you can do it without core usage.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>