<?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 never gets hit</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22794/gpiote-interrupt-never-gets-hit</link><description>Hi,
I set up a 2 GPIOTE interupts like this: 
 in main.c: 
 APP_GPIOTE_INIT(3);
err_code = app_gpiote_user_register(&amp;amp;mainUser, 0x00000000, (1 &amp;lt;&amp;lt; RF_GPIO2), powerButtonInt); APP_ERROR_CHECK(err_code);
err_code = app_gpiote_user_enable(mainUser);</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Jun 2017 17:42:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22794/gpiote-interrupt-never-gets-hit" /><item><title>RE: gpiote interrupt never gets hit</title><link>https://devzone.nordicsemi.com/thread/89610?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 17:42:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34483dd7-b441-4f68-b9b9-53439bcd9b81</guid><dc:creator>the_purple_pig</dc:creator><description>&lt;p&gt;Holy Cow! I just got it working..
I moved InitSPI() and radio initialisation to before the SendData loop.
Thanks for your help, sorry it was all a red herring.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote interrupt never gets hit</title><link>https://devzone.nordicsemi.com/thread/89612?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 17:38:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f16f5267-a8d8-4908-b7a4-f93e8253642c</guid><dc:creator>the_purple_pig</dc:creator><description>&lt;p&gt;There is no overlap that I can see between uart and GPIOTE pins. If I put some uart sends before the while(SendData == 0) loop and comment the loop out, the data gets sent and I keep getting GPIOTE interrupts. The moment I put the SenData() loop back, the gpiote interrupts stop again.
All it does in that loop is wait for some bytes from the host uart before proceeding, and it is definitely getting those bytes and then proceeding so the SendData loop is doing it&amp;#39;s job.
Very strange, maybe its some other factor I haven&amp;#39;t considered.&lt;/p&gt;
&lt;p&gt;Question, do you think I should install the latest SDK, and if I do, how much work will I probably need to do to get my project working with it and the latest softdevice etc? I am a bit terrified to change anything as the whole environment seems very complicated to me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote interrupt never gets hit</title><link>https://devzone.nordicsemi.com/thread/89609?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 16:40:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:641af19c-a7f0-4971-aec0-7306a3fb3dce</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;The only thing app_uart_put() does is to add data to a buffer, which should be unrelated to GPIOTE.&lt;/p&gt;
&lt;p&gt;Are you sure that it is not not the loop condition &lt;code&gt;while(SendData == 0) {}&lt;/code&gt; that is causing some trouble?&lt;/p&gt;
&lt;p&gt;Could you also double check that there is no overlap between the pins assigned for GPIOTE and UART?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote interrupt never gets hit</title><link>https://devzone.nordicsemi.com/thread/89613?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 14:07:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ec04aa6-89da-45a6-b19a-9d364674e7b4</guid><dc:creator>the_purple_pig</dc:creator><description>&lt;p&gt;Ah of course - I THINK it&amp;#39;s SDK 8.0.0, but it could also be 6.1.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote interrupt never gets hit</title><link>https://devzone.nordicsemi.com/thread/89611?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 13:57:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7687998-267a-474c-9e16-0ee2e50abe97</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Thanks, I will take a look! By SDK version,  I mean which version of our Software Development Kit the code you are using is based off from. For reference, the SDK can be downloaded here: &lt;a href="http://developer.nordicsemi.com/nRF5_SDK/"&gt;developer.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote interrupt never gets hit</title><link>https://devzone.nordicsemi.com/thread/89615?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 13:20:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e16f79f1-b078-4455-942b-d673ddb6ad0a</guid><dc:creator>the_purple_pig</dc:creator><description>&lt;p&gt;main file:
&lt;a href="https://www.dropbox.com/s/224q10fl0lnl03i/arf_main.c?dl=0"&gt;www.dropbox.com/.../arf_main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote interrupt never gets hit</title><link>https://devzone.nordicsemi.com/thread/89614?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 13:18:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bcee7f5-0ca7-4179-91f7-32dd56f8d7ea</guid><dc:creator>the_purple_pig</dc:creator><description>&lt;p&gt;Hi Kristin,
I&amp;#39;m using Keul uVision 5.14.00, CMSIS core v 4.1.0, then all the ble and softdevice seem to be 2.0.0.
That&amp;#39;s what it says in the &amp;#39;Manage Runtime Environment&amp;#39; bit in Keil at any rate.
Under Softdevice, the things in the &amp;#39;Internal&amp;#39; folder say V1.1.2.&lt;/p&gt;
&lt;p&gt;I&amp;#39;;ll attach my main in a minute when I figure out how. Thanks for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote interrupt never gets hit</title><link>https://devzone.nordicsemi.com/thread/89616?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 12:58:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da03cde7-c2cf-4f16-91d6-41e81133508e</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Which version of the SDK do you use?&lt;/p&gt;
&lt;p&gt;Could you share your main.c?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gpiote interrupt never gets hit</title><link>https://devzone.nordicsemi.com/thread/89608?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2017 21:43:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b231193-ed8f-4b99-bc22-f6e13602d64f</guid><dc:creator>the_purple_pig</dc:creator><description>&lt;p&gt;Ok, so I see that if I do get GPIOTE interrupts working just fine, if I comment out some (necessary) serial comms code in between initialising the SoftDevice and proceeding with my app.
If I uncomment what is commented out below, I never get the GPIOTE interrupt. How can that be?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;APPL_LOG(&amp;quot;init SD\n\r&amp;quot;);
InitSoftDevice();
InitHardware();     //this is where GPIOTE interrupts get set up

//while(SendData == 0)
//{
//  if(HostDetected == 0)               //HostDetected is set to 1 when the host replies to below
//  {
//    app_uart_put(0xAA);		//lets the host know this MCU is ready for comms
//    app_uart_put(VERSION);
//    nrf_delay_ms(50);
//  }
//}

nrf_delay_ms(10);		//allow the ACK to be sent via serial port
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;--proceed with application&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>