<?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>The custom device tree pins conflict with the default GPIO pins.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/125022/the-custom-device-tree-pins-conflict-with-the-default-gpio-pins</link><description>Now we have bound the corresponding pins in the device tree, and there is no pin multiplexing except for LED and BUTTON. However, now as long as we configure SPI in the main.c function, such as:const struct device *spi3 = DEVICE_DT_GET(DT_NODELABEL(spi3</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Oct 2025 12:57:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/125022/the-custom-device-tree-pins-conflict-with-the-default-gpio-pins" /><item><title>RE: The custom device tree pins conflict with the default GPIO pins.</title><link>https://devzone.nordicsemi.com/thread/551818?ContentTypeID=1</link><pubDate>Fri, 17 Oct 2025 12:57:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2093d6ba-bd15-4e59-b2db-96bb6a22d104</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have looked at your overlay file.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There are few things described below, you must consider reviewing the design again.&lt;/p&gt;
&lt;p&gt;a. P0.13 to P0.18 are&amp;nbsp;used as&amp;nbsp;&lt;span&gt;quad SPI using the direct connection of the QSPI peripheral.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1760704145388v3.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;These pins must be enabled using the Peripheral option of the PIN_CNF register. For high-speed SPI (SPIM4), a different set of dedicated pins (P0.08–P0.12) is used, and when activated, the SPIM PSEL settings are ignored, and the dedicated pins are used.&amp;#39;&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/pastedimage1760704773082v5.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The documentation explicitly separates the use of QSPI and SPIM4 dedicated pins and does not recommend cross-usage between these functions. In this way, we can ensure is to ensure proper operation and signal integrity at high speeds&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf5340/page/chapters/pin.html" rel="noopener noreferrer" target="_blank"&gt;Pin assignments and special GPIO considerations&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I can see in your overlay file, you have used some of these QSPI pins of SPIM.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;b. Same for UART_RX pin, you have setP0.00 as UART_RX pin; which is used as Analog input for 32kHz crystal.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&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/pastedimage1760703376210v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If you want to use P0.00 as UART_RX (or any other GPIO function), you must (&lt;a href="https://docs.nordicsemi.com/bundle/ug_nrf5340_dk/page/UG/dk/hw_32khz_crystal.html"&gt;32.768 kHz crystal&lt;/a&gt;):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;&lt;strong&gt;Disconnect the 32.768 kHz crystal&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;from P0.00 by cutting the appropriate solder bridge (SB2) and&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;&lt;strong&gt;Connect P0.00 to the GPIO header&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;by soldering the corresponding bridge (SB4).&lt;/span&gt;&lt;/div&gt;
&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;c. You have used P1.03 for MOSI pin. Usually, P1.02 and P1.03 are used as high speed TWIM.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1760704088525v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;However, it is also used as GPIO 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/pastedimage1760705755036v6.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;So, you can use it for SPI pin as long as you don&amp;#39;t need this for TWI.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Kazi&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>