<?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>Problem using three UART ports in nRF5340 (nRF Connect SDK)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92645/problem-using-three-uart-ports-in-nrf5340-nrf-connect-sdk</link><description>According to this discussion, all the 4 UARTs are functional in nRF5340. I intend to use multiple UART ports, and I modified this exercise solution to do so. I was able to use UART0 and UART1 for printing to the serial terminal. The pins for UART0 and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 12 Oct 2022 06:37:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92645/problem-using-three-uart-ports-in-nrf5340-nrf-connect-sdk" /><item><title>RE: Problem using three UART ports in nRF5340 (nRF Connect SDK)</title><link>https://devzone.nordicsemi.com/thread/390353?ContentTypeID=1</link><pubDate>Wed, 12 Oct 2022 06:37:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24a0fe97-2272-449c-9d38-c7c462cad6d4</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Good Luck. &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using three UART ports in nRF5340 (nRF Connect SDK)</title><link>https://devzone.nordicsemi.com/thread/390350?ContentTypeID=1</link><pubDate>Wed, 12 Oct 2022 04:49:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd4094d0-a2d3-41da-b461-85207f4ece54</guid><dc:creator>Sukriti </dc:creator><description>&lt;p&gt;Perfect!!&lt;/p&gt;
&lt;p&gt;Thank you so much for helping me out Afroza &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I will follow this link and try to work with the third virtual COM Port.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Sukriti&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using three UART ports in nRF5340 (nRF Connect SDK)</title><link>https://devzone.nordicsemi.com/thread/390329?ContentTypeID=1</link><pubDate>Tue, 11 Oct 2022 20:23:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:961b62ea-f622-4d74-ba5e-f96caa5e38f0</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Sukriti,&lt;/p&gt;
&lt;p&gt;As it is shown in the device tree that UART0 pins are default connected to interface MCU, so unless you cut the solder bridge with that, you need to select some other GPIOs pin those are accessible to nRF5340 DK.&lt;/p&gt;
&lt;p&gt;&amp;#39;&amp;#39;&lt;strong&gt;&lt;em&gt;For&amp;nbsp;&lt;span&gt;nRF5340 DK&lt;/span&gt;&amp;nbsp;v1.0.0, a third virtual COM port routed to the&amp;nbsp;&lt;span&gt;P24&lt;/span&gt;&amp;nbsp;connector of the DK is supported. The pins are labeled&amp;nbsp;&lt;span&gt;RxD&lt;/span&gt;,&amp;nbsp;&lt;span&gt;TxD&lt;/span&gt;,&amp;nbsp;&lt;span&gt;CTS&lt;/span&gt;, and&amp;nbsp;&lt;span&gt;RTS&lt;/span&gt;.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;Can you please help me understand this? I can see P24 connector on my board, and these four pins also (the pins have these labels, and I can&amp;#39;t see any pin number associated with them). Can I use this third COM Port? If yes, how should the pin assignment be done in the Device Tree?&amp;#39;&amp;#39;&lt;/p&gt;
&lt;p&gt;You can check this here &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.0/nrf/ug_nrf5340.html#nrf5340-dk-v1-0-0-com-ports"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.0/nrf/ug_nrf5340.html#nrf5340-dk-v1-0-0-com-ports&lt;/a&gt;&amp;nbsp;&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;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using three UART ports in nRF5340 (nRF Connect SDK)</title><link>https://devzone.nordicsemi.com/thread/390096?ContentTypeID=1</link><pubDate>Mon, 10 Oct 2022 17:40:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51976d90-7946-41a6-8aed-f7c72a894262</guid><dc:creator>Sukriti </dc:creator><description>[quote userid="108933" url="~/f/nordic-q-a/92645/problem-using-three-uart-ports-in-nrf5340-nrf-connect-sdk/390089"]According to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a title="https://infocenter.nordicsemi.com/topic/ug_nrf5340_dk/UG/dk/if_mcu.html?cp=3_0_4_2" href="https://infocenter.nordicsemi.com/topic/ug_nrf5340_dk/UG/dk/if_mcu.html?cp=3_0_4_2" rel="noopener noreferrer" target="_blank"&gt;https://infocenter.nordicsemi.com/topic/ug_nrf5340_dk/UG/dk/if_mcu.html?cp=3_0_4_2&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;the nRF53 DK exposes two virtual COM ports[/quote]
&lt;p&gt;Thanks Afroza, you&amp;#39;re right. I had checked this link. I have a few more queries.&lt;/p&gt;
&lt;p&gt;A note provided on the same link (Virtual COM Ports) also states that&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;For&amp;nbsp;&lt;span class="keyword"&gt;nRF5340 DK&lt;/span&gt;&amp;nbsp;v1.0.0, a third virtual COM port routed to the&amp;nbsp;&lt;span class="keyword pcb"&gt;P24&lt;/span&gt;&amp;nbsp;connector of the DK is supported. The pins are labeled&amp;nbsp;&lt;span class="keyword pinname"&gt;RxD&lt;/span&gt;,&amp;nbsp;&lt;span class="keyword pinname"&gt;TxD&lt;/span&gt;,&amp;nbsp;&lt;span class="keyword pinname"&gt;CTS&lt;/span&gt;, and&amp;nbsp;&lt;span class="keyword pinname"&gt;RTS&lt;/span&gt;.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;Can you please help me understand this? I can see P24 connector on my board, and these four pins also (the pins have these labels, and I can&amp;#39;t see any pin number associated with them). Can I use this third COM Port? If yes, how should the pin assignment be done in the Device Tree?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Secondly, if I wish to interface an external device on a uart port (say uart0), shall I have to change the default pins already assigned to them? As per my understanding, the default pins can only be used for the serial terminal. Am I right?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Sukriti&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using three UART ports in nRF5340 (nRF Connect SDK)</title><link>https://devzone.nordicsemi.com/thread/390089?ContentTypeID=1</link><pubDate>Mon, 10 Oct 2022 16:01:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:407a854d-3d87-4deb-bae3-b5da40101c40</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Sukriti,&lt;/p&gt;
&lt;p&gt;According to&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a title="https://infocenter.nordicsemi.com/topic/ug_nrf5340_dk/UG/dk/if_mcu.html?cp=3_0_4_2" href="https://infocenter.nordicsemi.com/topic/ug_nrf5340_dk/UG/dk/if_mcu.html?cp=3_0_4_2" rel="noopener noreferrer" target="_blank"&gt;https://infocenter.nordicsemi.com/topic/ug_nrf5340_dk/UG/dk/if_mcu.html?cp=3_0_4_2&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;the nRF53 DK exposes two virtual COM ports.&lt;/p&gt;
&lt;p&gt;You can see in the device tree the default UART is uart0 and uart1. However it can also be uart1 or uart2. As per this, I think its not possible to get output from more than two uart instances.&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/pastedimage1665416652636v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;For the first virtual COM port, TX is P0.20 and RX is P0.22. For the second RX is P1.00 and TX is P1.01.&lt;/p&gt;
&lt;p&gt;So as you can see, by default UART0 will output on the first virtual COM port and UART1 will output on the second port&lt;/p&gt;
&lt;p&gt;&lt;a title="https://github.com/nrfconnect/sdk-zephyr/blob/98bc3a7a6b3917ce5a058e7a7271d3036edffb88/boards/arm/nrf5340dk_nrf5340/nrf5340_cpuapp_common-pinctrl.dtsi#L24-L25" href="https://github.com/nrfconnect/sdk-zephyr/blob/98bc3a7a6b3917ce5a058e7a7271d3036edffb88/boards/arm/nrf5340dk_nrf5340/nrf5340_cpuapp_common-pinctrl.dtsi#L24-L25" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/98bc3a7a6b3917ce5a058e7a7271d3036edffb88/boards/arm/nrf5340dk_nrf5340/nrf5340_cpuapp_common-pinctrl.dtsi#L24-L25&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="https://github.com/nrfconnect/sdk-zephyr/blob/98bc3a7a6b3917ce5a058e7a7271d3036edffb88/boards/arm/nrf5340dk_nrf5340/nrf5340_cpuapp_common-pinctrl.dtsi#L85-L90" href="https://github.com/nrfconnect/sdk-zephyr/blob/98bc3a7a6b3917ce5a058e7a7271d3036edffb88/boards/arm/nrf5340dk_nrf5340/nrf5340_cpuapp_common-pinctrl.dtsi#L85-L90" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/98bc3a7a6b3917ce5a058e7a7271d3036edffb88/boards/arm/nrf5340dk_nrf5340/nrf5340_cpuapp_common-pinctrl.dtsi#L85-L90&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;One thing I suggested in my earlier reply adding CTS and RTS for flow control. I have looked this issue again and asked our team. I&lt;span&gt;t is not required to connect CTS and RTS. Just you have to make sure from the serial terminal that the receiving end does not enable flow control.&amp;nbsp;&amp;nbsp;&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/pastedimage1665416830238v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;if you want to get output from more than two UART instances, you can use a&amp;nbsp;&lt;/span&gt;&lt;a title="https://no.rs-online.com/web/p/development-tool-accessories/0429307?cm_mmc=NO-PLA-DS3A-_-google-_-CSS_NO_NO_Raspberry_Pi_%26_Arduino_%26_Development_Tools_Whoop-_-(NO:Whoop!)+Development+Tool+Accessories-_-429307&amp;amp;matchtype=&amp;amp;aud-827186183686:pla-295731484769&amp;amp;gclid=Cj0KCQjwhY-aBhCUARIsALNIC07h0G5z4vvef3UWcT3eSaC-UtyPSLAN19CZ9g1Fg-RImTS6ZAfG4BoaAsU9EALw_wcB&amp;amp;gclsrc=aw.ds" href="https://no.rs-online.com/web/p/development-tool-accessories/0429307?cm_mmc=NO-PLA-DS3A-_-google-_-CSS_NO_NO_Raspberry_Pi_%26_Arduino_%26_Development_Tools_Whoop-_-(NO:Whoop!)+Development+Tool+Accessories-_-429307&amp;amp;matchtype=&amp;amp;aud-827186183686:pla-295731484769&amp;amp;gclid=Cj0KCQjwhY-aBhCUARIsALNIC07h0G5z4vvef3UWcT3eSaC-UtyPSLAN19CZ9g1Fg-RImTS6ZAfG4BoaAsU9EALw_wcB&amp;amp;gclsrc=aw.ds" rel="noopener noreferrer" target="_blank"&gt;USB to UART cable&lt;/a&gt;&amp;nbsp;.&lt;/p&gt;
&lt;p&gt;Thanks.&amp;nbsp;&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><item><title>RE: Problem using three UART ports in nRF5340 (nRF Connect SDK)</title><link>https://devzone.nordicsemi.com/thread/389892?ContentTypeID=1</link><pubDate>Sat, 08 Oct 2022 15:07:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51f2c32c-8cac-4669-a975-ae56f47dadf9</guid><dc:creator>Sukriti </dc:creator><description>&lt;p&gt;Hi Kazi!&lt;/p&gt;
[quote userid="108933" url="~/f/nordic-q-a/92645/problem-using-three-uart-ports-in-nrf5340-nrf-connect-sdk/389888"]I also think you should add RTS and CTS pin for flow control.&amp;nbsp;You can try to check these issues[/quote]
&lt;p&gt;Thanks, I&amp;#39;ll add them.&lt;/p&gt;
[quote userid="108933" url="~/f/nordic-q-a/92645/problem-using-three-uart-ports-in-nrf5340-nrf-connect-sdk/389888"]The UART pin you are using is not routed to any virtual com port[/quote]
&lt;p&gt;I get this. But these&amp;nbsp;ports are already used for UART0 and UART1. What would be the pin assignment if I wish to use all the 4 UART ports? There are no pins defined for them.&lt;/p&gt;
&lt;p&gt;I can see, there&amp;#39;s a third virtual COM port as well, but how do I use this? The pins are labeled RxD, TxD, RTS and CTS. I can&amp;#39;t see any associated pin number.&amp;nbsp;&lt;/p&gt;
[quote userid="108933" url="~/f/nordic-q-a/92645/problem-using-three-uart-ports-in-nrf5340-nrf-connect-sdk/389888"]I will give you answers of the rest of the questions on Monday.[/quote]
&lt;p&gt;Sure, looking forward to your response.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem using three UART ports in nRF5340 (nRF Connect SDK)</title><link>https://devzone.nordicsemi.com/thread/389888?ContentTypeID=1</link><pubDate>Sat, 08 Oct 2022 12:36:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5396698a-bc27-49de-91a3-935b8e9341dc</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Sukriti,&lt;/p&gt;
&lt;p&gt;The UART pin you are using is not routed to any virtual com port (&lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf5340_dk/UG/dk/vir_com_port.html"&gt;https://infocenter.nordicsemi.com/topic/ug_nrf5340_dk/UG/dk/vir_com_port.html&lt;/a&gt;).&amp;nbsp;I also think you should add RTS and CTS pin for flow control.&amp;nbsp;You can try to check these issues.&lt;/p&gt;
&lt;p&gt;I will give you answers of the rest of the questions on Monday.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>