<?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 disconnect a GPIO pin</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110328/how-to-disconnect-a-gpio-pin</link><description>i have a custom board that uses a nrf5340 that has been hardware modified so i can work again on getting my board to draw the mimimum power from the battery. 
 i have a PPK2 kit to measure the power i am drawing. 
 right now in SYSTEM_OFF state I am drawing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 09 Aug 2024 03:50:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110328/how-to-disconnect-a-gpio-pin" /><item><title>RE: how to disconnect a GPIO pin</title><link>https://devzone.nordicsemi.com/thread/497545?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 03:50:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6f06a37-8203-441c-b244-d0ed309a06e0</guid><dc:creator>weightwatcherphil</dc:creator><description>&lt;p&gt;i have been very busy on another project.&amp;nbsp; thanks very much for this answer and you may close the ticket.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disconnect a GPIO pin</title><link>https://devzone.nordicsemi.com/thread/485059?ContentTypeID=1</link><pubDate>Tue, 21 May 2024 11:16:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fb480e2-748c-43e3-bb37-c7ef7e51c5b9</guid><dc:creator>Naeem Maroof</dc:creator><description>[quote user="weightwatcherphil"]&lt;p&gt;1 -what is the call i should make in zephyr to replace&lt;/p&gt;
&lt;p&gt;gpio_pin_configure_dt( &amp;amp;shut_adc_ain1_, GPIO_INPUT); //AIN1 - unused pin&lt;/p&gt;[/quote]
&lt;p&gt;Please use &amp;quot;&lt;span&gt;gpio_pin_configure()&amp;quot; as suggested previously?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="weightwatcherphil"]&lt;p&gt;2 what call should i make in zephyr to replace&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; nrf_gpio_cfg_default(NRF_GPIO_PIN_MAP(1,k));&lt;/p&gt;[/quote]
&lt;p&gt;&lt;span&gt;the nrf_gpio_cfg_default calls the nrf_gpio_cfg() function with the default values&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;NRF_STATIC_INLINE void nrf_gpio_cfg_default(uint32_t pin_number)
{
    nrf_gpio_cfg(
        pin_number,
        NRF_GPIO_PIN_DIR_INPUT,
        NRF_GPIO_PIN_INPUT_DISCONNECT,
        NRF_GPIO_PIN_NOPULL,
        NRF_GPIO_PIN_S0S1,
        NRF_GPIO_PIN_NOSENSE);
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can use the gpio_pin_configure() function to configure a single pin and provide flags for pin configuration:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1716289514200v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can see that nrfx uses default pin direction as &amp;quot;input&amp;quot; and also by default &amp;quot;disconnected&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Zephyr GPIO API also provides you with the flags, and you can use them&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1716289908125v2.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="weightwatcherphil"]&lt;p&gt;3 what reason might this cause us to draw less power on the I2C pins.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; nrf_gpio_cfg(NRF_GPIO_PIN_MAP(1,k),NRF_GPIO_PIN_DIR_INPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_S0D1, NRF_GPIO_PIN_NOSENSE);&amp;nbsp;&lt;/p&gt;[/quote]
&lt;p&gt;&lt;span&gt;The reason is that you have configured the pin with no sense mechanism, no pull, and also disconnected. That is low power config.&lt;/span&gt;&lt;/p&gt;
[quote user="weightwatcherphil"]if we &amp;quot;disconnect a GPIO pin does it still have ESD diodes ?[/quote]
&lt;p&gt;ESD protection is there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disconnect a GPIO pin</title><link>https://devzone.nordicsemi.com/thread/482899?ContentTypeID=1</link><pubDate>Sun, 12 May 2024 04:45:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ca54a89-01a8-436b-b693-0724173e9b17</guid><dc:creator>weightwatcherphil</dc:creator><description>&lt;p&gt;we use these pins for I2c&lt;/p&gt;
&lt;p&gt;// pins used by I2c&lt;br /&gt; // I2C_SCL P1.03&lt;br /&gt; // I2C_SDA P1.02&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;we are using PPK2 kit to measure current drawn from our battery.&lt;/p&gt;
&lt;p&gt;we measure about 132 ua in we are in system OFF state.&lt;/p&gt;
&lt;p&gt;most ot that power is due to other chips on our board such as a battery charger, etc. and we are addressing those issues by changing the electronics.&lt;/p&gt;
&lt;p&gt;we just want to make sure the processor is drawing the smallest amount of power possible.&lt;/p&gt;
&lt;p&gt;we used nrfx library calls to get us there.&lt;/p&gt;
&lt;p&gt;now I would like to use Zephyr code to put the pins in the same state as we did with nrfx library calls.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;we were told that using&amp;nbsp;&lt;/p&gt;
&lt;p&gt;gpio_pin_configure_dt&amp;nbsp; ORs the flags with what is present we would like to know how to set the flags.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;so two questions:&lt;/p&gt;
&lt;p&gt;1 -what is the call i should make in zephyr to replace&lt;/p&gt;
&lt;p&gt;gpio_pin_configure_dt( &amp;amp;shut_adc_ain1_, GPIO_INPUT); //AIN1 - unused pin&lt;/p&gt;
&lt;p&gt;with something that will set the flags and not or them.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2 what call should i make in zephyr to replace&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; nrf_gpio_cfg_default(NRF_GPIO_PIN_MAP(1,k));&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;3 what reason might this cause us to draw less power on the I2C pins.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; nrf_gpio_cfg(NRF_GPIO_PIN_MAP(1,k),NRF_GPIO_PIN_DIR_INPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_S0D1, NRF_GPIO_PIN_NOSENSE);&amp;nbsp; //not sure why this is needed, but seems to be required for the I2C pins&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;the chips the I2C pins are connected have had there VCC power turned off by a mosfet switch.&lt;/p&gt;
&lt;p&gt;so the power pin is more or less floating.&amp;nbsp; maybe that is an issue and we are feeding power through some protection diodes in the processor ?&lt;/p&gt;
&lt;p&gt;if we &amp;quot;disconnect a GPIO pin does it still have ESD diodes ?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;sorry i cannot share the full schematic and i know that makes a full answer difficult so i will take all teh help and ideas i can get.&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
&lt;p&gt;phil&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disconnect a GPIO pin</title><link>https://devzone.nordicsemi.com/thread/481971?ContentTypeID=1</link><pubDate>Mon, 06 May 2024 10:45:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:739699e3-65f2-42cf-8371-8b6a82d62717</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Which pins you are using for the I2C?&lt;/p&gt;
&lt;p&gt;What error / problem you are getting for the updated code that you wrote?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disconnect a GPIO pin</title><link>https://devzone.nordicsemi.com/thread/481361?ContentTypeID=1</link><pubDate>Wed, 01 May 2024 06:19:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff024041-1851-4a20-b9bc-37116eb44387</guid><dc:creator>weightwatcherphil</dc:creator><description>&lt;p&gt;my boss wrote the following code&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and it sets the pins like we want them.&lt;/p&gt;
&lt;p&gt;i want to do the same thing but use zephy commands.&lt;/p&gt;
&lt;p&gt;this code uses the nffx library.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;--Here is the routine.  It doesn&amp;#39;t touch P0.24, P0.11 and sets the driver a little differently for the I2C pins (not exactly sure why that&amp;#39;s needed, but it does help):

int set_all_gpios_to_input_except_wake_up_and_power_control(void){




    printk(&amp;quot;Put all GPIOS in DEFAULT state except the WAKEUP GPIO pin and the VDD control pin \n&amp;quot;);




    for (int k=0;k&amp;lt;32;k++)

    {

        if ((k != 11) &amp;amp;&amp;amp; (k != 24)) //P0.24 is the button so don&amp;#39;t touch that.  P0.11 turns off the VDD, so don&amp;#39;t touch that

            nrf_gpio_cfg_default(NRF_GPIO_PIN_MAP(0,k));

        if ((k &amp;lt;= 15))  //P1 only goes to 15

            if ((k==2) || (k==3))  //I2C pins handled differently for some reason, otherwise they consume extra power

                nrf_gpio_cfg(NRF_GPIO_PIN_MAP(1,k),NRF_GPIO_PIN_DIR_INPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_S0D1, NRF_GPIO_PIN_NOSENSE);  //not sure why this is needed, but seems to be required for the I2C pins

            else

                nrf_gpio_cfg_default(NRF_GPIO_PIN_MAP(1,k));

    }

    return true;

}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;here is the code i have now.&amp;nbsp; i want to get _DT to work and avoid the call to&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nrf_gpio_cfg_default(NRF_GPIO_PIN_MAP(1,k));&lt;/p&gt;
&lt;p&gt;one thing we do not understand is why this line causes us to draw a lower current.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nrf_gpio_cfg(NRF_GPIO_PIN_MAP(1,k),NRF_GPIO_PIN_DIR_INPUT, NRF_GPIO_PIN_INPUT_DISCONNECT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_S0D1, NRF_GPIO_PIN_NOSENSE); &amp;nbsp;//not sure why this is needed, but seems to be required for the I2C pins&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int set_all_gpios_to_input_except_wake_up_and_power_control(void){

	printk(&amp;quot;put all GPIOS in INPUT state except the WAKEUP GPIO pin and the four power control pins \n&amp;quot;);

    // pins used for power control
	// leave these GPIOS alone.  They are in the OUTPUT state set to zero and control the power supplies
	
	//      PWR_EN   P0.21  //pwr5Ven    used to enable the 5V power so we ignore it since it is an output controlling the 5V power
	//      CHG_EN_L P0.23  //chrgen     used to enable the charger so we ignore it since its an output controlling the charage enable
    //      VDD_ON   P0.11  //Vddon      used to enable teh VDD power so we ignore it since it is an output controlling the VDD power 
    //      AIN_EN   P1.06  //battmonitoren     used to enable battery monitor circuit so we ignore it since it is an output controlling battery monitor circuit 


	// put the GPIOS in their lowest power state
	// pins used by ADC
	// 		AIN_CURRENT  AIN0 P0.04
	//      AIN_REV      AIN2 P0.06
	// 		AIN_BATTERY  AIN3 P0.07
	// 		AIN_5V       AIN7 P0.28
	static const struct gpio_dt_spec    shut_adc_ain0_ = GPIO_DT_SPEC_GET( DT_NODELABEL( adc_ain0 ), gpios );
	static const struct gpio_dt_spec    shut_adc_ain2_ = GPIO_DT_SPEC_GET( DT_NODELABEL( adc_ain2 ), gpios );
    static const struct gpio_dt_spec    shut_adc_ain3_ = GPIO_DT_SPEC_GET( DT_NODELABEL( adc_ain3 ), gpios );
    static const struct gpio_dt_spec    shut_adc_ain7_ = GPIO_DT_SPEC_GET( DT_NODELABEL( adc_ain7 ), gpios );

    gpio_pin_configure_dt( &amp;amp;shut_adc_ain0_, GPIO_INPUT);
	gpio_pin_configure_dt( &amp;amp;shut_adc_ain2_, GPIO_INPUT);
    gpio_pin_configure_dt( &amp;amp;shut_adc_ain3_, GPIO_INPUT);
    gpio_pin_configure_dt( &amp;amp;shut_adc_ain7_, GPIO_INPUT) ;

	// pins used by I2c
	// 		I2C_SCL P1.03
	//      I2C_SDA P1.02

	static const struct gpio_dt_spec    shut_i2c_scl_ = GPIO_DT_SPEC_GET( DT_NODELABEL( i2c_scl ), gpios );
    static const struct gpio_dt_spec    shut_i2c_sda_ = GPIO_DT_SPEC_GET( DT_NODELABEL( i2c_sda ), gpios );

    gpio_pin_configure_dt( &amp;amp;shut_i2c_scl_, GPIO_INPUT);
    gpio_pin_configure_dt( &amp;amp;shut_i2c_sda_, GPIO_INPUT);


	// pins used by DA7281 PWM
	//      J1_PWM P0.22
	//      J2_PWM P0.09
	//      J3_PWM P0.08
	//      J4_PWM P0.12


	static const struct gpio_dt_spec    shut_j1_pwm_ = GPIO_DT_SPEC_GET( DT_NODELABEL( j1_pwm ), gpios );
    static const struct gpio_dt_spec    shut_j2_pwm_ = GPIO_DT_SPEC_GET( DT_NODELABEL( j2_pwm ), gpios );
    static const struct gpio_dt_spec    shut_j3_pwm_ = GPIO_DT_SPEC_GET( DT_NODELABEL( j3_pwm ), gpios );
    static const struct gpio_dt_spec    shut_j4_pwm_ = GPIO_DT_SPEC_GET( DT_NODELABEL( j4_pwm ), gpios );

    gpio_pin_configure_dt( &amp;amp;shut_j1_pwm_, GPIO_INPUT);
    gpio_pin_configure_dt( &amp;amp;shut_j2_pwm_, GPIO_INPUT);
    gpio_pin_configure_dt( &amp;amp;shut_j3_pwm_,GPIO_INPUT) ;
	gpio_pin_configure_dt( &amp;amp;shut_j4_pwm_,GPIO_INPUT) ;

	//      J1_IRQ_L P1.09  //DA7281 interrupt not use in code
	//      J2_IRQ_L P1.04  //DA7281 interrupt not use in code
	//      J3_IRQ_L P0.20  //DA7281 interrupt not use in code
	//      J4_IRQ_L P1.05  //DA7281 interrupt not use in code
	static const struct gpio_dt_spec shut_irqt1 = GPIO_DT_SPEC_GET(DT_ALIAS(irqt1), gpios);
	static const struct gpio_dt_spec shut_irqt2 = GPIO_DT_SPEC_GET(DT_ALIAS(irqt2), gpios);
	static const struct gpio_dt_spec shut_irqt3 = GPIO_DT_SPEC_GET(DT_ALIAS(irqt3), gpios);
	static const struct gpio_dt_spec shut_irqt4 = GPIO_DT_SPEC_GET(DT_ALIAS(irqt4), gpios);
	gpio_pin_configure_dt(&amp;amp;shut_irqt1, GPIO_INPUT);
    gpio_pin_configure_dt(&amp;amp;shut_irqt2, GPIO_INPUT);
    gpio_pin_configure_dt(&amp;amp;shut_irqt3, GPIO_INPUT);
    gpio_pin_configure_dt(&amp;amp;shut_irqt4, GPIO_INPUT);

	//      J1_DETECT P0.30 //tactor jack detect
	//      J2_DETECT P1.10 //tactor jack detect
	//      J3_DETECT P1.13 //tactor jack detect
	//      J4_DETECT P0.10 //tactor jack detect

		// Discrete inputs to detect if fingers F1-F4 are connected
	static const struct gpio_dt_spec shut_detectJ1 = GPIO_DT_SPEC_GET(DT_ALIAS(det1), gpios);
	static const struct gpio_dt_spec shut_detectJ2 = GPIO_DT_SPEC_GET(DT_ALIAS(det2), gpios);
	static const struct gpio_dt_spec shut_detectJ3 = GPIO_DT_SPEC_GET(DT_ALIAS(det3), gpios);
	static const struct gpio_dt_spec shut_detectJ4 = GPIO_DT_SPEC_GET(DT_ALIAS(det4), gpios);
	gpio_pin_configure_dt(&amp;amp;shut_detectJ1, GPIO_INPUT);
    gpio_pin_configure_dt(&amp;amp;shut_detectJ2, GPIO_INPUT);
    gpio_pin_configure_dt(&amp;amp;shut_detectJ3, GPIO_INPUT);
    gpio_pin_configure_dt(&amp;amp;shut_detectJ4, GPIO_INPUT);


	// pins used by the charger
	//      PGOOD_L  P1.08
	//      CHG_L    P0.31
	

	static const struct gpio_dt_spec shut_pwrGood = GPIO_DT_SPEC_GET(DT_ALIAS(powergood), gpios);
	static const struct gpio_dt_spec shut_chrgIng = GPIO_DT_SPEC_GET(DT_ALIAS(chargingactive), gpios);

    gpio_pin_configure_dt(&amp;amp;shut_pwrGood, GPIO_INPUT);
    gpio_pin_configure_dt(&amp;amp;shut_chrgIng, GPIO_INPUT);

	// pins used by RGB led
	//		LED_R P1.14
	//      LED_G P1.15
	//      LED_B P1.12

	static const struct gpio_dt_spec    shut_rgb_red_   = GPIO_DT_SPEC_GET( DT_NODELABEL( rgb_red_led ), gpios );
    static const struct gpio_dt_spec    shut_rgb_green_ = GPIO_DT_SPEC_GET( DT_NODELABEL( rgb_green_led ), gpios );
    static const struct gpio_dt_spec    shut_rgb_blue_  = GPIO_DT_SPEC_GET( DT_NODELABEL( rgb_blue_led ), gpios );

    gpio_pin_configure_dt( &amp;amp;shut_rgb_red_, GPIO_INPUT) ;
    gpio_pin_configure_dt( &amp;amp;shut_rgb_green_, GPIO_INPUT) ;
    gpio_pin_configure_dt( &amp;amp;shut_rgb_blue_,GPIO_INPUT) ;


	// pins used for button (it genertes an interrupt also is the wake up pin)
    // PUSH_BTN  P0.24
	// P0.23 (sw0) reserved
	//static const struct gpio_dt_spec shut_sw0 = GPIO_DT_SPEC_GET(DT_ALIAS(sw0), gpios);
	// LEAVE the WAKE UP GPIO alone  (sw1)
	//static const struct gpio_dt_spec shut_sw1 = GPIO_DT_SPEC_GET(DT_ALIAS(sw1), gpios);
	
	//gpio_pin_configure_dt(&amp;amp;shut_sw0, GPIO_INPUT);
 	//gpio_pin_configure_dt(&amp;amp;shut_sw1, GPIO_INPUT);

	//pins used by the fuel gauge

	static const struct gpio_dt_spec shut_alarmb = GPIO_DT_SPEC_GET(DT_ALIAS(alarmb), gpios);
	gpio_pin_configure_dt(&amp;amp;shut_alarmb, GPIO_INPUT);



// pins used by ISO TP10 TP11
	//      TP_DBG_02 TP11 P1.01
	//      TP_DBG_01 TP10 P1.00
	//      TP_DBG_03 TP19 P1.07
	//      TP_DBG_04 TP20 P1.11
	static const struct gpio_dt_spec shut_tp10 = GPIO_DT_SPEC_GET(DT_ALIAS(tp10), gpios);
	static const struct gpio_dt_spec shut_tp11 = GPIO_DT_SPEC_GET(DT_ALIAS(tp11), gpios);
	static const struct gpio_dt_spec shut_tp19 = GPIO_DT_SPEC_GET(DT_ALIAS(tp19), gpios);
	static const struct gpio_dt_spec shut_tp20 = GPIO_DT_SPEC_GET(DT_ALIAS(tp20), gpios);	

    //gpio_pin_configure_dt(&amp;amp;shut_tp10, GPIO_INPUT);
	gpio_pin_configure_dt(&amp;amp;shut_tp10, GPIO_DISCONNECTED);
    gpio_pin_configure_dt(&amp;amp;shut_tp11, GPIO_DISCONNECTED);	
	gpio_pin_configure_dt(&amp;amp;shut_tp19, GPIO_DISCONNECTED);
	gpio_pin_configure_dt(&amp;amp;shut_tp20, GPIO_DISCONNECTED);

	
    //USB   these are not GPIOs
	//      D_P  H5 ignored
	//      D_N  G5 ignored


	//qspi
	//  QSPI_CS	  P0.18   //flash CS
	//  QSPI_CLK  P0.17   //flash CLK
	//  QSPI_0    P0.13   //flash SI
	//  QSPI_1    P0.14   //flash SO
	//  QSPI_2    P0.15   //flash WP
	//  QSPI_3    P0.16   //flash RST
	static const struct gpio_dt_spec shut_flash_cs_  = GPIO_DT_SPEC_GET( DT_NODELABEL(flash_cs), gpios);
	static const struct gpio_dt_spec shut_flash_clk_ = GPIO_DT_SPEC_GET( DT_NODELABEL(flash_clk), gpios);
	static const struct gpio_dt_spec shut_flash_si_  = GPIO_DT_SPEC_GET( DT_NODELABEL(flash_si), gpios);
	static const struct gpio_dt_spec shut_flash_so_  = GPIO_DT_SPEC_GET( DT_NODELABEL(flash_so), gpios);
    static const struct gpio_dt_spec shut_flash_wp_  = GPIO_DT_SPEC_GET( DT_NODELABEL(flash_wp), gpios);
	static const struct gpio_dt_spec shut_flash_rst_ = GPIO_DT_SPEC_GET( DT_NODELABEL(flash_rst), gpios);



    gpio_pin_configure_dt( &amp;amp;shut_flash_cs_, GPIO_INPUT); //flash CS
	gpio_pin_configure_dt( &amp;amp;shut_flash_clk_, GPIO_INPUT); //flash CLK
	gpio_pin_configure_dt( &amp;amp;shut_flash_si_, GPIO_INPUT); // Flash SI
	gpio_pin_configure_dt( &amp;amp;shut_flash_so_, GPIO_INPUT); // flash SO
	gpio_pin_configure_dt( &amp;amp;shut_flash_wp_, GPIO_INPUT); // flash WP
	gpio_pin_configure_dt( &amp;amp;shut_flash_rst_, GPIO_INPUT); // flash RST


	//take care of unused pins
	static const struct gpio_dt_spec shut_led3_  = GPIO_DT_SPEC_GET( DT_NODELABEL(led3), gpios);
	static const struct gpio_dt_spec shut_adc_ain1_ = GPIO_DT_SPEC_GET( DT_NODELABEL( adc_ain1 ), gpios );
	static const struct gpio_dt_spec shut_adc_ain4_ = GPIO_DT_SPEC_GET( DT_NODELABEL( adc_ain4 ), gpios );
	static const struct gpio_dt_spec shut_adc_ain5_ = GPIO_DT_SPEC_GET( DT_NODELABEL( adc_ain5 ), gpios );
	static const struct gpio_dt_spec shut_adc_ain6_ = GPIO_DT_SPEC_GET( DT_NODELABEL( adc_ain6 ), gpios );

	gpio_pin_configure_dt( &amp;amp;shut_led3_, GPIO_INPUT); //led3 - unused pin
	gpio_pin_configure_dt( &amp;amp;shut_adc_ain1_, GPIO_INPUT); //AIN1 - unused pin
	gpio_pin_configure_dt( &amp;amp;shut_adc_ain4_, GPIO_INPUT); //AIN4 - unused pin
	gpio_pin_configure_dt( &amp;amp;shut_adc_ain5_, GPIO_INPUT); //AIN5 - unused pin
	gpio_pin_configure_dt( &amp;amp;shut_adc_ain6_, GPIO_INPUT); //AIN6 - unused pin



	return true;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disconnect a GPIO pin</title><link>https://devzone.nordicsemi.com/thread/480544?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2024 23:02:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b323f235-76be-44ee-8327-9a54818ae02d</guid><dc:creator>weightwatcherphil</dc:creator><description>&lt;p&gt;this is extremely helpful.&amp;nbsp; especially the part about the OR.&lt;/p&gt;
&lt;p&gt;i will run some more test when i get back from vacation.&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disconnect a GPIO pin</title><link>https://devzone.nordicsemi.com/thread/480452?ContentTypeID=1</link><pubDate>Wed, 24 Apr 2024 12:41:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d37c0ce-bba2-40fd-bffb-40c66cb77d54</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Did you check with the multimeter as suggested by Susheel?&lt;/p&gt;
[quote user="weightwatcherphil"]&lt;p&gt;would&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;gpio_pin_configure_dt&lt;/span&gt;&lt;span&gt;( &lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;shut_adc_ain0_&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;GPIO_INPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;turn off the pullups ?&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;As you have said, the pin is configured as output, and now you want to disconnect.&amp;nbsp;Please have a look at GPIO port and pin details as in the product specification:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1713956919584v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;For each pin, we have direction (telling whether it is configured as input or output), input (connected or not), drive strength and pull configurations. Please refer to&amp;nbsp;GPIO registers where you can read the status of configuration by reading the appropriate registers.&lt;/p&gt;
&lt;p&gt;Below, I am reading P0.23 configuration using nrfjprog (a command line tool from Nordic)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;//NRFJPROG command to read P0.23 (that is Button0 on the DK) configuration
nrfjprog --memrd 0x5084275C&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also, I suggest to use &amp;quot;gpio_pin_configure()&amp;quot; rather than the&amp;nbsp;gpio_pin_configure_dt(), as the later does the OR operation of new flags with previous flags, while the other sets the new flags.&lt;/p&gt;
&lt;p&gt;Below, I am reading all gpio port0 pin configurations before and after using gpio_pin_configure() function, and I can see that the correct configuration is taking place for that specific pin:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1713962476128v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Naeem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disconnect a GPIO pin</title><link>https://devzone.nordicsemi.com/thread/479590?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2024 06:21:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f08bc06-9d17-4b26-90c5-1ed0665aa0c6</guid><dc:creator>weightwatcherphil</dc:creator><description>&lt;p&gt;right now i am not really sure where the current is coming from.&lt;/p&gt;
&lt;p&gt;how would i turn off the pullup/downs.&lt;/p&gt;
&lt;p&gt;would&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;gpio_pin_configure_dt&lt;/span&gt;&lt;span&gt;( &lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;shut_adc_ain0_&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;GPIO_INPUT&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;turn off the pullups ?&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disconnect a GPIO pin</title><link>https://devzone.nordicsemi.com/thread/479372?ContentTypeID=1</link><pubDate>Thu, 18 Apr 2024 09:10:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:282bb4ff-def3-4084-aae6-3ee9efb34b6d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi Philip,&lt;/p&gt;
&lt;p&gt;You need to first identify which specific GPIO is the source of the power increase first rather than trying to disconnect all pins. Just try probing each GPIO pin with a multimeter or equivalent, while the chip is in SystemOFF mode. It should be easy to see which pin is logical high and is still driving current. We can turn our attention to that specific GPIO to see if that is a firmware or a hardware issue.&lt;/p&gt;
&lt;p&gt;GPIO disconnect will not help if there are pull-up configured as these pull ups will continue to driver the output pin.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>