<?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>nRF52840 DK external UART communication</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111402/nrf52840-dk-external-uart-communication</link><description>Hi, 
 I went through the Nordic Academy nRF Connect SDK Fundamentals - Serial Communication. I tried the exercise program where LED1, LED2 and LED 3 are toggled by pressing 1, 2 or 3 at serial terminal Tera Term and it works. 
 I would like to toggle</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 May 2024 12:19:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111402/nrf52840-dk-external-uart-communication" /><item><title>RE: nRF52840 DK external UART communication</title><link>https://devzone.nordicsemi.com/thread/485401?ContentTypeID=1</link><pubDate>Wed, 22 May 2024 12:19:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5dba3dfa-2545-4746-814f-6956cd8defdf</guid><dc:creator>mtrobregado</dc:creator><description>&lt;p&gt;Thanks, I will try it. Actually, I just now made it to work by connecting the USB cable to the other USB port.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Markel&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 DK external UART communication</title><link>https://devzone.nordicsemi.com/thread/485388?ContentTypeID=1</link><pubDate>Wed, 22 May 2024 11:53:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f496157-93a8-429b-a8f7-286897ee5fdc</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]I think this is because the nRF52840 UARTS are still connected to the interface MCU nRF5340.[/quote]
&lt;p&gt;Yes, that would be the case. P0.08 is set up as TXD on between the interface mcu and the nrf52840 (see product specification section 3.2).&amp;nbsp;&lt;/p&gt;
[quote user=""]How do I make this work?&amp;nbsp;[/quote]
&lt;p&gt;You need to select a different GPIO which is free and available. Could you post your overlay files and code where you intialize the UART device?&lt;/p&gt;
&lt;p&gt;In general what you need to do is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Decide which GPIO you want to use for your UART, meaning that you will have to select between any of the free and available GPIOs. Figure 20 in the PS showcases quite a few that are free, most of them being in P2, P3 and P4.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Set up the UART in an overlay file as explained in&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-3-elements-of-an-nrf-connect-sdk-application/topic/exercise-2/"&gt;lesson 3 of the fundamentals course&lt;/a&gt;&amp;nbsp;and select which pin to use through &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/hardware/pinctrl/index.html"&gt;pin control&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It would looke something like&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {
	uart1_default_custom: uart0_default_custom {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 29)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RTS, 0, 28)&amp;gt;;
		};
		group2 {
			psels = &amp;lt;NRF_PSEL(UART_RX, 0, 31)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_CTS, 0, 30)&amp;gt;;
			bias-pull-up;
		};
	};

	uart1_sleep_custom: uart0_sleep_custom {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 29)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RX, 0, 31)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RTS, 0, 28)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_CTS, 0, 30)&amp;gt;;
			low-power-enable;
		};
	};

&amp;amp;uart1 {
	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;uart1_default_custom&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;uart1_sleep_custom&amp;gt;;
	pinctrl-names = &amp;quot;uart1_default_custom&amp;quot;, &amp;quot;uart1_sleep_custom&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Disclaimer: I&amp;#39;ve not tested if this overlay setup works, but it showcases how you can set up a new uart (uart1) which uses different gpios&lt;/p&gt;
&lt;p&gt;By default the uart0 of on the 52840dk is set up as follows:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;pinctrl {
	uart0_default: uart0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 6)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RTS, 0, 5)&amp;gt;;
		};
		group2 {
			psels = &amp;lt;NRF_PSEL(UART_RX, 0, 8)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_CTS, 0, 7)&amp;gt;;
			bias-pull-up;
		};
	};

	uart0_sleep: uart0_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(UART_TX, 0, 6)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RX, 0, 8)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_RTS, 0, 5)&amp;gt;,
				&amp;lt;NRF_PSEL(UART_CTS, 0, 7)&amp;gt;;
			low-power-enable;
		};
	};
	
	&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;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>