<?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>Configure second UART on nRF9160 DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73893/configure-second-uart-on-nrf9160-dk</link><description>I&amp;#39;ve been trying to configure a second UART for use on the nRF9160 DK. However, I&amp;#39;m having some issues getting anything to send over the UART. I feel like I&amp;#39;m missing something simple. I configured and setup UART0 to PO.10, 11, 12, and 13 on the DK. I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Jul 2019 07:51:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73893/configure-second-uart-on-nrf9160-dk" /><item><title>RE: Configure second UART on nRF9160 DK</title><link>https://devzone.nordicsemi.com/thread/304360?ContentTypeID=1</link><pubDate>Tue, 02 Jul 2019 07:51:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87ac16b1-17e9-41aa-8fc3-054cd6a8a092</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;[quote][/quote]&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;I was able to get it successfully working like that and had two way communication with my terminal program.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Glad to hear you solved the issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote user="jlienau03"] I couldn&amp;#39;t find P0.29 anywhere on the DK!&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;Yes, it&amp;#39;s not easy to find, but it&amp;#39;s available on the front (P1) and on the back of the board (P30).&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1562053596912v2.png" alt=" " /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1562052429670v1.png" alt=" " /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1562053666147v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;There seems to be a bug in the documentation, as D22 is not mentioned connected to P0.29&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="jlienau03"]I think it would be REALLY nice if on the next revision of the DK, you guys put a physical switch so users could manually route P026, 27, 28, and 29 to the headers.&amp;nbsp; I&amp;#39;m sure I&amp;#39;m not the only person looking to route two com ports to the headers.[/quote]
&lt;p&gt;&amp;nbsp;No, you are not. I will report this internally. I agree that this part of the board and documentation is somewhat confusing.&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configure second UART on nRF9160 DK</title><link>https://devzone.nordicsemi.com/thread/304359?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 15:57:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6c54b07-e734-4d2c-beec-3a6e17ec83c1</guid><dc:creator>jlienau03</dc:creator><description>&lt;p&gt;Adding the CONFIG_BSD_LIBRARY_TRACE_ENABLED=n also did not work.&amp;nbsp; But since I&amp;#39;m using the uart example from github, I don&amp;#39;t believe it uses the BSD library anyway.&lt;/p&gt;
&lt;p&gt;I did notice that there are two additional unused I/Os on the DK.&amp;nbsp; P0.24 and P0.25 look like they go to pin headers on the DK and are not default routed through anything else.&amp;nbsp; If I do not use RTS/CTS I can configure UART1 to use TX and RX pins only on P0.24 and P0.25.&amp;nbsp; I was able to get it successfully working like that and had two way communication with my terminal program.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1561995863651v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Alternatively, it looks like P0.26, P0.27, P0.28, P0.29&amp;nbsp;can be routed away from the virtual com port by the nRF91_UART_CTRL line.&amp;nbsp; It&amp;#39;s controlled by the nRF52 has to be driven high.&amp;nbsp; Rather than reprogram the nRF52 I just drove that line high by jumping R69 to 3V&amp;nbsp;&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;&amp;nbsp; This way I didn&amp;#39;t have to mess with programming it.&amp;nbsp; However, I then discovered that only P0.26, P0.27, and P0.28 route to headers on the DK.&amp;nbsp; I couldn&amp;#39;t find P0.29 anywhere on the DK!&amp;nbsp; So long story short I used P0.25 and substituted that in for P0.29 since I knew that was available.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1561995927934v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s what my overlay and proj.conf files look like now.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*Uart 0*/
&amp;amp;uart0 {
	current-speed = &amp;lt;115200&amp;gt;;
	status = &amp;quot;ok&amp;quot;;
	tx-pin = &amp;lt;10&amp;gt;;
	rx-pin = &amp;lt;11&amp;gt;;
	rts-pin = &amp;lt;12&amp;gt;;
	cts-pin = &amp;lt;13&amp;gt;;
};
/*end of code added by Johnny Lienau on March 4*/

/* Uart 1 */
&amp;amp;uart1 {
	current-speed = &amp;lt;115200&amp;gt;;
	status = &amp;quot;ok&amp;quot;;
	tx-pin = &amp;lt;25&amp;gt;; 
	rx-pin = &amp;lt;26&amp;gt;; 
	rts-pin = &amp;lt;27&amp;gt;;
	cts-pin = &amp;lt;28&amp;gt;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SERIAL=y

CONFIG_TRUSTED_EXECUTION_NONSECURE=y

CONFIG_UART_INTERRUPT_DRIVEN=y

CONFIG_MAIN_STACK_SIZE=4096
CONFIG_UART_0_NRF_UARTE=y
CONFIG_UART_1_NRF_UARTE=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I think it would be REALLY nice if on the next revision of the DK, you guys put a physical switch so users could manually route P026, 27, 28, and 29 to the headers.&amp;nbsp; I&amp;#39;m sure I&amp;#39;m not the only person looking to route two com ports to the headers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configure second UART on nRF9160 DK</title><link>https://devzone.nordicsemi.com/thread/304358?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 14:04:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e13d8f59-34c0-46b8-83cb-19b8aa1acfee</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Yes, I&amp;#39;m sorry, but I had to try as I did not see anything out of the ordinary in your setup.&lt;br /&gt;&lt;br /&gt;One of the answers, where &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/44648/how-to-communicate-an-external-module-through-uart-in-nrf9160dk/175824#175824"&gt;UART2 is used for modem tracing&lt;/a&gt;, threw me off a little. This is actually UART1&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#ifdef CONFIG_BSD_LIBRARY_TRACE_ENABLED
/* Use UARTE1 as a dedicated peripheral to print traces. */
static const nrfx_uarte_t uarte_inst = NRFX_UARTE_INSTANCE(1);
#endif&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Can you please try to add the following to your config file:&lt;/span&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;CONFIG_BSD_LIBRARY_TRACE_ENABLED=n&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="jlienau03"] I shouldn&amp;#39;t need to reprogram or change the nRF52 or adjust the virtual com port settings because of that.&amp;nbsp; Is that correct?[/quote]
&lt;p&gt;&amp;nbsp;Did you try with default pin configuration as stated in the &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf91_dk/UG/nrf91_DK/board_controller.html?cp=2_0_3_4_6_0"&gt;Board Controller chapter&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf91_dk/UG/nrf91_DK/mcu_virtual_com_port.html?cp=2_0_3_3_0_1"&gt;VCOM chapter&lt;/a&gt;? Have you ensured that you are connected correctly with the FTDI?&lt;br /&gt;&lt;br /&gt;I am working on finding the correct answer my self, as the pin configuration is not very clear in the documentation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configure second UART on nRF9160 DK</title><link>https://devzone.nordicsemi.com/thread/304357?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 12:57:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc4ca746-0859-4c1f-8e82-075615ba48f0</guid><dc:creator>jlienau03</dc:creator><description>&lt;p&gt;Hello, thanks for the reply.&amp;nbsp; Adding that line still does not seem to make it work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Reading&amp;nbsp;the post you linked, it seems that they were using I/O pins that were not originally routed to headers on the DK.&amp;nbsp; The ones I&amp;#39;ve chosen (P0.14, 15, 16, 20)&amp;nbsp; should all be default routed to the header pins.&amp;nbsp; I shouldn&amp;#39;t need to reprogram or change the nRF52 or adjust the virtual com port settings because of that.&amp;nbsp; Is that correct?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configure second UART on nRF9160 DK</title><link>https://devzone.nordicsemi.com/thread/304356?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2019 09:10:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16c7e032-00f3-4906-a4b7-518c7bbd5ba7</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Can you please try to add the following to your config file:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BOARD_PCA10090_UART1_ARDUINO=y&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Ref. this guide from my colleague:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/45476/connecting-uart1-to-a-periph-on-nrf9160-dk/178988#178988"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/45476/connecting-uart1-to-a-periph-on-nrf9160-dk/178988#178988&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let me know if that helps.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configure second UART on nRF9160 DK</title><link>https://devzone.nordicsemi.com/thread/304355?ContentTypeID=1</link><pubDate>Thu, 27 Jun 2019 20:54:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdf598fd-49cf-4e29-880b-4703d10edc28</guid><dc:creator>jlienau03</dc:creator><description>&lt;p&gt;Forgot my config file:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SERIAL=y
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_UART_0_NRF_UARTE=y
CONFIG_UART_1_NRF_UARTE=y
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>