<?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 configure interrupt on gpio pin to detect button state.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27333/how-to-configure-interrupt-on-gpio-pin-to-detect-button-state</link><description>Hi Team, 
 I am using sdk12.2.2 and nrf52. I want to use one gpio to detect button state &amp;amp; have to operation on that event. 
 I used one method to configure(code snippet written below) 
 nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_TOGGLE</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Nov 2017 13:35:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27333/how-to-configure-interrupt-on-gpio-pin-to-detect-button-state" /><item><title>RE: How to configure interrupt on gpio pin to detect button state.</title><link>https://devzone.nordicsemi.com/thread/107966?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2017 13:35:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f196394-8545-4d94-a7a1-4b63bd1033a7</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Did you try to configure the pin with the accuracy flag set to false?&lt;/p&gt;
&lt;p&gt;Then you should get considerably lower sleep currents, but accuracy might suffer if you toggle the pin very quickly.&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;
Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure interrupt on gpio pin to detect button state.</title><link>https://devzone.nordicsemi.com/thread/107965?ContentTypeID=1</link><pubDate>Fri, 17 Nov 2017 13:40:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f4b471c-0003-438a-96d6-c6f9eb74c1bb</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;You don&amp;#39;t use interrupts to detect GPIO value LOW/HIGH (= &amp;quot;button state&amp;quot; if you want). Simply configure GPIO line as input and read it (see functions &lt;code&gt;nrf_gpio_cfg_input&lt;/code&gt; and &lt;code&gt;nrf_gpio_pin_read&lt;/code&gt; in &lt;code&gt;components\drivers_nrf\hal\nrf_gpio.h&lt;/code&gt; file).&lt;/p&gt;
&lt;p&gt;However if you also want to detect change of that value then you need to configure and use GPIOTE and that comes at cost of few micro Amps. It cannot live from nothing, that looks logical to me. If 20uA ruins your device then you are probably building thing according to unrealistic requirements/assumptions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>