<?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>Two GPIOTE not working at the same time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113482/two-gpiote-not-working-at-the-same-time</link><description>Hi, 
 I&amp;#39;m trying to use to gpio pins in order to wake up a system from sleep mode.(PIN1= P0.24 PIN2 =P1.1 ) 
 If I use the GPIOTEs separately in my project, it works and sytem wakes up, but if I use both GPIOTEs at the same time, it doesnt work. 
 below</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Jul 2024 14:29:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113482/two-gpiote-not-working-at-the-same-time" /><item><title>RE: Two GPIOTE not working at the same time</title><link>https://devzone.nordicsemi.com/thread/496257?ContentTypeID=1</link><pubDate>Tue, 30 Jul 2024 14:29:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a115f2d3-535b-4707-9237-7cc40fc85c84</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;In the last lines of your code you setup the IN event on LOW by using&amp;nbsp;nrf_gpio_cfg_sense_input(). This means that if either P0.24 or P1.1 is pulled low, then the IN event will be generated. Thus you need to make sure that both pins are pulled low before you go system off sleep.&lt;/p&gt;
&lt;p&gt;I made a simple sample setting up the IN event on Button 1 and Button 2 for HIGH on the devkit and it worked:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stdint.h&amp;gt;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;
#include &amp;quot;nrf_gpio.h&amp;quot;
#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_log_default_backends.h&amp;quot;

#define LED_PIN 13
#define BUTTON_1 11
#define BUTTON_2 12

int  main(void)
{

nrf_gpio_cfg_output(LED_PIN);
nrf_gpio_pin_clear(LED_PIN);

 nrf_delay_ms(2000);
 nrf_gpio_pin_set(LED_PIN);
 nrf_gpio_cfg_sense_input(BUTTON_1, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
 nrf_gpio_cfg_sense_input(BUTTON_2, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);


  while (1)
  {
    NRF_POWER-&amp;gt;SYSTEMOFF = 1;
    nrf_delay_ms(2000);
  }


return 0;
}

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Two GPIOTE not working at the same time</title><link>https://devzone.nordicsemi.com/thread/495996?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2024 12:06:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc93fec7-55b3-4838-a737-49433a578e4e</guid><dc:creator>Emrah Eksisu</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, it does not wake up from sleep mode.&lt;/p&gt;
&lt;p&gt;The pin P1.1 is pulled through the pull-down circuit.&lt;br /&gt;The pin P0.24 is pulled over the pull-up circuit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Two GPIOTE not working at the same time</title><link>https://devzone.nordicsemi.com/thread/495991?ContentTypeID=1</link><pubDate>Mon, 29 Jul 2024 11:51:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb2f9cd2-0a51-4240-8c04-d2cf53cda192</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;By doesn&amp;#39;t work, you mean that it does not wakeup from sleep?&lt;/p&gt;
&lt;p&gt;Can you double check that none of the pins are already held high when you test this? If one of the pins are already high when you try to test this, it will effectively block the other interrupts pins from firing,&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>