<?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 set the GPIO pin input to no pull or float mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83247/how-to-set-the-gpio-pin-input-to-no-pull-or-float-mode</link><description>Hi, 
 I am using NCS for development and configuring GPIO pin as input, but I found the GPIO can&amp;#39;t configuring as NO-PULL mode. There are only two options: Pull up and Pull Down. 
 
 I can find the option NRF_GPIO_PIN_NOPULL in the SDK &amp;quot;nrf5_SDK_for_Mesh_v5</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Jan 2022 08:20:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83247/how-to-set-the-gpio-pin-input-to-no-pull-or-float-mode" /><item><title>RE: How to set the GPIO pin input to no pull or float mode</title><link>https://devzone.nordicsemi.com/thread/346047?ContentTypeID=1</link><pubDate>Wed, 05 Jan 2022 08:20:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d6aba6e-0e3d-4cc8-94a2-23bb8fc01023</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The code snippet you have here is from the implementation of&amp;nbsp;dk_buttons_init() in&amp;nbsp;nrf\lib\dk_buttons_and_leds\dk_buttons_and_leds.c, and the difference is that you have removed the flags that configure pull.&lt;/p&gt;
&lt;p&gt;In what way does this not work?&lt;/p&gt;
&lt;p&gt;Also, why do you want to remove pull from the input for this button handling code? Unless the input is &lt;em&gt;always&lt;/em&gt; driven, which is typically not the case for buttons etc., then a pull resistor is needed. A floating input will cause problems.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set the GPIO pin input to no pull or float mode</title><link>https://devzone.nordicsemi.com/thread/346012?ContentTypeID=1</link><pubDate>Wed, 05 Jan 2022 02:59:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93244fac-d5fb-440f-9c68-3dcf042f7ec2</guid><dc:creator>Alex.Guo</dc:creator><description>&lt;p&gt;Hi Einar,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;&lt;span class="tgt"&gt;I tried to modify the code in NCS, but it didn&amp;#39;t work.&lt;/span&gt;&lt;span class="tgt"&gt; Is there something wrong?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1641351423558v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Thanks a lot!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to set the GPIO pin input to no pull or float mode</title><link>https://devzone.nordicsemi.com/thread/345578?ContentTypeID=1</link><pubDate>Mon, 03 Jan 2022 07:59:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2299a36c-3a32-4a15-adf8-be32981372bc</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Pull is configured by writing to the&amp;nbsp;PULL field in the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52833/gpio.html?cp=4_1_0_5_7_1_9#register.PIN_CNF-0-31"&gt;PIN_CNF &lt;/a&gt;register for a specific pin. If this field is 0, which is default, pull is disabled. So by default there is no need to do anything. If you have configured a pull, and want to disable it again, write 0 to this field.&lt;/p&gt;
&lt;p&gt;Using Zephyr APIs, this means that to avoid using any pull, simply do not configure either&amp;nbsp;pull up or pull down.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>