<?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>How to use GPIOTE_IRQHandler for multiple interrupt request ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6262/how-to-use-gpiote_irqhandler-for-multiple-interrupt-request</link><description>Hi, 
 I have an issue in using GPIOTE_IRQHandler. 
 Let me give an explanation about our implementaiton. 
 we have nRF controller which is connected to STM32 controller. 
 Currently the GPIO pin P0.17 on nRF is used as a interrupt pin for NRF for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Sep 2015 15:04:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6262/how-to-use-gpiote_irqhandler-for-multiple-interrupt-request" /><item><title>RE: How to use GPIOTE_IRQHandler for multiple interrupt request ?</title><link>https://devzone.nordicsemi.com/thread/21901?ContentTypeID=1</link><pubDate>Wed, 16 Sep 2015 15:04:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7b8cf39-8397-4642-acdc-d08197ef52dd</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Rita: Please create another question don&amp;#39;t piggybacking a question here.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see any reason why you can&amp;#39;t configure 2 pins with different sense level. You just have to call the  nrf_gpio_cfg_sense_input() 2 times, one for each pin.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use GPIOTE_IRQHandler for multiple interrupt request ?</title><link>https://devzone.nordicsemi.com/thread/21900?ContentTypeID=1</link><pubDate>Wed, 16 Sep 2015 09:40:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e377a0d5-b943-4a22-91b1-fb6c603a9b8b</guid><dc:creator>Rita</dc:creator><description>&lt;p&gt;@all, I have a simular question. I use the API nrf_gpio_cfg_sense_input() to configure two pin as input for SENSE signal. But the two pins have different SENSE level. One is &amp;quot;NRF_GPIO_PIN_SENSE_HIGH&amp;quot; and the other is &amp;quot;NRF_GPIO_PIN_SENSE_LOW&amp;quot;. How can I confugure like this? Thanks a lot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use GPIOTE_IRQHandler for multiple interrupt request ?</title><link>https://devzone.nordicsemi.com/thread/21899?ContentTypeID=1</link><pubDate>Mon, 30 Mar 2015 16:22:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d7b6753-b704-4638-beb9-eed5628edeff</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Anand: You can just make another PIN_CNF[] configuration for pin P0.20 and it will be able to do the same thing as P0.17:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_GPIO-&amp;gt;PIN_CNF[20] = (GPIO_PIN_CNF_SENSE_Low &amp;lt;&amp;lt; GPIO_PIN_CNF_SENSE_Pos)
                                        | (GPIO_PIN_CNF_DRIVE_S0S1 &amp;lt;&amp;lt; GPIO_PIN_CNF_DRIVE_Pos)
                                        | (NRF_GPIO_PIN_NOPULL &amp;lt;&amp;lt; GPIO_PIN_CNF_PULL_Pos)
                                        | (GPIO_PIN_CNF_INPUT_Connect &amp;lt;&amp;lt; GPIO_PIN_CNF_INPUT_Pos)
                                        | (GPIO_PIN_CNF_DIR_Input &amp;lt;&amp;lt; GPIO_PIN_CNF_DIR_Pos);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can also have a look at ram_retention example where we use nrf_gpio_cfg_sense_input to configure the wakeup pin, it&amp;#39;s pretty much the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use GPIOTE_IRQHandler for multiple interrupt request ?</title><link>https://devzone.nordicsemi.com/thread/21898?ContentTypeID=1</link><pubDate>Mon, 30 Mar 2015 14:01:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7014a2f-d6b6-4b0f-a8c7-f1ac832636f1</guid><dc:creator>Anand Ramashetty</dc:creator><description>&lt;p&gt;Hi ,&lt;/p&gt;
&lt;p&gt;I cannot share the full code due to confidentiality. But I can give some hint on that.&lt;/p&gt;
&lt;h2&gt;for GPIO pin P0.17 .&lt;/h2&gt;
&lt;p&gt;static void function_1(void)
{&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	  NRF_GPIO-&amp;gt;PIN_CNF[IO1_NRF] = (GPIO_PIN_CNF_SENSE_Low &amp;lt;&amp;lt; GPIO_PIN_CNF_SENSE_Pos)
	                                        | (GPIO_PIN_CNF_DRIVE_S0S1 &amp;lt;&amp;lt; GPIO_PIN_CNF_DRIVE_Pos)
	                                        | (NRF_GPIO_PIN_NOPULL &amp;lt;&amp;lt; GPIO_PIN_CNF_PULL_Pos)
	                                        | (GPIO_PIN_CNF_INPUT_Connect &amp;lt;&amp;lt; GPIO_PIN_CNF_INPUT_Pos)
	                                        | (GPIO_PIN_CNF_DIR_Input &amp;lt;&amp;lt; GPIO_PIN_CNF_DIR_Pos);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;// Set correct IRQ priority and clear any possible pending interrupt.
NVIC_SetPriority(GPIOTE_IRQn, SPI1_TWI1_IRQ_PRI);
NVIC_ClearPendingIRQ(GPIOTE_IRQn);
NVIC_EnableIRQ(GPIOTE_IRQn);
NRF_GPIOTE-&amp;gt;INTENSET = GPIOTE_INTENSET_PORT_Set &amp;lt;&amp;lt; GPIOTE_INTENSET_PORT_Pos;
}&lt;/p&gt;
&lt;p&gt;void GPIOTE_IRQHandler(void)
{&lt;/p&gt;
&lt;p&gt;// Event causing the interrupt must be cleared
if ((NRF_GPIOTE-&amp;gt;EVENTS_PORT != 0))
{
NRF_GPIOTE-&amp;gt;EVENTS_PORT = 0;
}&lt;/p&gt;
&lt;p&gt;nrf_gpio_pin_clear(P0.12);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Now i am using GPIO P0.20 for nRF wake up from system sleep mode.&lt;/p&gt;
&lt;p&gt;How i can configure this pin to wake up from system off mode and how i can handle  interrupt handler GPIOTE_IRQHandler. Please give some line of code for the same to test.&lt;/p&gt;
&lt;p&gt;Regards,
Anand&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use GPIOTE_IRQHandler for multiple interrupt request ?</title><link>https://devzone.nordicsemi.com/thread/21897?ContentTypeID=1</link><pubDate>Mon, 30 Mar 2015 13:30:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7882c4c3-9407-477b-af11-c60cac9baf83</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Anand,&lt;/p&gt;
&lt;p&gt;Could you upload your full code ?&lt;/p&gt;
&lt;p&gt;To configure a GPIO pin to work as input interrupt for GPIOTE Port event, besides enabling &amp;quot;NRF_GPIOTE-&amp;gt;INTENSET = GPIOTE_INTENSET_PORT_Set &amp;lt;&amp;lt; GPIOTE_INTENSET_PORT_Pos;&amp;quot;&lt;/p&gt;
&lt;p&gt;You would also need to configure the PIN_CNF[] register for that pin to set the SENSE level (high or low). You can have a look at chapter 14 in the nRF51 Reference Manual.&lt;/p&gt;
&lt;p&gt;You can use this API: nrf_gpio_cfg_sense_input() to configure a pin as input for SENSE signal.&lt;/p&gt;
&lt;p&gt;So if you have that configured for pin P0.17 you can apply the same for pin P0.20.&lt;/p&gt;
&lt;p&gt;PORT event and IN[] are different in the sense that for PORT event there is only one interrupt for all pins with Sense signal. IN events, you have 4 separated event for each, but you have maximum 4 pins can be used at a time when PORT event can have no limit pins with Sense signal. PORT event consume much less power (1uA) compare to IN event that can comsume upto 1mA. Also IN event can&amp;#39;t wake system up from SystemOFF.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use GPIOTE_IRQHandler for multiple interrupt request ?</title><link>https://devzone.nordicsemi.com/thread/21896?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2015 17:36:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40a73229-cb35-4bfe-8a11-6c6c0295a709</guid><dc:creator>Anand Ramashetty</dc:creator><description>&lt;p&gt;soft device used: &lt;strong&gt;s110_nrf51822_7.0.0_softdevice&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use GPIOTE_IRQHandler for multiple interrupt request ?</title><link>https://devzone.nordicsemi.com/thread/21895?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2015 17:05:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5dff8db8-db61-4874-97f7-dcca3b9ad523</guid><dc:creator>Anand Ramashetty</dc:creator><description>&lt;p&gt;Hi ,&lt;/p&gt;
&lt;p&gt;I am using nRF 51822 version 3.1(32KB RAM variant) and SDK 6&lt;/p&gt;
&lt;p&gt;Regards,
Anand&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use GPIOTE_IRQHandler for multiple interrupt request ?</title><link>https://devzone.nordicsemi.com/thread/21894?ContentTypeID=1</link><pubDate>Fri, 27 Mar 2015 14:20:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b168c33-c627-472b-8059-9940982d360f</guid><dc:creator>Anand Ramashetty</dc:creator><description>&lt;p&gt;For your information , For the GPIO pin P0.17 I have configured it has   &amp;quot;NRF_GPIOTE-&amp;gt;INTENSET = GPIOTE_INTENSET_PORT_Set &amp;lt;&amp;lt; GPIOTE_INTENSET_PORT_Pos;&amp;quot;&lt;/p&gt;
&lt;p&gt;How I can configure the P0.20 ?&lt;/p&gt;
&lt;p&gt;what is the difference between Enable interrupt on PORT event and Enable interrupt on IN[3] event ? which one I can use in my case.&lt;/p&gt;
&lt;p&gt;Regards,
Anand&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>