<?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 1 has no Different resolution</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6229/timer-1-has-no-different-resolution</link><description>We&amp;#39;re currently running into a lot of bugs using timer1(and 2) especially with the softdevice enabled. Every so often it glitches, and after further inspection of the code, we notice that regardless of NRF_TIMER1-&amp;gt;BITMODE = x; the bitmode doesn&amp;#39;t change</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Dec 2016 11:17:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6229/timer-1-has-no-different-resolution" /><item><title>RE: Timer 1 has no Different resolution</title><link>https://devzone.nordicsemi.com/thread/21814?ContentTypeID=1</link><pubDate>Thu, 22 Dec 2016 11:17:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f596b32-1a60-4ce7-9d9a-969ad847aa31</guid><dc:creator>Stuart M</dc:creator><description>&lt;p&gt;Sorry this is posting on an old post and I&amp;#39;m aware its probably not applicable for you anymore, but for reference ...&lt;/p&gt;
&lt;p&gt;I have had similar issues with the documentation seeming vague with regards to this.  As is kind of mentioned in RK&amp;#39;s answer, the Reference Manual gives all the options for the device range, whereas the specifics of the exact chip you have are in the Product Specification document for your exact device.&lt;/p&gt;
&lt;p&gt;In my case for the nrf51822, the reference manual (nRF51_RM_v3.0.pdf) says all the stuff about the timers being 8/16/32 bit.  However the Product Specification (nRF51822_PS_v3.1.pdf) then says TIMER1/2 are 8/16 bit only (section 4.2).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer 1 has no Different resolution</title><link>https://devzone.nordicsemi.com/thread/21812?ContentTypeID=1</link><pubDate>Sat, 28 Mar 2015 00:29:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8abac96c-c063-447b-9410-abd16ab58494</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;From the nRF51 manual&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;quot;The TIMER&amp;#39;s maximum value is configured by changing the bit-width of the timer in the BITMODE register. For details on which bitmodes are supporting which timers see the device product specification.&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And then from the nRF51822 product spec&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Instance        Bit-width        Capture/Compare registers
TIMER0         8/16/24/32         4
TIMER1         8/16                   4
TIMER2         8/16                   4
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer 1 has no Different resolution</title><link>https://devzone.nordicsemi.com/thread/21813?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2015 17:23:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebaf4d25-5f6e-4180-a09e-e0cf38a1b814</guid><dc:creator>michael.crapse</dc:creator><description>&lt;p&gt;Thank you for your reply. When the Soft device is activated I use softdevice calls and set priority to 1. I would also like to know where this is documented? Looking at the Timer//Counter documentation in the reference manual It makes it seem vague and that each timer can be 8/24/32/16 bit timers.(as each timer has these resolution)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer 1 has no Different resolution</title><link>https://devzone.nordicsemi.com/thread/21811?ContentTypeID=1</link><pubDate>Thu, 26 Mar 2015 00:21:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e20f0b8d-0977-4982-869c-9dd7548bbb46</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;.. and a 20 second test with the debugger shows that indeed setting TIMER1-&amp;gt;CC[0] to 75125 does indeed only set the lower 16 bits.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer 1 has no Different resolution</title><link>https://devzone.nordicsemi.com/thread/21810?ContentTypeID=1</link><pubDate>Wed, 25 Mar 2015 23:59:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba1b8430-174b-49f1-bc91-bec171642eed</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;Well for a start TIMER1 and TIMER2 are 8 or 16 bit timers, they don&amp;#39;t have a 24 or 32 bit mode. So I rather suspect&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_TIMER1-&amp;gt;CC[0]=75125 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;is actually setting it to 9589 (75125-65536) and so you&amp;#39;re never going to get into your while loop.&lt;/p&gt;
&lt;p&gt;You can test that pretty easily by reading back CC[0] after you set it and see what it is.&lt;/p&gt;
&lt;p&gt;By the way, If you&amp;#39;re using the softdevice then this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NVIC_SetPriority(TIMER1_IRQn, 0);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;is using an interrupt priority you can&amp;#39;t use. Not something causing  your problem, but something which will cause you a problem in the softdevice eventually.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>