<?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>Whether the event in the queue of scheduler have different priority?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108577/whether-the-event-in-the-queue-of-scheduler-have-different-priority</link><description>I am trying to use scheduler in my application to deal with tasks without freeos. 
 The scheduler deal with data by app_sched_execute().And the function process in sequence. 
 I want to put the events into the queue of scheduler with priority.And the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Feb 2024 00:21:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108577/whether-the-event-in-the-queue-of-scheduler-have-different-priority" /><item><title>RE: Whether the event in the queue of scheduler have different priority?</title><link>https://devzone.nordicsemi.com/thread/471436?ContentTypeID=1</link><pubDate>Thu, 29 Feb 2024 00:21:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29077303-5dd8-4811-b750-293d98a64742</guid><dc:creator>Chaoyue Ying</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I only need a small number of different priorities.&lt;/p&gt;
&lt;p&gt;The method that with three levels is seem suitable for me.But how to realize three queues?If I need to change the code of schedule?Or just by other ways?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whether the event in the queue of scheduler have different priority?</title><link>https://devzone.nordicsemi.com/thread/471312?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2024 13:13:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3d63ce7-d918-4cc9-ba50-f9aef5b1650f</guid><dc:creator>Daniel Chisholm</dc:creator><description>&lt;p&gt;Hi, do you need to have a large number of different priorities, or do you only need a small number of different priorities?&lt;/p&gt;
&lt;p&gt;(Forgive me if I am mixing up Zephyr message queues with the &amp;quot;app scheduler&amp;quot; queue..)&lt;/p&gt;
&lt;p&gt;If you need say three different priority levels (&amp;quot;low, medium, high&amp;quot;), what about creating three queues:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;when you queue an item, put it in the desired queue&lt;/li&gt;
&lt;li&gt;when your servicing routine is available to process work, take the next available item from the highest-priority queue&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whether the event in the queue of scheduler have different priority?</title><link>https://devzone.nordicsemi.com/thread/471256?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2024 11:34:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49b9cf40-299a-4fce-9bd8-be2ecf571c80</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I suspect it will be more work than just adding a few fuctions, but this will be up to you. I do not have any advice on how to implement it. (My suggestion is&amp;nbsp;to use an existing RTOS scheduler like what you have in FreeRTOS if you need these features).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whether the event in the queue of scheduler have different priority?</title><link>https://devzone.nordicsemi.com/thread/471199?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2024 08:04:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ebde71a0-76b7-422f-8545-c4f147b76d39</guid><dc:creator>Chaoyue Ying</dc:creator><description>&lt;p&gt;So the method that I break up earlier can be done by add some functions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whether the event in the queue of scheduler have different priority?</title><link>https://devzone.nordicsemi.com/thread/471197?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2024 08:00:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f284c81d-e1aa-41c3-89a0-147474cec707</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;&lt;em&gt;&lt;/em&gt;I see. My recomendation would be to use an existing RTOS scheduler if that is what you need instead of implementing yourself (which this will be in practice, though you plan to start of with the app scueduler library we provde). You are of course free to do this, but it will be up to you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whether the event in the queue of scheduler have different priority?</title><link>https://devzone.nordicsemi.com/thread/471152?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2024 00:14:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5990a24a-018b-4130-a27e-4ecc047e6a72</guid><dc:creator>Chaoyue Ying</dc:creator><description>&lt;p&gt;After call&amp;nbsp;&lt;span&gt;&amp;nbsp;app_sched_pause(),I want to operate&amp;nbsp;m_queue_event_data and&amp;nbsp;m_queue_event_headers to add schedule as app_sched_event_put(),but the data write at the head of queue.So that when I restart scheduler,app_sched_execute() will deal the data that I write first.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whether the event in the queue of scheduler have different priority?</title><link>https://devzone.nordicsemi.com/thread/470938?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2024 08:19:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a59c443-3dea-4f2c-91c0-1e89c4f17285</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I am not sure I understand what you mean and how this will give you something like priorities? But regarding pausing the scheduler, the app scheduler is run by calling&amp;nbsp;app_sched_execute(). If you don&amp;#39;t call it, the scheduler will not run. When called, all task are run, but you can call&amp;nbsp;app_sched_pause() to stop processing at any time (call&amp;nbsp;app_sched_resume() to resume it).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whether the event in the queue of scheduler have different priority?</title><link>https://devzone.nordicsemi.com/thread/470896?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2024 00:19:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c1de214-add3-46d6-8344-b44b61f23b14</guid><dc:creator>Chaoyue Ying</dc:creator><description>&lt;p&gt;Whether We can operate the queue of scheduler to save data and handler ? Maybe I can pause schedule and write data into the header,then restart schedule to realize similar to the effect of priority?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whether the event in the queue of scheduler have different priority?</title><link>https://devzone.nordicsemi.com/thread/470627?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2024 08:17:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58b2f86d-a2fb-407c-b1f0-de276c95462c</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Not in what we provide, no.&amp;nbsp;I know you wrote that you don&amp;#39;t want to use FreeRTOS, but a scheduler with priorities is the most important feature of an RTOS, so if you really need it, I would consider an RTOS. If you have not gotten far with your development, I woudl also take the opportunity to consider using the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html"&gt;nRF Connect SDK &lt;/a&gt;insted of the old nRF5 SDK (see also &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf-connect-sdk-and-nrf5-sdk-statement"&gt;nRF Connect SDK and nRF5 SDK statement&lt;/a&gt;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whether the event in the queue of scheduler have different priority?</title><link>https://devzone.nordicsemi.com/thread/470584?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2024 00:08:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23a667e1-a19e-4567-b0d4-8a262bcda607</guid><dc:creator>Chaoyue Ying</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;if there have method to dupport for priorities?I need a method to realize it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Whether the event in the queue of scheduler have different priority?</title><link>https://devzone.nordicsemi.com/thread/470478?ContentTypeID=1</link><pubDate>Fri, 23 Feb 2024 13:40:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0a3bba6-b0a2-40d0-b349-3216ec4e469d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_scheduler.html"&gt;app scheduler &lt;/a&gt;does not have support for priorities. You can think of it as a simple FIFO with a function pointer and some metadata. The sole pruprose of this scheduler library is to move ececutions from interrupts to the main context.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>