<?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>UART Transmission Issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81576/uart-transmission-issue</link><description>Hello, 
 I am trying to develop a set of code that will receive data on uart 1 and transmit that data on uart 2, and vice versa. 
 I have verified via testing printk&amp;#39;s that I am receiving and trying to send all of the correct data. Uart 2 works correctly</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Nov 2021 15:19:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81576/uart-transmission-issue" /><item><title>RE: UART Transmission Issue</title><link>https://devzone.nordicsemi.com/thread/340399?ContentTypeID=1</link><pubDate>Tue, 23 Nov 2021 15:19:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f36a2d5e-5972-4a04-8708-af0a72912542</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Can you elaborate? Also, you should ensure you call&amp;nbsp;uart_irq_tx_ready() and that it returns 1 before you call&amp;nbsp;uart_fifo_fill().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Transmission Issue</title><link>https://devzone.nordicsemi.com/thread/340175?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 16:44:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d781b03-40c4-4a46-b281-b369efc936b1</guid><dc:creator>jdorn</dc:creator><description>&lt;p&gt;I tried that, and using either&amp;nbsp;one of or both tx_ready or tx_enable functions completely prevent me from transmitting messages.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Transmission Issue</title><link>https://devzone.nordicsemi.com/thread/338757?ContentTypeID=1</link><pubDate>Fri, 12 Nov 2021 11:28:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49ff9f7c-369d-465f-b6e8-b69750e1557b</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have not had a chance to test this but I notice you call&amp;nbsp;uart_fifo_fill() without first calling uart_irq_tx_ready(), and from each others event handlers, and that is not how the API is intended to be used. See the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.1/zephyr/reference/peripherals/uart.html?highlight=uart_fifo_fill#c.uart_fifo_fill"&gt;uart_fifo_fill() API documentation&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Transmission Issue</title><link>https://devzone.nordicsemi.com/thread/338448?ContentTypeID=1</link><pubDate>Wed, 10 Nov 2021 21:27:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9db44b32-a811-4dee-83b1-3596eaaa189e</guid><dc:creator>jdorn</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have determined that&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;uart_fifo_fill(uart2, sendbuf, strlen(sendbuf));&lt;/pre&gt; is the offending line of code. for some reason, when I call that function the first time, it succeeds. but the second time (and every time after) it always returns 0 bytes sent and does not transmit any data. note: I have verified that both the buffer is populated and the strlen() function returns the expected value via debugging.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;the only way i have found to fix this problem is to receive data on the uart 2 fifo_read function. this resets whatever is blocking the fifo_fill and allows another item to be sent.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;note: the other device (uart 1)&amp;nbsp;does not have a similar issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Transmission Issue</title><link>https://devzone.nordicsemi.com/thread/338419?ContentTypeID=1</link><pubDate>Wed, 10 Nov 2021 15:15:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b5726ba-bb51-40f8-b03f-34bfd03e6d93</guid><dc:creator>jdorn</dc:creator><description>&lt;p&gt;Overlay: just changes pins of uart 1 and uart 2. enables them and sets their speed to 9600.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uart1 {
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;9600&amp;gt;;
	tx-pin = &amp;lt;13&amp;gt;;
	rx-pin = &amp;lt;14&amp;gt;;
};

&amp;amp;uart2 {
	status = &amp;quot;okay&amp;quot;;
	current-speed = &amp;lt;9600&amp;gt;;
	tx-pin = &amp;lt;15&amp;gt;;
	rx-pin = &amp;lt;16&amp;gt;;
};

&amp;amp;i2c2 {
	status = &amp;quot;disabled&amp;quot;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have two external usb-&amp;gt;uart devices (I am using diligent&amp;#39;s PmodUSBUART board.&amp;nbsp;I have tested other usb-&amp;gt;uart devices and confirmed that it is not a hardware issue).&lt;/p&gt;
&lt;p&gt;These usb-&amp;gt;uart boards connect between my PC and my DK on UART 1 and UART 2.&lt;/p&gt;
&lt;p&gt;I am using the serial console built in to XCTU on the PC&amp;nbsp; to monitor the uart-&amp;gt;usb devices on the PC side.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Transmission Issue</title><link>https://devzone.nordicsemi.com/thread/338412?ContentTypeID=1</link><pubDate>Wed, 10 Nov 2021 14:49:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a71625d2-026b-4ba3-ba62-964a633a3318</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am not able to explain this right now. Can you share everything I need to reproduce on my end, so also your device tree overlay, and if there are any other things that are also needed?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>