<?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>2 GPIOTE Interrupts, Only one of the handler functions being hit</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24111/2-gpiote-interrupts-only-one-of-the-handler-functions-being-hit</link><description>Hello: 
 I dont seem to understand what the problem is. I have 2 external ICs, one is an IMU and the other is a CDC. Both have interrupt pins connected to the nordic nRF52832 pins 12 and 26. I configure the pins as shown bellow. 
 nrf_drv_gpiote_in_config_t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Aug 2017 13:01:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24111/2-gpiote-interrupts-only-one-of-the-handler-functions-being-hit" /><item><title>RE: 2 GPIOTE Interrupts, Only one of the handler functions being hit</title><link>https://devzone.nordicsemi.com/thread/94931?ContentTypeID=1</link><pubDate>Wed, 09 Aug 2017 13:01:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac4abde0-2a5e-4ec3-acfc-7dffa569aa4d</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;If INT signal is high before the gpiote is set-up, the interrupt will never trigger because there is no transition from  low to high after the gpiote is enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 2 GPIOTE Interrupts, Only one of the handler functions being hit</title><link>https://devzone.nordicsemi.com/thread/94930?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 21:09:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ad353be-f49f-439e-bdc6-2dddb8f8aa96</guid><dc:creator>Wael</dc:creator><description>&lt;p&gt;Well, I finally brought the scope to my desk so that I can see the INT signal on the scope while I&amp;#39;m debugging. Come to find out, the interrupt does not get triggered during debug mode BUT DOES work when I flash the device and do not run in debug mode. I am using Keil version 5.23 and can not figure out why this is happening. During Debugging, the INT2(Pcap) IC handler does get hit.&lt;/p&gt;
&lt;p&gt;This is what I&amp;#39;m seeing when I Debug:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Erase the Flash&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;repower the device (the INT1 signal is low as expected)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;press the Debug button
while the program is downloading, I can see the INT signal on the scope until the program breaks at the first line in the main function. (the signal stays high)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;press the Go button( the signal stays high) and the breakpoint in the handler is never hit)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Any help would e greatly appreciated.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 2 GPIOTE Interrupts, Only one of the handler functions being hit</title><link>https://devzone.nordicsemi.com/thread/94929?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2017 12:08:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92f71881-124b-4a4e-ac13-158dc6c014ff</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;No, the function names can be different, i.e. you can use both &lt;code&gt;in_pin_handler&lt;/code&gt; and &lt;code&gt;IMU_INT1_pin_handler&lt;/code&gt;. I have tried reproducing the issue using SDK 11, but I’m not seeing any problems here. Please make sure that the IMU is connect to the correct nRF-pin(IMU_INT1_PIN). Did you try debug mode? Exactly how are you checking if the interrupt is triggered?&lt;/p&gt;
&lt;p&gt;Also make sure that nothing is reconfiguring the pin later in you program. i.e. check that GPIOTE register and GPIO P0 register are correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 2 GPIOTE Interrupts, Only one of the handler functions being hit</title><link>https://devzone.nordicsemi.com/thread/94928?ContentTypeID=1</link><pubDate>Mon, 07 Aug 2017 20:21:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14500b21-20ba-4f44-a5b7-c614e72bfeb0</guid><dc:creator>Wael</dc:creator><description>&lt;p&gt;11, yes I am using a softdevice/ble. lowering the priority did nothing. I also tested it without the internal pull down and same results. I am going nuts, please help. BTW does the handler function names need to be the same for both INTs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 2 GPIOTE Interrupts, Only one of the handler functions being hit</title><link>https://devzone.nordicsemi.com/thread/94927?ContentTypeID=1</link><pubDate>Mon, 07 Aug 2017 14:09:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84de25be-0a25-4bdd-b7f4-6ba8b10a62df</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;What SDK version are you using ? Are you using the SoftDevice/BLE? Try lowering the &lt;code&gt;GPIOTE_CONFIG_IRQ_PRIORITY&lt;/code&gt; in &lt;code&gt;sdk_config.h&lt;/code&gt;, to e.g. to 3. If you are using SDK 11 or lower use nrf_drv_config.h instead of sdk_config.h. You can also test it without the internal pulldown, and see if that helps. Note that the pin need to reach voltage of 0.7 * Vdd to be detected as &amp;quot;high&amp;quot;.&lt;/p&gt;
&lt;p&gt;Also make sure that you are not running into any error-handlers, see &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/?answer=60126#post-id-60126"&gt;here&lt;/a&gt; on how to debug.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 2 GPIOTE Interrupts, Only one of the handler functions being hit</title><link>https://devzone.nordicsemi.com/thread/94926?ContentTypeID=1</link><pubDate>Mon, 07 Aug 2017 13:14:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c43ec3d1-b255-4799-b215-0d30733d0bba</guid><dc:creator>Wael</dc:creator><description>&lt;p&gt;Hello:&lt;/p&gt;
&lt;p&gt;Thanks for your reply. I have checked the IMU_INT1_PIN  with a oscilloscope and it functions as it should. Is it possible the issue is I have 2 different handler names for the different IRQs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 2 GPIOTE Interrupts, Only one of the handler functions being hit</title><link>https://devzone.nordicsemi.com/thread/94925?ContentTypeID=1</link><pubDate>Mon, 07 Aug 2017 12:52:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d6f34d5-c0a2-4695-89a0-1bc8e98c6487</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see anything wrong with the code you posted. Note that you have pulldown on IMU_INT1_PIN, but not on CDC_INT_PIN. When &lt;code&gt;CDC_INT_PIN&lt;/code&gt; goes from &lt;strong&gt;high to low,&lt;/strong&gt; the in_pin_handler should be triggered and when &lt;code&gt;IMU_INT1_PIN&lt;/code&gt; goes from &lt;strong&gt;low to high&lt;/strong&gt; IMU_INT1_pin_handler should be triggered.&lt;/p&gt;
&lt;p&gt;You should check with a oscilloscope/logic analyzer that the &lt;code&gt;IMU_INT1_PIN&lt;/code&gt; pin actually goes high, if not the interrupt will of course not be triggered.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>