<?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>Timer1 NRF_TIMER1-&amp;gt;CC[1] not having an effect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8227/timer1-nrf_timer1--cc-1-not-having-an-effect</link><description>I am using the nRF51-DK and have Timer1 setup as follows: 
 void start_timer(void)
{ 
 NRF_TIMER1-&amp;gt;MODE = TIMER_MODE_MODE_Timer; 
 NRF_TIMER1-&amp;gt;TASKS_CLEAR = 1; 
 NRF_TIMER1-&amp;gt;PRESCALER = 4; 
 NRF_TIMER1-&amp;gt;BITMODE = TIMER_BITMODE_BITMODE_16Bit;
 NRF_TIMER1</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Jul 2015 09:36:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8227/timer1-nrf_timer1--cc-1-not-having-an-effect" /><item><title>RE: Timer1 NRF_TIMER1-&gt;CC[1] not having an effect</title><link>https://devzone.nordicsemi.com/thread/29660?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2015 09:36:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74467427-1db1-4a7a-a8c4-9a16affda73c</guid><dc:creator>Mahesh Venkitachalam</dc:creator><description>&lt;p&gt;OK, got it. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer1 NRF_TIMER1-&gt;CC[1] not having an effect</title><link>https://devzone.nordicsemi.com/thread/29659?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2015 09:24:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f07bb266-1827-4c8b-8ff9-342154f3dd7c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Note that Timer works at 16Mhz CLK (same as Cortex M0). When you put 100 in CC, you expect that your interrupt latency is less than 100 cycles(12uS). This might not be true, so you are missing few interrupts.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer1 NRF_TIMER1-&gt;CC[1] not having an effect</title><link>https://devzone.nordicsemi.com/thread/29658?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2015 09:12:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45edf03a-896f-4a84-a557-7dc93d6a72e4</guid><dc:creator>Mahesh Venkitachalam</dc:creator><description>&lt;p&gt;Does the accuracy vary with the value set in CC? When I set it to 100, I get a pin period of 24.8 us. The expected value is 2 * 100 * 62 ns = 12.4 us, isn&amp;#39;t it? I seem to be missing a factor of 2.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer1 NRF_TIMER1-&gt;CC[1] not having an effect</title><link>https://devzone.nordicsemi.com/thread/29657?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2015 08:47:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8e11231-8033-4795-9750-d6297253008b</guid><dc:creator>Mahesh Venkitachalam</dc:creator><description>&lt;p&gt;OK, thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer1 NRF_TIMER1-&gt;CC[1] not having an effect</title><link>https://devzone.nordicsemi.com/thread/29656?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2015 07:49:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d2c164a-64e9-4bb1-a450-970b967dea67</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I do not understand that dependency. Make sure that you are not using timer1 for something else.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer1 NRF_TIMER1-&gt;CC[1] not having an effect</title><link>https://devzone.nordicsemi.com/thread/29655?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2015 07:05:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ea138bd-75cf-4ea4-ae34-78ac9a20cb1b</guid><dc:creator>Mahesh Venkitachalam</dc:creator><description>&lt;p&gt;Great! I am seeing 0.138 ms. I appreciate your patience in explaining this to me. One more question - I had to call &lt;code&gt;start_timer()&lt;/code&gt; after starting BLE advertizing, or it doesn&amp;#39;t advertize. Is that expected?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer1 NRF_TIMER1-&gt;CC[1] not having an effect</title><link>https://devzone.nordicsemi.com/thread/29654?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2015 05:46:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98a7a509-bb93-472f-a515-9e54f2cd186d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;With prescalar 0, 1 timer tick is 62 nano second long. If you put 1000 in CC, it should generate event in 62 micro second. Since you are toggling pin at every event, your pin period will be 125 micro second.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer1 NRF_TIMER1-&gt;CC[1] not having an effect</title><link>https://devzone.nordicsemi.com/thread/29661?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2015 03:53:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1487d43b-e7b4-42f6-8712-846a66fd0c6b</guid><dc:creator>Mahesh Venkitachalam</dc:creator><description>&lt;p&gt;Aryan, could you please comment on the observed period/frequency of the signal at P0.21? With prescaler set to 0, and  &lt;code&gt;CC[1]&lt;/code&gt; set to &lt;code&gt;1000&lt;/code&gt;, what is the expected pulse frequency?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer1 NRF_TIMER1-&gt;CC[1] not having an effect</title><link>https://devzone.nordicsemi.com/thread/29653?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2015 01:54:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cac3affb-d69a-4828-bb26-df8c550cfee3</guid><dc:creator>Mahesh Venkitachalam</dc:creator><description>&lt;p&gt;Thanks, Aryan. I guess calling &lt;code&gt;NRF_TIMER1-&amp;gt;TASKS_CLEAR = 1;&lt;/code&gt; manually also would work? So what is &lt;code&gt;NRF_TIMER1-&amp;gt;EVENTS_COMPARE[1] = 0;&lt;/code&gt; doing? It&amp;#39;s clearing the compare event, but it doesn&amp;#39;t effect the timer counting?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer1 NRF_TIMER1-&gt;CC[1] not having an effect</title><link>https://devzone.nordicsemi.com/thread/29652?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2015 16:55:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fbb1fc1-e39d-4093-84e7-fb3e83757fda</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;you have the enable the SHORT that clears the the TIMER value after CC[0] event is triggered. Else no matter what you set in CC register, the timer will go circular over 16bit CC register&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>