<?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>Exiting Sleep mode via GPIO interrupt</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87173/exiting-sleep-mode-via-gpio-interrupt</link><description>I&amp;#39;ve been playing around with the v1.9.1\zephyr\samples\boards\nrf\system_off\ example code, as I want to implement something similar in my own code. But I want to be able to detect which GPIO caused the system to exit from system off, update a counter</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Apr 2022 22:56:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87173/exiting-sleep-mode-via-gpio-interrupt" /><item><title>RE: Exiting Sleep mode via GPIO interrupt</title><link>https://devzone.nordicsemi.com/thread/365053?ContentTypeID=1</link><pubDate>Tue, 26 Apr 2022 22:56:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:533b7524-5e95-4a17-aece-98f954da8ebd</guid><dc:creator>Mike Austin (LPI)</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;Great, that makes sense.&amp;nbsp; Thanks for the explanation&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Exiting Sleep mode via GPIO interrupt</title><link>https://devzone.nordicsemi.com/thread/364376?ContentTypeID=1</link><pubDate>Fri, 22 Apr 2022 07:40:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed6757c0-f3ac-4d20-bfd0-804da6b4ccc0</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Mike,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;GPIO wakeup from system OFF uses the GPIO SENSE event. While normally in system ON idle, the gpio interrupt is generated by GPIOTE IN event which does not work in system OFF. Therefore, the function gpio_pin_interrupt_configure_dt&amp;nbsp;will not work in the sleep mode because that uses the GPIOTE IN event.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Exiting Sleep mode via GPIO interrupt</title><link>https://devzone.nordicsemi.com/thread/364334?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 23:10:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f87145a4-1cc6-4722-ae0e-b93ccbe53c13</guid><dc:creator>Mike Austin (LPI)</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;Thanks, but if you read my original post, you&amp;#39;ll see I have been using that example, and that API.&amp;nbsp; My question pertains to why I need to essentially configure the GPIO for &amp;quot;normal&amp;quot; interrupts using one API, and then reconfigure it again for &amp;quot;exit sleep mode&amp;quot; interrupts using a different API.&lt;/p&gt;
&lt;p&gt;Can I configure the API to trigger both types of interrupts with one API?&amp;nbsp; Or do I have to call the:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrf_gpio_cfg_sense_set(DT_GPIO_PIN(DT_NODELABEL(button0), gpios), NRF_GPIO_PIN_SENSE_LOW);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;API just prior to going into sleep mode so that the GPIO will trigger it out of sleep mode, then call the:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;gpio_pin_interrupt_configure_dt(&amp;amp;sml_strike,GPIO_INT_EDGE_TO_ACTIVE);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;API to configure the GPIO to trigger my ISR within my code when its operating normally?&lt;/p&gt;
&lt;p&gt;Thanks and regards,&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Exiting Sleep mode via GPIO interrupt</title><link>https://devzone.nordicsemi.com/thread/364137?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 08:34:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02b642fd-978b-4765-9bd9-3be21483087b</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To wake up from the sleep mode (system off), &lt;span&gt;see&amp;nbsp;the correct settings in&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/a4edab554f67590a89703067af703c7996604562/samples/boards/nrf/system_off/src/main.c#L61-64"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/a4edab554f67590a89703067af703c7996604562/samples/boards/nrf/system_off/src/main.c#L61-64&lt;/a&gt;&lt;span&gt;&amp;nbsp;:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_gpio_cfg_input(DT_GPIO_PIN(DT_NODELABEL(button0), gpios), NRF_GPIO_PIN_PULLUP);
nrf_gpio_cfg_sense_set(DT_GPIO_PIN(DT_NODELABEL(button0), gpios), NRF_GPIO_PIN_SENSE_LOW);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>