<?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>GPIO9 &amp;amp; 10 won&amp;#39;t operate independently using zephyr (but OK with rRF5 SDK)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120828/gpio9-10-won-t-operate-independently-using-zephyr-but-ok-with-rrf5-sdk</link><description>I have a custom nRF52832 board with outputs on P0.07 P0.08 P0.09 P0.10 and I want to write to them. 7&amp;amp;8 are working ok but 9&amp;amp;10 are not. 
 Let me emphasise THE BOARD IS WORKING FINE . I have applications written using the old nRF5 SDK which I can flash</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 Apr 2025 08:25:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120828/gpio9-10-won-t-operate-independently-using-zephyr-but-ok-with-rrf5-sdk" /><item><title>RE: GPIO9 &amp; 10 won't operate independently using zephyr (but OK with rRF5 SDK)</title><link>https://devzone.nordicsemi.com/thread/532749?ContentTypeID=1</link><pubDate>Thu, 24 Apr 2025 08:25:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de39b1c2-0b32-4992-9c2f-9ffab7da4d08</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Glad to hear that you got it working!&lt;/p&gt;
&lt;p&gt;I can confirm your suspicion related to the leakage between the pins, there will be a small leakage when they are driven differentially, as shown by &amp;quot;INFC_LEAK&amp;quot; in the GPIO el.specs:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52832/page/gpio.html#d918e75197"&gt;https://docs.nordicsemi.com/bundle/ps_nrf52832/page/gpio.html#d918e75197&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO9 &amp; 10 won't operate independently using zephyr (but OK with rRF5 SDK)</title><link>https://devzone.nordicsemi.com/thread/532668?ContentTypeID=1</link><pubDate>Wed, 23 Apr 2025 18:33:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b21b5b6f-dd7f-4d8d-9cdb-437932fcb4ee</guid><dc:creator>Nick_RA</dc:creator><description>&lt;p&gt;Actually I now have it working!&lt;/p&gt;
&lt;p&gt;When&amp;nbsp; experimenting and trying code I have only been using one of the pins at any time. So for example I toggle P0.09. In this case P0.10 is in its default state which I assume is an input, and there must be enough leakage between the pins - either from the internal protection circuitry or maybe even solder flux residue - to make the FET Q2 turn on.&lt;/p&gt;
&lt;p&gt;If I set both to outputs, then toggle either pin, all is good.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO9 &amp; 10 won't operate independently using zephyr (but OK with rRF5 SDK)</title><link>https://devzone.nordicsemi.com/thread/532518?ContentTypeID=1</link><pubDate>Wed, 23 Apr 2025 07:45:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5aa07b8a-aec5-43b1-9d1f-c68e84ff6425</guid><dc:creator>Nick_RA</dc:creator><description>&lt;p&gt;This is a custom board. The pins simply drive a couple of FETs, and in my application they will be pulsed for 1 sec. At the moment in my development rig the FETs are just driving a couple of LEDs.&lt;/p&gt;
&lt;p&gt;Actually before now I hadn&amp;#39;t noticed the gpio/nfc caveat. Using SDK 17.1 I just set the pins to output using&amp;nbsp;nrf_gpio_cfg_output(pin) and it just worked. I&amp;nbsp;guess that&amp;#39;s because NFC is disabled in sdconfig.h?&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a snip of the schematic&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/nfc_5F00_pins.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO9 &amp; 10 won't operate independently using zephyr (but OK with rRF5 SDK)</title><link>https://devzone.nordicsemi.com/thread/532502?ContentTypeID=1</link><pubDate>Wed, 23 Apr 2025 07:13:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f72a7f5-862a-479b-b59c-c98123f652fe</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I might have misread your initial post. When you state that this works in nRF5 SDK, do you mean the GPIOs themselves, ie. P0.09/P0.10?&lt;/p&gt;
&lt;p&gt;Have you modified the nRF52-DK as described here to re-route the NFC interface?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ug_nrf52832_dk/page/UG/dk/hw_nfc_if.html#d37e110"&gt;https://docs.nordicsemi.com/bundle/ug_nrf52832_dk/page/UG/dk/hw_nfc_if.html#d37e110&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO9 &amp; 10 won't operate independently using zephyr (but OK with rRF5 SDK)</title><link>https://devzone.nordicsemi.com/thread/532423?ContentTypeID=1</link><pubDate>Tue, 22 Apr 2025 17:01:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00102c16-8a49-46ee-aa2d-2b866b638d52</guid><dc:creator>Nick_RA</dc:creator><description>&lt;p&gt;No that doesn&amp;#39;t seem to have fixed it&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f61e.svg" title="Disappointed"&gt;&amp;#x1f61e;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Maybe there is something wrong with my dts file?&lt;/p&gt;
&lt;p&gt;Here is the code I am using to test now using dts this time; all I am doing is changing line#9 with led0 led1 led2 led3&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/drivers/gpio.h&amp;gt;
#include &amp;lt;hal/nrf_gpio.h&amp;gt;

#define GPIO_NODE  DT_NODELABEL(gpio0)
#define GPIO_NAME	DEVICE_DT_NAME(GPIO_NODE)
#define RUN_LED_BLINK_INTERVAL 300
#define OD2_NODE DT_NODELABEL(led2)

int main(void)
{
	static const struct gpio_dt_spec od2_spec = GPIO_DT_SPEC_GET(OD2_NODE, gpios);
	gpio_pin_configure_dt(&amp;amp;od2_spec, GPIO_OUTPUT); 
    printk(&amp;quot;Hello\n&amp;quot;);
	for (;;) {
		gpio_pin_set_dt(&amp;amp;od2_spec, 1);
		k_sleep(K_MSEC(RUN_LED_BLINK_INTERVAL));
		gpio_pin_set_dt(&amp;amp;od2_spec, 0);
		k_sleep(K_MSEC(RUN_LED_BLINK_INTERVAL));
	}
		return 0;
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/dts-v1/;
#include &amp;lt;nordic/nrf52832_qfaa.dtsi&amp;gt;
#include &amp;quot;lptb-pinctrl.dtsi&amp;quot;
#include &amp;lt;zephyr/dt-bindings/input/input-event-codes.h&amp;gt;


/ {
	model = &amp;quot;Custom Board auto generated by nRF Connect for VS Code&amp;quot;;
	compatible = &amp;quot;react,lptb&amp;quot;;

	chosen {
		zephyr,sram = &amp;amp;sram0;
		zephyr,flash = &amp;amp;flash0;
		zephyr,code-partition = &amp;amp;slot0_partition;
		zephyr,console =  &amp;amp;uart0 ;
		zephyr,shell-uart =  &amp;amp;uart0 ;
		zephyr,uart-mcumgr = &amp;amp;uart0;
	};
	leds {
		compatible = &amp;quot;gpio-leds&amp;quot;;
		led0: led_0 {
			gpios = &amp;lt;&amp;amp;gpio0 7 GPIO_ACTIVE_HIGH&amp;gt;;
			label = &amp;quot;Green LED 0&amp;quot;;
		};
		led1: led_1 {
			gpios = &amp;lt;&amp;amp;gpio0 8 GPIO_ACTIVE_HIGH&amp;gt;;
			label = &amp;quot;Green LED 1&amp;quot;;
		};
		led2: led_2 {
			gpios = &amp;lt;&amp;amp;gpio0 9 GPIO_ACTIVE_HIGH&amp;gt;;
			label = &amp;quot;Green LED 2&amp;quot;;
		};
		led3: led_3 {
			gpios = &amp;lt;&amp;amp;gpio0 10 GPIO_ACTIVE_HIGH&amp;gt;;
			label = &amp;quot;Green LED 3&amp;quot;;
		};
	};
	
 
	buttons {
		compatible = &amp;quot;gpio-keys&amp;quot;;
		button0: button_0 {
			gpios = &amp;lt;&amp;amp;gpio0 17 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;Push button switch 0&amp;quot;;
			zephyr,code = &amp;lt;INPUT_KEY_0&amp;gt;;
		};
		button1: button_1 {
			gpios = &amp;lt;&amp;amp;gpio0 18 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;Push button switch 1&amp;quot;;
			zephyr,code = &amp;lt;INPUT_KEY_1&amp;gt;;
		};
		button2: button_2 {
			gpios = &amp;lt;&amp;amp;gpio0 19 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;Push button switch 2&amp;quot;;
			zephyr,code = &amp;lt;INPUT_KEY_2&amp;gt;;
		};
		button3: button_3 {
			gpios = &amp;lt;&amp;amp;gpio0 20 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;Push button switch 3&amp;quot;;
			zephyr,code = &amp;lt;INPUT_KEY_3&amp;gt;;
		};
	};



	/* These aliases are provided for compatibility with samples */
	aliases {
		led0 = &amp;amp;led0;
		led1 = &amp;amp;led1;
		led2 = &amp;amp;led2;
		led3 = &amp;amp;led3;
		sw0 = &amp;amp;button0;
		sw1 = &amp;amp;button1;
		sw2 = &amp;amp;button2;
		sw3 = &amp;amp;button3;
		bootloader-led0 = &amp;amp;led0;
		mcuboot-button0 = &amp;amp;button0;
		mcuboot-led0 = &amp;amp;led0;
		watchdog0 = &amp;amp;wdt0;	
	};
};

&amp;amp;flash0 {
	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x00000000 DT_SIZE_K(48)&amp;gt;;
		};

		slot0_partition: partition@c000 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0x0000c000 DT_SIZE_K(220)&amp;gt;;
		};

		slot1_partition: partition@43000 {
			label = &amp;quot;image-1&amp;quot;;
			reg = &amp;lt;0x00043000 DT_SIZE_K(220)&amp;gt;;
		};

		storage_partition: partition@7a000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0x0007a000 DT_SIZE_K(24)&amp;gt;;
		};
	};
};

&amp;amp;gpiote {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpio0 {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;uart0 {
	compatible = &amp;quot;nordic,nrf-uarte&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;uart0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;i2c0 {
	compatible = &amp;quot;nordic,nrf-twi&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;i2c0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;i2c0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
}; 

&amp;amp;uicr {
	status = &amp;quot;okay&amp;quot;;
	nfct-pins-as-gpios;
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Edit: Sorry, forgot to say this is using NCS 2.9.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GPIO9 &amp; 10 won't operate independently using zephyr (but OK with rRF5 SDK)</title><link>https://devzone.nordicsemi.com/thread/532402?ContentTypeID=1</link><pubDate>Tue, 22 Apr 2025 14:01:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dfb5420-6f9e-40ba-bf32-c72030643b5d</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you using a newer version of NCS?&lt;/p&gt;
&lt;p&gt;If yes, then the NFC pin configuration is moved to device tree. Try adding this to your overlay and see if the GPIOs now works as expected:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uicr {
	nfct-pins-as-gpios;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>