<?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>freertos priority confusion</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24730/freertos-priority-confusion</link><description>Setting interrupt priority according to FreeRTOS documentation is an inverted priority sequencing, i.e. lower number is high priority. However in the freeRTOS example provided, Logging is set to priority 1, and BLE 2. This would then set BLE is a lower</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 30 Aug 2017 19:57:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24730/freertos-priority-confusion" /><item><title>RE: freertos priority confusion</title><link>https://devzone.nordicsemi.com/thread/97360?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2017 19:57:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62a35816-47ff-4b57-a42d-826830aacb56</guid><dc:creator>Dave_couling</dc:creator><description>&lt;p&gt;So its good practise to set the Timer task priority very high. For example
#define configTIMER_TASK_PRIORITY                                                 ( 5 )&lt;/p&gt;
&lt;p&gt;This would allow me to call HVX or any softdevice API call within the timeout handler?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: freertos priority confusion</title><link>https://devzone.nordicsemi.com/thread/97359?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2017 08:25:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08186a48-4bb0-4ca8-85ee-cfdcb3d60756</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The task prirorities of freeRTOS are not same as interrupt priority. FreeRTOS internal house keepingis done in RTC interrupt context and the task is executed in PenSV interrupt context. All the task priorities are internal to FreeRTOS scheduler which is just uses a scheduling algorithm to select which task to run, so the task priorities in FreeRTOS are not hardware controlled. Like I said, Any OS cannot say that it has this priority scheme for ARM core and different priority scheme for others, that will make the application completely non portable between cores.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: freertos priority confusion</title><link>https://devzone.nordicsemi.com/thread/97358?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2017 08:09:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74e72fd4-60a0-4522-a74d-975087cdd620</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;&amp;quot;The next thing to know is that, in ARM Cortex-M cores, numerically low priority values are used to specify logically high interrupt priorities. For example, the logical priority of an interrupt assigned a numeric priority value of 2 is above that of an interrupt assigned a numeric priority of 5.&amp;quot;&lt;/p&gt;
&lt;p&gt;This is meant for ARM cores, hardware, not for FreeRTOS. An OS cannot make priority mean different for different cores, that will be super confusing. I agree that in the post you referred where i said it wrong too, but bigzero corrected me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: freertos priority confusion</title><link>https://devzone.nordicsemi.com/thread/97361?ContentTypeID=1</link><pubDate>Wed, 30 Aug 2017 00:28:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4fe3046-cd70-4340-acd7-d467e484d272</guid><dc:creator>Dave_couling</dc:creator><description>&lt;p&gt;Another question on this topic would be, my SAADC callback is set to interrupt priority of 6 (same as RTC).  How does this translate to the SDK interrupt priorities?&lt;/p&gt;
&lt;p&gt;Since the callbacks are technically interrupts, if I want to unlock a Semaphore do I have to use the  xSemaphoreGiveFromISR() version?&lt;/p&gt;
&lt;p&gt;Same question with an xTimer Starting and Stopping from an SAADC callback?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: freertos priority confusion</title><link>https://devzone.nordicsemi.com/thread/97357?ContentTypeID=1</link><pubDate>Tue, 29 Aug 2017 22:10:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3424fb6-785b-4ed4-ae1a-ad7d19dfbe79</guid><dc:creator>Dave_couling</dc:creator><description>&lt;p&gt;Also contradicts what you stated in this thread: &lt;a href="https://devzone.nordicsemi.com/question/76033/i-would-like-to-call-hvx-function-in-my-custom-task/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: freertos priority confusion</title><link>https://devzone.nordicsemi.com/thread/97362?ContentTypeID=1</link><pubDate>Tue, 29 Aug 2017 17:45:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e296f77-d10f-4757-886d-5724e57e3648</guid><dc:creator>Dave_couling</dc:creator><description>&lt;p&gt;This contradicts the FreeRTOS documentation.  In file list.c  &amp;quot;...on Cortex-M parts where numerically high priority values denote low actual interrupt priorities, which can seem counter intuitive.&amp;quot;&lt;/p&gt;
&lt;p&gt;This is also mentioned in the FreeRTOS documentation page:  &lt;a href="http://www.freertos.org/RTOS-Cortex-M3-M4.html"&gt;www.freertos.org/RTOS-Cortex-M3-M4.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;The next thing to know is that, in ARM Cortex-M cores, numerically low priority values are used to specify logically high interrupt priorities. For example, the logical priority of an interrupt assigned a numeric priority value of 2 is above that of an interrupt assigned a numeric priority of 5.&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: freertos priority confusion</title><link>https://devzone.nordicsemi.com/thread/97356?ContentTypeID=1</link><pubDate>Tue, 29 Aug 2017 09:20:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5532c9f1-6495-4c2f-95d9-200e5e5bc844</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Dave,
In FreeRTOS low priority number means low priority (inverse to what we have on ARM core, where exception priority is higher with lower number).&lt;/p&gt;
&lt;p&gt;You can read more about FreeRTOS priority &lt;a href="http://www.freertos.org/RTOS-task-priority.html"&gt;here&lt;/a&gt;.  Please note the line below mentioned on that page.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Low priority numbers denote low priority tasks. The idle task has priority zero (tskIDLE_PRIORITY)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I haven&amp;#39;t tried the example in SDK14 myself but quick look shows that the function nrf_sdh_freertos_init creates a task for BLE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>