<?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>Need to use 2 UARTS on nrf52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39406/need-to-use-2-uarts-on-nrf52840</link><description>Hi everyone 
 The following code is initiaizing the uarts correctly,but there is unpredictable behaviour in this case. 
 Whenever i disable the 1 UART sensor, works fine. 
 but on enabling both uart sensor , one of the sensor gets stucked. 
 Is this code</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Feb 2019 09:17:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39406/need-to-use-2-uarts-on-nrf52840" /><item><title>RE: Need to use 2 UARTS on nrf52840</title><link>https://devzone.nordicsemi.com/thread/170535?ContentTypeID=1</link><pubDate>Tue, 12 Feb 2019 09:17:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:419fa4c6-7fc5-422d-acc2-05d1624e881a</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Great that it builds without problems! What are you using to program the device? Is any error codes returned?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to use 2 UARTS on nrf52840</title><link>https://devzone.nordicsemi.com/thread/170501?ContentTypeID=1</link><pubDate>Tue, 12 Feb 2019 07:02:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6d0aef6-efda-4d37-8a5a-8348529d4b7d</guid><dc:creator>Abhimanyu K K</dc:creator><description>&lt;p&gt;Sir I build it. It is build perfectly. But not flashing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to use 2 UARTS on nrf52840</title><link>https://devzone.nordicsemi.com/thread/152715?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 14:03:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc87c499-4d3c-499b-a0ec-58f63d4db30c</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Could you share your project files?&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to use 2 UARTS on nrf52840</title><link>https://devzone.nordicsemi.com/thread/152656?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 09:50:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b16bbbd7-034c-42bb-84ed-e52e67f6202f</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;Hi Jared&lt;/p&gt;
&lt;p&gt;The same program and techniquie worked fine for both of the LoRa and Sensor a few days ago.&lt;/p&gt;
&lt;p&gt;now its not working as it is supposed to be.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to use 2 UARTS on nrf52840</title><link>https://devzone.nordicsemi.com/thread/152645?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 09:29:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a3e130a-a8fe-4617-ae20-63263814e9c5</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The reason for the unpredictable behavior that you are observing is because the nRF52840 only have one UART, it does however have two instances of the UARTE. SDK 15.2.0 includes an example serial_uartes which utilizes two UARTEs, i suggest that you take a look at that example to understand how it is supposed to be used:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fserial_uartes_example.html&amp;amp;cp=4_0_0_4_5_36"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fserial_uartes_example.html&amp;amp;cp=4_0_0_4_5_36&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to use 2 UARTS on nrf52840</title><link>https://devzone.nordicsemi.com/thread/152621?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 08:35:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:029d88d8-4cfc-4c31-9ccb-ea6f4b741a8a</guid><dc:creator>Rajat</dc:creator><description>[quote userid="6462" url="~/f/nordic-q-a/39406/need-to-use-2-uarts-on-nrf52840/152593"]Are you sure you&amp;#39;re not also trying to do debug logging over one of the UARTs ?[/quote]
&lt;p&gt;Umm, Not sure .&lt;/p&gt;
&lt;p&gt;How can i check if i am doing that? and also how to disable it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to use 2 UARTS on nrf52840</title><link>https://devzone.nordicsemi.com/thread/152607?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 07:54:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06e02ff8-cd73-4f4f-9849-772b0bb49bb9</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;while ((cnf_data[pos++] = uart_read_data ()) != 0x0A)
                {
                     //SEGGER_RTT_printf(0,&amp;quot; Stucked Here\r\n&amp;quot;);
                    // cnf_data[pos]);
                    // pos++;
                }
            cnf_data[pos] = 0;

            SEGGER_RTT_printf (0, &amp;quot; Data from lora:%s \r\n&amp;quot;, cnf_data);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Inside the while statement where i am checking for uart_read_data != 0x0A .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to use 2 UARTS on nrf52840</title><link>https://devzone.nordicsemi.com/thread/152604?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 07:52:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5c75a8b-1b08-4817-a5a1-89f34159d01e</guid><dc:creator>awneil</dc:creator><description>[quote userid="72088" url="~/f/nordic-q-a/39406/need-to-use-2-uarts-on-nrf52840/152595"]it gets stucked in app_uart_get function[/quote]
&lt;p&gt;So, again:&amp;nbsp;&lt;span&gt;How &amp;amp; Where, exactly, does it get &amp;quot;stuck&amp;quot; in that function?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to use 2 UARTS on nrf52840</title><link>https://devzone.nordicsemi.com/thread/152595?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 07:27:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91e8c528-1d40-4c22-bd68-64ca584ad909</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;Sensor_read function is using the uart with &amp;quot;uart_init_terra_copy&amp;quot; function and LoRa uses uart_init_terra function.&lt;/p&gt;
&lt;p&gt;Whenever the sensor-read function is called ,it works fine but if after that i call lora send function , it gets stucked in app_uart_get function inside the lora send function.&lt;/p&gt;
&lt;p&gt;However if i comment out the sensor_read function, it works fine.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;                    int k = sensor_read ();
                            if (k == ERROR)
                                {
                                    SEGGER_RTT_printf (
                                        0, &amp;quot;Sensor Read Fail \r\n&amp;quot;);
                                }
                                       
                                
                                 test_ack=lora_send (&amp;quot;Test&amp;quot;);
          SEGGER_RTT_printf(0,&amp;quot;ACK:%d\r\n&amp;quot;,test_ack);
          nrf_delay_ms (15000);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to use 2 UARTS on nrf52840</title><link>https://devzone.nordicsemi.com/thread/152593?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 07:22:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72ce4cf1-ff85-4169-aa13-22b9ddcd0efb</guid><dc:creator>awneil</dc:creator><description>[quote userid="72088" url="~/f/nordic-q-a/39406/need-to-use-2-uarts-on-nrf52840"]one of the sensor gets stucked[/quote]
&lt;p&gt;How &amp;amp; Where, exactly, does it get &amp;quot;stuck&amp;quot;?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Are you sure you&amp;#39;re not also trying to do debug logging over one of the UARTs ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Need to use 2 UARTS on nrf52840</title><link>https://devzone.nordicsemi.com/thread/152592?ContentTypeID=1</link><pubDate>Fri, 12 Oct 2018 07:22:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74a11f56-4a40-43b7-99fb-326864e3de5f</guid><dc:creator>Jakub Rzeszutko</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>