<?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>Radio Notifications become inverted</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14688/radio-notifications-become-inverted</link><description>If I have a high-priority interrupt (or a series of them) that runs long enough to completely mask a radio notification, then all further radio notifications appear inverted. Program architecture aside, is there any way I can definitely tell whether a</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Jun 2016 06:00:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14688/radio-notifications-become-inverted" /><item><title>RE: Radio Notifications become inverted</title><link>https://devzone.nordicsemi.com/thread/56060?ContentTypeID=1</link><pubDate>Mon, 27 Jun 2016 06:00:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c6c9b27-8cc3-4fed-96b1-df9bd8805196</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;I don&amp;#39;t really have a better explanation than that this is how it is implemented, there&amp;#39;s more info on the infocenter for &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.sds/dita/softdevices/s130/processor_avail_interrupt_latency/exception_mgmt_sd.html?cp=3_6_2_0_15_1"&gt;nRF51&lt;/a&gt; and &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.sds/dita/softdevices/s130/processor_avail_interrupt_latency/exception_mgmt_sd.html?cp=2_3_0_0_15_1"&gt;nRF52&lt;/a&gt;. The nRF52 is using an M4F processor and has access to more priorities.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Notifications become inverted</title><link>https://devzone.nordicsemi.com/thread/56059?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2016 13:11:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1be007ef-29fb-4593-98db-d483de7c2f5e</guid><dc:creator>Nikolaus Wittenstein</dc:creator><description>&lt;p&gt;I don&amp;#39;t think you can get both ACTIVE and nACTIVE events nested because they use the same interrupt, SWI1. The ble_radio_notification code looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void SWI1_IRQHandler(void)
{
    m_radio_active = !m_radio_active;
    if (m_evt_handler != NULL)
    {
        m_evt_handler(m_radio_active);
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If the interrupt doesn&amp;#39;t get handled in time, the interrupt flag will just get set again while it&amp;#39;s already set, which is why the interrupt doesn&amp;#39;t run twice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Notifications become inverted</title><link>https://devzone.nordicsemi.com/thread/56058?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2016 07:46:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53b7acef-a626-47f5-9c1f-d70dafd34b06</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Unfortunately there&amp;#39;s no proper way to distinguish between ACTIVE and nACTIVE. I understand that this can be frustrating, I am forwarding this internally to see if anything can be done.&lt;/p&gt;
&lt;p&gt;In general the interrupt that is triggered first is the one that is handled first. If you have two equal priority interrupts firing at the same time, the one with the lowest ISR number will be handled first.&lt;/p&gt;
&lt;p&gt;If a radio notification event does not get handled and another one gets triggered they should become nested, ie. you should get back to back ACTIVE and nACTIVE events (if you have blocking interrupts this could happen at any time from the actual radio event). Are you seeing anything to indicate that this nesting fails, possibly the nesting vector could become full and overflow.&lt;/p&gt;
&lt;p&gt;The most reliable way I can think of is to have radio notifications trigger at a higher priority than the other tasks you want to do. If that is impossible in your application, you might be able to use the scheduler, which we have a tutorial for &lt;a href="https://devzone.nordicsemi.com/tutorials/23/"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Notifications become inverted</title><link>https://devzone.nordicsemi.com/thread/56057?ContentTypeID=1</link><pubDate>Thu, 23 Jun 2016 14:48:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e447fa03-21a0-438b-86db-81a4ba639c7a</guid><dc:creator>Nikolaus Wittenstein</dc:creator><description>&lt;p&gt;Øyvind,&lt;/p&gt;
&lt;p&gt;Thanks for your reply! I have both notifications enabled. The problem is that I have other high-priority interrupts, and sometimes the radio notification interrupt doesn&amp;#39;t get serviced until a second interrupt has happened. When this occurs, the application effectively never gets the ACTIVE event before the nACTIVE event, and so every future radio notification is &amp;quot;incorrect&amp;quot; in that the application thinks the opposite thing is happening. Does that make sense?&lt;/p&gt;
&lt;p&gt;So what I&amp;#39;d like is a definitive way to know, not guess, not toggle a state variable that I have, but to actually &lt;strong&gt;know&lt;/strong&gt; whether this is an ACTIVE or an nACTIVE interrupt. Is this possible?&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll split the interrupt priority stuff into a separate question to avoid confusion.&lt;/p&gt;
&lt;p&gt;Thanks!
-Nikolaus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Radio Notifications become inverted</title><link>https://devzone.nordicsemi.com/thread/56056?ContentTypeID=1</link><pubDate>Thu, 23 Jun 2016 14:01:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffee156e-d293-4e38-8311-26942adc2144</guid><dc:creator>&amp;#216;yvind Karlsen</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you using the SDK implementation of radio notification? If you use SoftDevice calls as described in the newly updated &lt;a href="https://devzone.nordicsemi.com/tutorials/14/"&gt;tutorial on radio notification&lt;/a&gt; you have the option to have events occur before, after the radio event or both. If you have them configured to trigger on both, set a flag to keep tabs on which it is, since the ACTIVE event will always come before the nACTIVE event.&lt;/p&gt;
&lt;p&gt;Since the SoftDevice needs to be able to interrupt the application it has reserved priorities 0 and 2.&lt;/p&gt;
&lt;p&gt;You can always configure radio notifications at priority 1 and ADC at priority 3. Are you asking about how to give one preference over the other at the same priority level?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>