<?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>GPIOTE interrupt not being serviced</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15658/gpiote-interrupt-not-being-serviced</link><description>Hi All, 
 I&amp;#39;m having trouble running one of my I2C sensors connected to the nrf52 when running at a 200hz sampling rate. 
 Interestingly enough, the same sensor seems to work just fine when running at 20Hz, so I&amp;#39;m thinking the nrf52 can&amp;#39;t keep up with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Sep 2016 11:46:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15658/gpiote-interrupt-not-being-serviced" /><item><title>RE: GPIOTE interrupt not being serviced</title><link>https://devzone.nordicsemi.com/thread/59790?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2016 11:46:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8836519d-8b19-42a8-bcaf-160f328a97ed</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;OK, so two GPIOTE events were happening very close to each other. That makes sense, thanks for coming back and answering.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE interrupt not being serviced</title><link>https://devzone.nordicsemi.com/thread/59789?ContentTypeID=1</link><pubDate>Tue, 30 Aug 2016 21:36:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1843f32c-e966-4d65-bb26-5c105fca106e</guid><dc:creator>bvuong87</dc:creator><description>&lt;p&gt;Hi Aryan, sorry for the delay.. distracted by a few higher priority tasks.&lt;/p&gt;
&lt;p&gt;GPIOTE is LOW priority, which schedules the interrupt_event_func using app_sched_event_put:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if(flag){ do some processing here; flag = 0;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Scheduled interrupt_event_func is &amp;quot;processed&amp;quot; in main loop using app_sched_execute()&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE interrupt not being serviced</title><link>https://devzone.nordicsemi.com/thread/59787?ContentTypeID=1</link><pubDate>Tue, 16 Aug 2016 06:27:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40f5d93d-0868-4293-b66f-213b051c140d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Sorry, i got little confused now. where are you checking for the flag being set? i mean is it inside another ISR?  If your GPIOTE ISR is at higher priority than the one checking for flag, then interrupt occuring while in the ISR should be no problem, because then the context that checks for the flag will not get the chance to run at all. Maybe i did not understand correctly the overall architecture of what you are achieving to do. But could you please clarify  priorities of GPIOTE ISR and the context where you are checking for the flag&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE interrupt not being serviced</title><link>https://devzone.nordicsemi.com/thread/59788?ContentTypeID=1</link><pubDate>Mon, 15 Aug 2016 19:14:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7f03fe6-6df3-430c-bf3c-dc4f66d4d140</guid><dc:creator>bvuong87</dc:creator><description>&lt;p&gt;Hi @aryan,&lt;/p&gt;
&lt;p&gt;Thanks for working through this with me. I think I&amp;#39;ve figured out what the issue was... In my GPIOTE irq handler, there is a flag set that tells the scheduled function what sort of processing is needed.. i.e:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void gpiote_event_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
{
    if (pin == GET_GPIO_PIN(24) &amp;amp;&amp;amp; action == NRF_GPIOTE_POLARITY_LOTOHI)
    {
        flag = 1;
        app_sched_event_put(NULL, 0, interrupt_event_func);
       
    }
} 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and the interrupt event func:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if(flag){ do some processing here; flag = 0;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I think what was likely happening is another GPIOTE event was occurring before the interrupt finished processing, so the second event&amp;#39;s flag was also cleared and never serviced&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE interrupt not being serviced</title><link>https://devzone.nordicsemi.com/thread/59785?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2016 06:27:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c13fe5f-cba1-4856-bdcb-4ecb0454da4a</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;well you said that you are putting all the processing into the scheduler.  Which interrupt context does the scheduler run (where do you call app_sched_event_get?) Well the third line says that the interrupt has happened so this means that nRF chip will not loose it (unless last two interrupts happened while softdevice locked the CPU in which case the former one will not be serviced)&lt;/p&gt;
&lt;p&gt;I would like to see some code, if you cannot share it, then please open a support case and you can share anything there as we would then be bound by NDA.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE interrupt not being serviced</title><link>https://devzone.nordicsemi.com/thread/59786?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2016 17:17:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7789064-14a2-425c-b5a7-59e0e8b98300</guid><dc:creator>bvuong87</dc:creator><description>&lt;p&gt;@aryan thanks for the quick response. The reason we&amp;#39;re including PAN #73 is we&amp;#39;ve been developing our project mostly on dev kits PCA10040 v 0.9.0.. Top Mark QFAABA.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried changing the GPIOTE priority to APP_IRQ_PRIORITY_HIGH just now, and the behavior is identical. After the 8th interrupt, no additional I2C activity is observed on that line, but the other sensor is still responsive.&lt;/p&gt;
&lt;p&gt;The way our project is setup, is that the GPIOTE interrupt calls the interrupt event function, which adds most of the actual processing to the scheduler using app_sched_event_put().&lt;/p&gt;
&lt;p&gt;Any additional thoughts or reasons you can think of as to why this &amp;quot;scheduled&amp;quot; interrupt isn&amp;#39;t being tended to?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIOTE interrupt not being serviced</title><link>https://devzone.nordicsemi.com/thread/59784?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2016 08:11:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66cb6c70-86f5-44fe-baf1-882bb706b355</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you are using revision Rev 1 (QFAA-B00, QFAB-B00, CIAA-B00, CHAA-B00) or revision Engineering C (QFAA-BB0, CHAA-BA0, CIAA-BA0) chips then you &lt;code&gt;do not&lt;/code&gt; need to implement PAN73 workaround. It only applies to older Engineering B (QFAA-BA0, CHAA-AA0) and Engineering A (QFAA-AA0, QFAA-AC0, CGAA-AA0) revisions.&lt;/p&gt;
&lt;p&gt;The behavior with peripheral interrupt along with softdevice activity has been discussed extensively in this forum. In short, the softdevice has highest priority over everything and depending on your BLE activity, softdevice will use CPU time that delays your peripheral interrupt being services until softdevice releases the CPU. You can use &lt;code&gt;APP_IRQ_PRIORITY_HIGH&lt;/code&gt; for your interrupt so that this is the next thing serviced after softdevice code. This will improve the frequency of peripheral interrupt servicing but still wont be able to catch up high frequency interrupt.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>