<?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>app_scheduler / app_timer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/515/app_scheduler-app_timer</link><description>Is there some documentation somewhere to explain how these work? 
 I kinda understand but in app_timer, why use a software interrupt of the same priority as the RTC interrupt? Why not just call timer_list_handler() ? 
 If its to minimize time in the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 13 Mar 2016 23:14:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/515/app_scheduler-app_timer" /><item><title>RE: app_scheduler / app_timer</title><link>https://devzone.nordicsemi.com/thread/2684?ContentTypeID=1</link><pubDate>Sun, 13 Mar 2016 23:14:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e64e600-1be2-46fb-a17f-894c07473812</guid><dc:creator>kane</dc:creator><description>&lt;p&gt;I&amp;#39;m a little late to the party, but I found this post during my search so I&amp;#39;ll point you to an app_timer tutorial:
&lt;a href="https://devzone.nordicsemi.com/tutorials/19/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and scheduler tutorial:&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/tutorials/23/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_scheduler / app_timer</title><link>https://devzone.nordicsemi.com/thread/2680?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2013 13:08:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:755ab53e-52db-4914-a044-f79f6e7a3167</guid><dc:creator>Bastiaan</dc:creator><description>&lt;p&gt;How is sized OP_QUEUES_SIZE in APP_TIMER_INIT
Would it be possible to have an example of how to blink the  two EK LEDs with different timing using app_timer?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_scheduler / app_timer</title><link>https://devzone.nordicsemi.com/thread/2681?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2013 13:08:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1eab3899-4f9c-47ca-909b-331f5fff1da5</guid><dc:creator>Guest</dc:creator><description>&lt;p&gt;How is sized OP_QUEUES_SIZE in APP_TIMER_INIT
Would it be possible to have an example of how to blink the  two EK LEDs with different timing using app_timer?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_scheduler / app_timer</title><link>https://devzone.nordicsemi.com/thread/2679?ContentTypeID=1</link><pubDate>Mon, 28 Oct 2013 11:38:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:705aa208-ec39-4054-8613-2e6d59864c9d</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;What context an app_timer timeout handler runs in depends on whether or not you&amp;#39;ve told app_timer to use the scheduler.&lt;/p&gt;
&lt;p&gt;If the last parameter of app_timer_init is true, all timer events will be passed through the scheduler, in which case all timeout handlers will run in main context.&lt;/p&gt;
&lt;p&gt;If that last parameter is false, all timeout handlers will be run directly from RTC1_IRQHandler, which by default is APP_IRQ_PRIORITY_LOW.&lt;/p&gt;
&lt;p&gt;It is also possible to have app_timer not use the scheduler by default, and only move events that you want to handle in main through the scheduler by using app_sched_event_put().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_scheduler / app_timer</title><link>https://devzone.nordicsemi.com/thread/2678?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2013 03:14:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b8d6c49-26fc-4cd1-bac9-45ea8b2259b4</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Does the app_timer handler run in the &amp;quot;main context&amp;quot;?  If I want to use TWI triggered by an app_timer timeout, should I use the app_schedule to move that into the main loop or is it ok to execute the TWI calls in the timeout hander?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_scheduler / app_timer</title><link>https://devzone.nordicsemi.com/thread/2683?ContentTypeID=1</link><pubDate>Mon, 21 Oct 2013 13:13:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3212117d-5212-4134-b331-d55efff1d490</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;What kind of example are you looking at? Some of the SDK examples use it, so you can refer to those, for example ble_app_hids_keyboard.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_scheduler / app_timer</title><link>https://devzone.nordicsemi.com/thread/2682?ContentTypeID=1</link><pubDate>Sat, 19 Oct 2013 10:54:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d35c8d1-e96d-4f95-aa50-b788f98ad60c</guid><dc:creator>aaronxu</dc:creator><description>&lt;p&gt;Is there any example about app_scheduler?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: app_scheduler / app_timer</title><link>https://devzone.nordicsemi.com/thread/2677?ContentTypeID=1</link><pubDate>Tue, 24 Sep 2013 18:40:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9ec7400-43f5-4d69-90a5-ec595b8d179b</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;Unfortunately, there isn&amp;#39;t currently a lot of documentation on these modules, but this is something that will hopefully be improved in future SDK releases.&lt;/p&gt;
&lt;p&gt;However, I can try to fill in a little details.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;app_timer&lt;/strong&gt;
This module can be used to have an unlimited (limited by APP_TIMER_MAX_TIMERS) software timers, each with their separate callback and configurable timeout, but with using only one hardware RTC timer. This is a very useful module to create an event-driven application with no other content in the main loop than a sleep (and optionally a scheduler processing call).&lt;/p&gt;
&lt;p&gt;Internally it is built with an operation queue, which is added to in the caller&amp;#39;s context. When the operation have added however, a software interrupt is triggered and the caller method returns. The software interrupt reads out the operation and performs it. This software interrupt runs with the same priority as the RTC interrupt, to make sure that such operation is never interrupted by the RTC interrupt, since doing would potentially cause big problems. The interrupt structure is hence a way to ensure the integrity of the internal data structures at all times.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;app_scheduler&lt;/strong&gt;
The primary function of app_scheduler is to move any processing out of interrupt handlers and into the main loop. This ensures that all interrupt handlers are short, and that all interrupts are processed as quick as possible. For some applications, this is very beneficial.&lt;/p&gt;
&lt;p&gt;Since the scheduler causes things to run in main context, you can also avoid some problems concerning the sizing of the operation queue for the timer. See &lt;a href="https://devzone.nordicsemi.com/index.php/how-big-should-app_timer_op_queue_size-be"&gt;this question&lt;/a&gt; for details on this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>