<?xml-stylesheet type="text/xsl" href="https://test-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/"><channel><title>nRF5 SDK Scheduler Tutorial</title><link>/guides/short-range-guides/b/software-development-kit/posts/scheduler-tutorial</link><description>2019-02-08: Updated tutorial to cover nRF5 SDK version 15.2.
Introduction
Scope
The following topics will be included in this tutorial:

Configuration of the Scheduler library .
Using the scheduler with any interrupts or events.
Using the scheduler wi</description><dc:language>en-US</dc:language><generator>Telligent Community 13 Non-Production</generator><item><title>RE: nRF5 SDK Scheduler Tutorial</title><link>https://test-devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/scheduler-tutorial</link><pubDate>Thu, 17 Sep 2020 12:10:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6176dadb-25db-4cd4-9a07-9d65a6fb9a8e</guid><dc:creator>user56525</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I am wondering, by which value I need to extend the&amp;nbsp;&lt;span&gt;scheduler event queue event data size i.e.&amp;nbsp;&lt;/span&gt; SCHED_MAX_EVENT_DATA_SIZE, when using SoftDevice handler library? Maybe += sizeof(ble_evt_t)? Or is this handled internally?&lt;/p&gt;&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1178&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: nRF5 SDK Scheduler Tutorial</title><link>https://test-devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/scheduler-tutorial</link><pubDate>Mon, 03 Aug 2020 11:08:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6176dadb-25db-4cd4-9a07-9d65a6fb9a8e</guid><dc:creator>user92259</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;span&gt;Hi Everyone,&amp;nbsp; Has anyone been able to build a scheduler of the above example and implemented it in the nRF9160 DK. If so, can you let me know the dependencies or changes that I need to do here to get it woking in my nR9160 DK. Thanks :).&lt;/span&gt;&lt;/p&gt;&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1178&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: nRF5 SDK Scheduler Tutorial</title><link>https://test-devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/scheduler-tutorial</link><pubDate>Thu, 18 Jun 2020 10:48:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6176dadb-25db-4cd4-9a07-9d65a6fb9a8e</guid><dc:creator>user90875</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Really nice tutorial and easy to understand the basic! Thank you verrrrrrrrrry much!!!&lt;/p&gt;&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1178&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: nRF5 SDK Scheduler Tutorial</title><link>https://test-devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/scheduler-tutorial</link><pubDate>Fri, 10 Apr 2020 06:13:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6176dadb-25db-4cd4-9a07-9d65a6fb9a8e</guid><dc:creator>user18026</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;span&gt;Is this a typo: setting &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/group__nrf__sdh__config.html"&gt;NRF_SDH_DISPATCH_MODEL&lt;/a&gt; to 1 (NRF_SDH_DISPATCH_MODEL_POLLING)&lt;/span&gt;&lt;/p&gt;&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1178&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: nRF5 SDK Scheduler Tutorial</title><link>https://test-devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/scheduler-tutorial</link><pubDate>Fri, 17 Jan 2020 09:46:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6176dadb-25db-4cd4-9a07-9d65a6fb9a8e</guid><dc:creator>user69018</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:b8bc0d85-5ddc-452c-b00f-8ce031e2d387:type=text&amp;text=%23define%20SCHED_MAX_EVENT_DATA_SIZE%20%20%20MAX%28sizeof%28nrf_drv_gpiote_pin_t%29%2C%20APP_TIMER_SCHED_EVENT_DATA_SIZE%29]&lt;/p&gt;
&lt;p&gt;This does not work, when compiling I get the error &amp;quot;error: storage size of &amp;#39;APP_SCHED_BUF&amp;#39; isn&amp;#39;t constant&amp;quot;&lt;/p&gt;
&lt;p&gt;You can do this instead:&lt;/p&gt;
&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:bc0a20cd-5b91-4c6f-88e3-53339eb2f3a9:type=text&amp;text=typedef%20union%20%7B%0D%0A%20%20%20%20app_timer_event_t%20timer%3B%0D%0A%20%20%20%20nrf_drv_gpiote_pin_t%20pin%3B%0D%0A%7D%20app_scheduler_storage%3B%0D%0A%0D%0A%23define%20SCHED_MAX_EVENT_DATA_SIZE%20%20%20sizeof%28app_scheduler_storage%29]&lt;/p&gt;&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1178&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: nRF5 SDK Scheduler Tutorial</title><link>https://test-devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/scheduler-tutorial</link><pubDate>Sun, 27 May 2018 02:25:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6176dadb-25db-4cd4-9a07-9d65a6fb9a8e</guid><dc:creator>user19122</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;span&gt;Hi,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I updated the tutorial&amp;nbsp;project to be compatible with SDK V13 and higher. These are complied with GCC against V13.1. Added&amp;nbsp;logging functions via nrf logger.&amp;nbsp;Tested on Nordic nRF52. Happy for someone from Nordic to check and place on&amp;nbsp;their server if deserving.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;scheduler_tutorial_pre.zip&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;a href="http://nodescan.dyndns.org:8080/nswebshare/share/eaacb15c81234ccfa345f2c5a2975a40/scheduler_tutorial_pre.zip"&gt;http://nodescan.dyndns.org:8080/nswebshare/share/eaacb15c81234ccfa345f2c5a2975a40/scheduler_tutorial_pre.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span&gt;scheduler_tutorial_done.zip&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;a href="http://nodescan.dyndns.org:8080/nswebshare/share/38ce2397c40247f393f1fce0fa4cfa74/scheduler_tutorial_done.zip"&gt;http://nodescan.dyndns.org:8080/nswebshare/share/38ce2397c40247f393f1fce0fa4cfa74/scheduler_tutorial_done.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Any comments, fixes welcome.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Darren&lt;/span&gt;&lt;/p&gt;&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1178&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: nRF5 SDK Scheduler Tutorial</title><link>https://test-devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/scheduler-tutorial</link><pubDate>Sat, 26 May 2018 10:02:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6176dadb-25db-4cd4-9a07-9d65a6fb9a8e</guid><dc:creator>user24598</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Hi, Thanks for the wonderful tutorial. I have one question. I am using scheduler in my application. Scheduler Tasks are using some SD functions which require to have &amp;quot;Valid BLE connection&amp;quot;. These tasks are put in the queue as soon as the connection is made and the tasks start executing. Some of the tasks are pretty time consuming involving sending kBs of data to the connected client through notification. Now, my problem is &amp;quot;How to terminate the ongoing task as soon as the connection is broken&amp;quot;. Is there a way to terminate the queued tasks on receiving &amp;quot;Disconnection event&amp;quot;. Can you please tell me an elegant way to do it?&lt;/p&gt;&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1178&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: nRF5 SDK Scheduler Tutorial</title><link>https://test-devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/scheduler-tutorial</link><pubDate>Wed, 18 Oct 2017 19:06:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6176dadb-25db-4cd4-9a07-9d65a6fb9a8e</guid><dc:creator>user26919</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;This tutorial no longer compiles when following the steps. I downloaded the .zip and SDK11 as instructed. At first the example compiles fine. But after making the first change, it no longer compiles.&lt;/p&gt;
&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1178&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: nRF5 SDK Scheduler Tutorial</title><link>https://test-devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/scheduler-tutorial</link><pubDate>Mon, 22 Aug 2016 20:04:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6176dadb-25db-4cd4-9a07-9d65a6fb9a8e</guid><dc:creator>user14615</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;@Tom - typically interrupt flag is set and Interrupt Service Routine is called when previous ISR is returned. (but arm has more priority levels so it also can happened that later coming IRQ has higher priority and interrupts ongoing ISR). Basically if your ISR are fast you shall be ok. If ISR is too long it either slows down system reaction on other ISR which might be quicker. Or it can skip same IRQ - if you imagine that ISR would clear interrupt pending flag at the end and IRQ would be set again before flag clearing then ISR would be run only once...&lt;/p&gt;
&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1178&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: nRF5 SDK Scheduler Tutorial</title><link>https://test-devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/scheduler-tutorial</link><pubDate>Tue, 28 Jun 2016 20:37:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6176dadb-25db-4cd4-9a07-9d65a6fb9a8e</guid><dc:creator>user13885</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Awesome functionality. Really easy to put in if needed.&lt;/p&gt;
&lt;p&gt;Thank you for the great design work. it really saves a lot of time.&lt;/p&gt;
&lt;p&gt;Ben&lt;/p&gt;
&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1178&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: nRF5 SDK Scheduler Tutorial</title><link>https://test-devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/scheduler-tutorial</link><pubDate>Fri, 03 Jun 2016 10:24:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6176dadb-25db-4cd4-9a07-9d65a6fb9a8e</guid><dc:creator>user12611</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;It clears all questions of Scheduler.
Thanks. :-)&lt;/p&gt;
&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1178&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: nRF5 SDK Scheduler Tutorial</title><link>https://test-devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/scheduler-tutorial</link><pubDate>Wed, 04 May 2016 00:08:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6176dadb-25db-4cd4-9a07-9d65a6fb9a8e</guid><dc:creator>user13469</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Thanks for the tutorial!&lt;/p&gt;
&lt;p&gt;I have one question.&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t use the scheduler and two events arrive at around the same time what happens? For instance, I don&amp;#39;t seem to be having any trouble processing timer events and ble stack events in my program which doesn&amp;#39;t use a scheduler.&lt;/p&gt;
&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1178&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: nRF5 SDK Scheduler Tutorial</title><link>https://test-devzone.nordicsemi.com/guides/short-range-guides/b/software-development-kit/posts/scheduler-tutorial</link><pubDate>Fri, 22 Apr 2016 13:31:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6176dadb-25db-4cd4-9a07-9d65a6fb9a8e</guid><dc:creator>user13419</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I can confirm this tutorial works smoothly with SDK 11.  I don&amp;#39;t believe I&amp;#39;m the first to comment here.  Makes me think a lot of people out there might not be making full use of this pretty important feature - RJH&lt;/p&gt;
&lt;img src="https://test-devzone.nordicsemi.com/aggbug?PostID=1178&amp;AppID=14&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>