<?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>Connecting nRF9151 DKs via UART</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121721/connecting-nrf9151-dks-via-uart</link><description>Nordic TS, 
 I&amp;#39;m trying to establish a link between two 9151 DK through which I can pass messages. I&amp;#39;m trying to create a setup where DK 1 receives messages using a DECT NR+ link and forwards them to DK2 to transmit on LTE-M. I&amp;#39;m a newbie/intermediate</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 23 May 2025 10:58:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121721/connecting-nrf9151-dks-via-uart" /><item><title>RE: Connecting nRF9151 DKs via UART</title><link>https://devzone.nordicsemi.com/thread/536755?ContentTypeID=1</link><pubDate>Fri, 23 May 2025 10:58:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8915de0f-5d54-4123-84b6-cf0dd33bbdff</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]1. Is the best comm to establish the link between DK1 and DK2 a UART?[/quote]
&lt;p&gt;Yes.&lt;/p&gt;
[quote user=""]2. If so, which is the best choice of UART number?&amp;nbsp; My understanding is that UART0 is used by the USB and UART1 is also used (but I&amp;#39;m unsure).&amp;nbsp; &amp;nbsp;Is UART2 a good choice?[/quote]
&lt;p&gt;Yes, UART2 is a fine choice.&lt;/p&gt;
[quote user=""]3. For the choice of UARTx, what are the proper pins to use?[/quote]
&lt;ul style="margin-bottom:8px;margin-top:8px;max-width:95%;"&gt;
&lt;li style="margin-bottom:8px;margin-top:8px;max-width:95%;"&gt;
&lt;div&gt;&lt;span&gt;TX: P0.10&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style="margin-bottom:8px;margin-top:8px;max-width:95%;"&gt;
&lt;div&gt;&lt;span&gt;RX: P0.11&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style="margin-bottom:8px;margin-top:8px;max-width:95%;"&gt;
&lt;div&gt;&lt;span&gt;CTS: P0.13&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style="margin-bottom:8px;margin-top:8px;max-width:95%;"&gt;
&lt;div&gt;&lt;span&gt;RTS: P0.12&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
[quote user=""]4. If I want to make the comm very reliable, should the RTS and CTS pins be used or are they not necessary?[/quote]
&lt;p&gt;They are not necessary but can be added for reliability in case of noise.&lt;/p&gt;
[quote user=""]5. Is a DT overlay file needed?&amp;nbsp; Some videos and posts indicate that it is, but I&amp;#39;m unclear on the the exact changes needed.&amp;nbsp; I saw the followiing in a video for configuring UART1, but I&amp;#39;m unsure if it is correct (pls correct as necessary):[/quote]
&lt;p&gt;Yes, you definitely need an overlay.&lt;/p&gt;
[quote user=""]&lt;div&gt;6. What changes/additions are needed for the prj.conf?&amp;nbsp; I saw the following in a video but I&amp;#39;m again unsure as to whether it is correct and complete (pls correct as necessary):&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SERIAL&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_UART_ASYNC_API&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_UART_0_INTERRUPT_DRIVEN&lt;/span&gt;&lt;span&gt;=n&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_UART_0_ASYNC&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;What is needed to use UART2?&lt;/p&gt;[/quote]
&lt;p&gt;I guess it would be something similar to this ticket &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/102325/using-uart1-or-uart2-on-nrf9160dk-asset-tracker-v2"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/102325/using-uart1-or-uart2-on-nrf9160dk-asset-tracker-v2&lt;/a&gt; &lt;/p&gt;
[quote user=""]&lt;p&gt;7. In the application code, how is the UARTx referenced?&amp;nbsp; Is the following correct?&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;device&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;uart1&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;DEVICE_DT_GET&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;DT_NODELABEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;uart1&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;device&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;uart2&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;DEVICE_DT_GET&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;DT_NODELABEL&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;uart2&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;Yes, it is correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connecting nRF9151 DKs via UART</title><link>https://devzone.nordicsemi.com/thread/536673?ContentTypeID=1</link><pubDate>Fri, 23 May 2025 00:02:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bf18273-c070-45d4-a10c-517abf8e5b93</guid><dc:creator>frogrammer</dc:creator><description>&lt;p&gt;Although I have nRF5340DK, I just followed the UART example from the Nordic Academy. It worked just fine.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;here is the link :&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-4-serial-communication-uart/topic/uart-protocol/"&gt;academy.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As for the overlay, i think if you change the pins or change default settings you need to add it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>