<?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 2 not working with Softdevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9944/timer-2-not-working-with-softdevice</link><description>Hello, 
 I have written a timer driver with timer 0 without SD and used 24 bit mode and it is working. 
 But when I used the same driver with softdevice and Timer 2 and 16 bit and changed the prescaler for one second interval, it is not working. 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Oct 2015 06:18:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9944/timer-2-not-working-with-softdevice" /><item><title>RE: Timer 2 not working with Softdevice</title><link>https://devzone.nordicsemi.com/thread/36898?ContentTypeID=1</link><pubDate>Thu, 29 Oct 2015 06:18:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13aa0de1-b18f-41eb-9f55-052e275f689f</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi sowmya&lt;/p&gt;
&lt;p&gt;I recommend to accept the answer that you feel is adequate for your original question and post a new question in a new thread. That will give you a better chance of getting an answer for you second question and help others that have a similar question to find the answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer 2 not working with Softdevice</title><link>https://devzone.nordicsemi.com/thread/36897?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2015 07:09:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76472049-559f-45b8-af6a-940a4c50da29</guid><dc:creator>Martijn</dc:creator><description>&lt;p&gt;Sorry, can&amp;#39;t help you with this.
I never used the app_timer library, I always used the timer directly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer 2 not working with Softdevice</title><link>https://devzone.nordicsemi.com/thread/36896?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2015 05:18:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fceb645-9f01-4c22-8c4a-a79ae2e8c8fe</guid><dc:creator>sowmya</dc:creator><description>&lt;p&gt;Now I changed the timer interrupt to 100 ms and initialised application timer to 10ms i.e., using&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS,
					APP_TIMER_OP_QUEUE_SIZE, false);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define APP_TIMER_PRESCALER             327
#define APP_TIMER_MAX_TIMERS            4
#define APP_TIMER_OP_QUEUE_SIZE         5
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now I created one timer instance and set the time for every 10 ms using,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;app_timer_start(ulTestTimer, 1, NULL);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This case I am getting the interrupt . I have put BP inside callback function and it is in repeated mode.&lt;/p&gt;
&lt;p&gt;But the same configuration is working when I star the timer with value 5 i.e., for 50ms.
What can be the cause ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer 2 not working with Softdevice</title><link>https://devzone.nordicsemi.com/thread/36895?ContentTypeID=1</link><pubDate>Wed, 28 Oct 2015 05:03:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80e610de-11c6-426f-a2d3-63efad14c8ed</guid><dc:creator>sowmya</dc:creator><description>&lt;p&gt;Thank you Martijn, I don&amp;#39;t know how I left that point. Yes I checked the signals, I am getting 250 ms interrupt.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer 2 not working with Softdevice</title><link>https://devzone.nordicsemi.com/thread/36894?ContentTypeID=1</link><pubDate>Tue, 27 Oct 2015 20:29:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4225b89d-dd88-484c-95ea-e8156f722514</guid><dc:creator>Martijn</dc:creator><description>&lt;p&gt;The prescaler only accepts the values 0-9.
16000000/2^9=31250 Hz.
With a cc value of 7813 it will result in ~250ms interrupts&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer 2 not working with Softdevice</title><link>https://devzone.nordicsemi.com/thread/36893?ContentTypeID=1</link><pubDate>Tue, 27 Oct 2015 14:02:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bc11950-ffbf-4341-ae4e-5554593200f4</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;When you use the SoftDevice you should use the sd_* functions. You should enable set the interrupt priority and enable it with:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = sd_nvic_SetPriority(TIMER2_IRQn, APP_IRQ_PRIORITY_LOW);
APP_ERROR_CHECK(err_code);

err_code = sd_nvic_EnableIRQ(TIMER2_IRQn);
APP_ERROR_CHECK(err_code);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer 2 not working with Softdevice</title><link>https://devzone.nordicsemi.com/thread/36892?ContentTypeID=1</link><pubDate>Tue, 27 Oct 2015 13:26:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71b0571b-00fe-468f-95e6-7a23016401c3</guid><dc:creator>sowmya</dc:creator><description>&lt;p&gt;I could not check the exact interrupt interval on DSO , but it may be around 220 milli seconds. I am keeping a counter in ISR and I am getting value 9 for 2 seconds.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer 2 not working with Softdevice</title><link>https://devzone.nordicsemi.com/thread/36891?ContentTypeID=1</link><pubDate>Tue, 27 Oct 2015 13:21:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47557466-6ca8-4bc0-b8dc-6544a61af99c</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;How often do you get interrupts?  1/~16secs ? Reference manual says: &lt;em&gt;When fTIMER &amp;lt;= 1 MHz the TIMER will use PCLK1M instead of PCLK16M for reduced power consumption.&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>