<?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>Request more detailed SDK 15.2.0 peripheral interrupt priority change explanation</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44001/request-more-detailed-sdk-15-2-0-peripheral-interrupt-priority-change-explanation</link><description>The SDK 15.2.0 release notes state: 
 Changed the default interrupt priority level for the peripherals from 7 to 6. This is done to be aligned with the priority of the SWI coming from the SoftDevice. 
 A while ago I upgraded my project to build with SDK</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Feb 2019 17:52:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44001/request-more-detailed-sdk-15-2-0-peripheral-interrupt-priority-change-explanation" /><item><title>RE: Request more detailed SDK 15.2.0 peripheral interrupt priority change explanation</title><link>https://devzone.nordicsemi.com/thread/172562?ContentTypeID=1</link><pubDate>Fri, 22 Feb 2019 17:52:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a64b837-09cd-4b3d-bd31-4d75c2fb926d</guid><dc:creator>eric-appion</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;You are correct, we started with an earlier SDK. Thank you for the explanation. For my purposes it probably doesn&amp;#39;t matter whether the SWI from the SoftDevice is above, below, or the same priority as the peripheral interrupts, because I&amp;#39;ve been careful to have all of the interrupt and event handlers do very little before returning; most of them just give a semaphore or post to a queue.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve now changed the peripheral interrupts from 7 to 6 in our project to match SDK 15.2.0, and it seems to work fine.&lt;/p&gt;
&lt;p&gt;Just to be clear about what I said regarding FreeRTOS, the defines I quoted are used to set the interrupt priority of RTC1, used for the FreeRTOS tick and scheduling.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Request more detailed SDK 15.2.0 peripheral interrupt priority change explanation</title><link>https://devzone.nordicsemi.com/thread/172538?ContentTypeID=1</link><pubDate>Fri, 22 Feb 2019 14:27:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6912d5fd-bf4f-47e9-94b6-c352059fcb35</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Eric,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would assume you were porting your application from earlier SDK to SDK v15.2 and then brought the configuration of peripheral interrupt priority to 7 from your previous application ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In SDK v15.1 and earlier we have been setting the Softdevice SWI (the interrupt to send softdevice event to application) from 6 to 7 to match with the peripheral lowest interrupt priority level 7. So they have the same level. You can find the workaround in nrf_sdh.c in SDK v15.1 and earlier. However, in the workaround we missed S140 as at the time we though its SWI&amp;#39;s default level was already 7. But it actually was 6.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So on SDK v15.2 we decided to remove that workaround and now everything is configured to level 6 including the application peripherals default interrupt.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In your case, you set your application interrupt priority level to 7, meaning your application interrupt can be pre-empted by the softdevice events.&lt;/p&gt;
&lt;p&gt;If your application has no problem being preempted I don&amp;#39;t see a problem here.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You are right about the&amp;nbsp; FreeRTOS configuration, I would need to check with our FreeRTOS expert to see if there is any impact here.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Request more detailed SDK 15.2.0 peripheral interrupt priority change explanation</title><link>https://devzone.nordicsemi.com/thread/172537?ContentTypeID=1</link><pubDate>Fri, 22 Feb 2019 14:26:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f14fdcf6-ddb4-4a04-a9e0-d00ee33fc632</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Eric,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would assume you were porting your application from earlier SDK to SDK v15.2 and then brought the configuration of peripheral interrupt priority to 7 from your previous application ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In SDK v15.1 and earlier we have been setting the Softdevice SWI (the interrupt to send softdevice event to application) from 6 to 7 to match with the peripheral lowest interrupt priority level 7. So they have the same level. You can find the workaround in nrf_sdh.c in SDK v15.1 and earlier. However, in the workaround we missed S140 as at the time we though its SWI&amp;#39;s default level was already 7. But it actually was 6.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So on SDK v15.2 we decided to remove that workaround and now everything is configured to level 6 including the application peripherals default interrupt.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In your case, you set your application interrupt priority level to 7, meaning your application interrupt can be pre-empted by the softdevice events.&lt;/p&gt;
&lt;p&gt;If your application has no problem being preempted I don&amp;#39;t see a problem here.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You are right about the&amp;nbsp; FreeRTOS configuration, I would need to check with our FreeRTOS expert to see if there is any impact here.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Request more detailed SDK 15.2.0 peripheral interrupt priority change explanation</title><link>https://devzone.nordicsemi.com/thread/172389?ContentTypeID=1</link><pubDate>Thu, 21 Feb 2019 20:42:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48474d70-61d0-4b0a-9b2d-bc0860cfe508</guid><dc:creator>eric-appion</dc:creator><description>&lt;p&gt;It looks to me like FreeRTOS in the SDK examples is still using interrupt priority 0xf, which I assume is aliasing to 7. Should that also be changed to 6?&amp;nbsp; These are the relevant lines from FreeRTOSConfig.h:&lt;/p&gt;
&lt;p&gt;#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xf&lt;/p&gt;
&lt;p&gt;#define configKERNEL_INTERRUPT_PRIORITY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; configLIBRARY_LOWEST_INTERRUPT_PRIORITY&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Request more detailed SDK 15.2.0 peripheral interrupt priority change explanation</title><link>https://devzone.nordicsemi.com/thread/172388?ContentTypeID=1</link><pubDate>Thu, 21 Feb 2019 20:39:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f207c15-643c-4819-8879-087310de319a</guid><dc:creator>eric-appion</dc:creator><description>&lt;p&gt;Upon reading the SoftDevice Specification again, I see that the application is allowed to use interrupt priority 5. However, I still would like to know why the SWI required that the peripheral interrupt priorities change from 7 to 6.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>