<?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>nRF9160 UART</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44714/nrf9160-uart</link><description>Hello, 
 I tried to setup the UART example provided at this link: https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160 
 I open two COM ports, when I type data in one of the COM port it gets printed on the other one. However</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 03 Apr 2021 22:13:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44714/nrf9160-uart" /><item><title>RE: nRF9160 UART</title><link>https://devzone.nordicsemi.com/thread/302931?ContentTypeID=1</link><pubDate>Sat, 03 Apr 2021 22:13:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4952765b-fee0-45d6-9bcc-ddb23915c630</guid><dc:creator>fatalfeel</dc:creator><description>&lt;p&gt;nRF Connect SDK 1.5.99 Nrf9160 uart port to external pin and source code share&lt;br /&gt;&lt;a href="http://fatalfeel.blogspot.com/2013/12/nrf9160-uart-port-to-external-pin.html"&gt;fatalfeel.blogspot.com/.../nrf9160-uart-port-to-external-pin.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UART</title><link>https://devzone.nordicsemi.com/thread/179530?ContentTypeID=1</link><pubDate>Mon, 01 Apr 2019 13:36:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2345b58-75f8-47ca-a966-d657f3129c2b</guid><dc:creator>cdugue</dc:creator><description>&lt;p&gt;That worked, thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UART</title><link>https://devzone.nordicsemi.com/thread/177515?ContentTypeID=1</link><pubDate>Thu, 21 Mar 2019 09:38:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b8774a8-0b1b-4944-9366-6bf340b9d4c8</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;One thing you can try is to add CONFIG_BSD_LIBRARY_TRACE_ENABLED=n in prj.conf.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UART</title><link>https://devzone.nordicsemi.com/thread/176300?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2019 18:22:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:399ad144-bd22-4c6e-bec0-5e8844067084</guid><dc:creator>cdugue</dc:creator><description>&lt;p&gt;Sure. I also tried sending data from the nRF52840 to the nRF9160 through UART and the same thing happens, I only get 0 or 128 as data.&lt;/p&gt;
&lt;p&gt;In the main of the MQTT sample I added the following initialization for UART:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;struct device *uart = device_get_binding(&amp;quot;UART_1&amp;quot;);
if (!uart) {
    printk(&amp;quot;error\r\n&amp;quot;); // error happens.
}

uart_irq_callback_set(uart, uart_cb);
uart_irq_rx_enable(uart);
printk(&amp;quot;UART loopback start!\n&amp;quot;);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The UART callback:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void uart_cb(struct device *x)
{
  uart_irq_update(x);
  int data_length = 0;

  if (uart_irq_rx_ready(x)) {
    data_length = uart_fifo_read(x, uart_buf, sizeof(uart_buf));
    uart_buf[data_length] = 0;
  }

  printk(&amp;quot;data_length %d - &amp;quot;, data_length);
  printk(&amp;quot;%d (&amp;quot;, uart_buf[0]);
  printk(&amp;quot;%s)\n&amp;quot;, uart_buf);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The UART buffer:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static u8_t uart_buf[1024];&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In the project config file I added:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;CONFIG_SERIAL=y
CONFIG_UART_1_NRF_UARTE=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UART</title><link>https://devzone.nordicsemi.com/thread/176227?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2019 14:14:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7beb4c5d-0f63-47ac-a87d-04e315fd420e</guid><dc:creator>Hakon</dc:creator><description>[quote user="cdugue"]Isn&amp;#39;t UART0 used for printk?[/quote]
&lt;p&gt;&amp;nbsp;Yes I was wrong apparently. I just checked in autoconf.h, and found #define CONFIG_UART_CONSOLE_ON_DEV_NAME &amp;quot;UART_0&amp;quot;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="cdugue"]I am running the mqtt_simple example with code from the UART example when I get the error.[/quote]
&lt;p&gt;&amp;nbsp;Do you mind sharing your code, so I can see exaclty what you are doing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UART</title><link>https://devzone.nordicsemi.com/thread/175886?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2019 10:36:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2aed2e90-9909-4407-b04e-9159e1227c22</guid><dc:creator>cdugue</dc:creator><description>&lt;p&gt;Isn&amp;#39;t UART0 used for printk?&lt;br /&gt;I am running the mqtt_simple example with code from the UART example when I get the error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UART</title><link>https://devzone.nordicsemi.com/thread/175698?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2019 13:58:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eba81318-2da3-4511-b270-dd92491b8878</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;I believe UART1 is used by printk(I might be wrong). In that case you would receive and send on the same COM port. Are you running the UART example or the mqtt_simple example when you get the error? The prj.conf file should be fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UART</title><link>https://devzone.nordicsemi.com/thread/175623?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2019 12:33:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a9d72d0-6d37-43e5-a85a-df42b51c238a</guid><dc:creator>cdugue</dc:creator><description>&lt;p&gt;I am trying to add the UART example to the mqtt_simple example and chose to use the UART1.&lt;/p&gt;
&lt;p&gt;What are the necessary changes to prj.conf?&lt;/p&gt;
&lt;p&gt;I have:&lt;br /&gt;CONFIG_SERIAL=y&lt;br /&gt;CONFIG_UART_INTERRUPT_DRIVEN=y&lt;br /&gt;CONFIG_UART_1_NRF_UARTE=y&lt;/p&gt;
&lt;p&gt;But I don&amp;#39;t have:&lt;br /&gt;CONFIG_TRUSTED_EXECUTION_NON_SECURE=y&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 UART</title><link>https://devzone.nordicsemi.com/thread/175591?ContentTypeID=1</link><pubDate>Tue, 12 Mar 2019 10:10:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3fea37b-a9f7-4f26-90bc-77d10706519e</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;have you made any modifications to the example code? Also, have you made the necessary changes to prj.conf?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>