<?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>GPIO pin configuration parameters</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61520/gpio-pin-configuration-parameters</link><description>Hi, 
 
 I am using nRF52840 S140 V7.0.1. I have few queries on GPIO configurations. 
 
 Below are my PULLUP/PULLDOWN macros. 
 
 As per my understanding 
 
 1) In below settings, pin is configured as PULLDOWN . So by default pin will be in low state </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 May 2020 13:46:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61520/gpio-pin-configuration-parameters" /><item><title>RE: GPIO pin configuration parameters</title><link>https://devzone.nordicsemi.com/thread/251013?ContentTypeID=1</link><pubDate>Wed, 20 May 2020 13:46:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e23fdeb1-9096-41c5-abac-a7396d5f2014</guid><dc:creator>beemavishnu</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry for confusion and further queries. Currently I don&amp;rsquo;t have CRO to see the level on pin.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Below is button_event_handler() code.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void button_event_handler(uint8_t pin_no, uint8_t button_action)
{
    ret_code_t err_code;
    
    switch (pin_no)
    {
        case FMD_WAKEUP_PIN:
        {
            if(button_action == APP_BUTTON_PUSH)
            {
                NRF_LOG_INFO(&amp;quot;Wakeup High&amp;quot;);
            }
            else
            {
                NRF_LOG_INFO(&amp;quot;Wakeup Low&amp;quot;);
            }
        }
        break;
        
        default:
            APP_ERROR_HANDLER(pin_no);
            break;
    }
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Because of GPIOTE_CONFIG_IN_SENSE_TOGGLE(), I will be receiving interrupt for both High to Low and Low to High.&lt;/p&gt;
&lt;p&gt;Since I configured BUTTON_PULLDOWN, I connected P1.01 to VDD for getting interrupts.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My confusion / queries are&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1) For below configuration, by default P1.01 will be low. When I connect pin P1.01 to VDD, I am getting interrupt but button_action is 0. Does that mean, level on pin is low. Actuall I am connecting P1.01 to VDD where pin level should be High. When I remove P1.01 from VDD I will get one more interrupt with button_action as 1. Hear ideally I am disconnecting from VDD and pin level will be 0.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Whether buttion_action is different from actual pin level.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;{FMD_WAKEUP_PIN, APP_BUTTON_ACTIVE_LOW, BUTTON_PULLDOWN, button_event_handler}, // Pull-Down, Active Low&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2) For above configuration, when will debounce logic will execute. Is it from High to Low or Low to High or both.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks &amp;amp; Regards&lt;/p&gt;
&lt;p&gt;Vishnu Beema&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO pin configuration parameters</title><link>https://devzone.nordicsemi.com/thread/250406?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 10:34:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa58511e-b83e-43e6-ac99-28c80576c7d1</guid><dc:creator>beemavishnu</dc:creator><description>&lt;p&gt;Thank you for your inputs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO pin configuration parameters</title><link>https://devzone.nordicsemi.com/thread/250405?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 10:18:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1c842f3-0031-4346-b955-b97a24f34884</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1)&lt;/p&gt;
&lt;p&gt;The pin is pulled low meaning it&amp;#39;s pulled down to GND i.e 0. The event handler will be called when the pin is high, i.e it&amp;#39;s active HIGH.&lt;/p&gt;
&lt;p&gt;2)&lt;/p&gt;
&lt;p&gt;The pin is pulled low i.e GND. The event handler will be called when the pin is low i.e it&amp;#39;s active LOW.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>