<?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>Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103464/very-slow-performance-using-lpuart</link><description>Hi, 
 
 We would like to port our existing code using legacy UART to LPUART to decrease the overall power consumption of our product. 
 We could make the LPUART work, but we saw a huge decrease in speed (at least 5 times slower than legacy UART). 
 The</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Oct 2023 09:38:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103464/very-slow-performance-using-lpuart" /><item><title>RE: Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/thread/452488?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2023 09:38:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6c85342-c0c9-409a-a6ad-2fb9f6a6d4af</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;I think I&amp;#39;ve found where the problem was. In an old piece of code, we were using uart_poll_out() function which sends 1 byte after the other, inducing A LOT of REQ/RDY negociations (and a lot of time).&lt;/p&gt;
&lt;p&gt;We&amp;#39;ve changed all the uart_poll_out() calls to fifo_fill() and the problem seems to be fixed.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll do more testing today&lt;/p&gt;
&lt;p&gt;Giuliano&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/thread/452478?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2023 09:22:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04fc296e-b0f2-4b55-90f8-c4c0c132831f</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;If it can help you, here is the logs for:&lt;/p&gt;
&lt;p&gt;The receiver:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[00:02:41.805,236] &amp;lt;dbg&amp;gt; lpuart: uart_callback: RX: Ready buf:0x200070ac, offset: 0,len: 1 &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.805,664] &amp;lt;dbg&amp;gt; lpuart: uart_callback: Rx buf released &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.805,969] &amp;lt;dbg&amp;gt; lpuart: uart_callback: Rx disabled &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.806,274] &amp;lt;dbg&amp;gt; lpuart: api_rx_buf_rsp: buf rsp, state:5 &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.806,610] &amp;lt;dbg&amp;gt; lpuart: rdy_pin_handler: RX: Request detected. &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.806,915] &amp;lt;dbg&amp;gt; lpuart: activate_rx: RX: Ready &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.808,135] &amp;lt;dbg&amp;gt; lpuart: rdy_pin_handler: RX: End detected. &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.808,990] &amp;lt;dbg&amp;gt; lpuart: uart_callback: RX: Ready buf:0x200070ac, offset: 0,len: 1 &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.809,417] &amp;lt;dbg&amp;gt; lpuart: uart_callback: Rx buf released &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.809,722] &amp;lt;dbg&amp;gt; lpuart: uart_callback: Rx disabled &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.810,028] &amp;lt;dbg&amp;gt; lpuart: api_rx_buf_rsp: buf rsp, state:5 &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.810,363] &amp;lt;dbg&amp;gt; lpuart: rdy_pin_handler: RX: Request detected. &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:4[00:02:41.826,965] &amp;lt;dbg&amp;gt; lpuart: rdy_pin_handler: RX: End detected. &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.832,824] &amp;lt;dbg&amp;gt; lpuart: uart_callback: RX: Ready buf:0x200070ac, offset: 0,len: 1 &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.833,251] &amp;lt;dbg&amp;gt; lpuart: uart_callback: Rx buf released &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.833,587] &amp;lt;dbg&amp;gt; lpuart: uart_callback: Rx disabled &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.833,862] &amp;lt;dbg&amp;gt; lpuart: api_rx_buf_rsp: buf rsp, state:5 &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.834,197] &amp;lt;dbg&amp;gt; lpuart: rdy_pin_handler: RX: Request detected. &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.834,503] &amp;lt;dbg&amp;gt; lpuart: activate_rx: RX: Ready &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.835,754] &amp;lt;dbg&amp;gt; lpuart: rdy_pin_handler: RX: End detected. &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.836,578] &amp;lt;dbg&amp;gt; lpuart: uart_callback: RX: Ready buf:0x200070ac, offset: 0,len: 1 &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.837,036] &amp;lt;dbg&amp;gt; lpuart: uart_callback: Rx buf released &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.837,341] &amp;lt;dbg&amp;gt; lpuart: uart_callback: Rx disabled&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The sender:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[00:02:41.329,162] &amp;lt;dbg&amp;gt; lpuart: api_tx: tx len:1 &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.336,395] &amp;lt;dbg&amp;gt; lpuart: req_pin_handler: TX: Confirmed, starting. &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.336,944] &amp;lt;dbg&amp;gt; lpuart: tx_complete: TX completed, pin idle &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.337,371] &amp;lt;dbg&amp;gt; lpuart: api_tx: tx len:1 &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.355,255] &amp;lt;dbg&amp;gt; lpuart: req_pin_handler: TX: Confirmed, starting. &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.355,773] &amp;lt;dbg&amp;gt; lpuart: tx_complete: TX completed, pin idle &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.356,201] &amp;lt;dbg&amp;gt; lpuart: api_tx: tx len:1 &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.359,008] &amp;lt;dbg&amp;gt; lpuart: req_pin_handler: TX: Confirmed, starting. &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.359,527] &amp;lt;dbg&amp;gt; lpuart: tx_complete: TX completed, pin idle &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.359,985] &amp;lt;dbg&amp;gt; lpuart: api_tx: tx len:1 &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.382,873] &amp;lt;dbg&amp;gt; lpuart: req_pin_handler: TX: Confirmed, starting. &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.383,392] &amp;lt;dbg&amp;gt; lpuart: tx_complete: TX completed, pin idle &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.383,850] &amp;lt;dbg&amp;gt; lpuart: api_tx: tx len:1 &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.386,627] &amp;lt;dbg&amp;gt; lpuart: req_pin_handler: TX: Confirmed, starting. &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.387,145] &amp;lt;dbg&amp;gt; lpuart: tx_complete: TX completed, pin idle &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.387,573] &amp;lt;dbg&amp;gt; lpuart: api_tx: tx len:1 &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.410,461] &amp;lt;dbg&amp;gt; lpuart: req_pin_handler: TX: Confirmed, starting. &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.410,980] &amp;lt;dbg&amp;gt; lpuart: tx_complete: TX completed, pin idle &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.411,468] &amp;lt;dbg&amp;gt; lpuart: api_tx: tx len:1 &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.414,215] &amp;lt;dbg&amp;gt; lpuart: req_pin_handler: TX: Confirmed, starting. &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.414,764] &amp;lt;dbg&amp;gt; lpuart: tx_complete: TX completed, pin idle &lt;/code&gt;&lt;br /&gt;&lt;code&gt;[00:02:41.415,191] &amp;lt;dbg&amp;gt; lpuart: api_tx: tx len:1&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It seems that the bytes are sent in packet on 1. Would it explain why it takes so much time?&lt;/p&gt;
&lt;p&gt;Is it possible to send multiple bytes between each REQ/RDY cycle, to reduce overhead?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/thread/452462?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2023 08:57:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e86ee9a1-f645-45fc-82e0-484abe435360</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Sorry for the delay. I&amp;#39;ve tried to use this kconfig option, but nothing changes.&lt;/p&gt;
&lt;p&gt;It still takes approx. 4 seconds to send 2kb of data between both core using LPUART.&lt;/p&gt;
&lt;p&gt;What should I try next?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/thread/447435?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2023 10:50:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94fd8895-fb9b-40b6-9cb4-58c1830bf51f</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Did you try with&amp;nbsp;&lt;span&gt;CONFIG_NRF_SW_LPUART_HFXO_ON_RX=n ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/thread/447383?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2023 08:19:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6eef3239-a699-49c8-bcd8-ccf7945f4cd5</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Any news on that subject?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/thread/444985?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 14:58:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce5c91c0-1ee2-4262-82a6-7d7ca6dc5335</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;I guess that also depends on how many packets you are sending. Turning on HFXO prolongs receiver activation for up to 3 milliseconds.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/thread/444971?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 13:56:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5fb77f3-9437-49e8-b1b4-ea2b8d4f31d2</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;Would it explain the overall slow transfer, even in case of big packets?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/thread/444964?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 13:51:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3eb91561-a858-416a-af94-e8eb1db90b80</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I checked with the developer. One of the main reasons might be&amp;nbsp;&lt;span&gt;&lt;span dir="ltr"&gt;&lt;code&gt;CONFIG_NRF_SW_LPUART_HFXO_ON_RX&lt;/code&gt; which by default is on. It turns on HFXO before every RX transfer. Usually that can be turned off.&amp;nbsp;Other thing is that RX packet is reported after receiving RXTO event (UARTE being turned off). This event is generated 5 bytes time after end of packet.&amp;nbsp;So if 1 byte packet is send it will take approx time needed to transfer &amp;gt;6 byte.&amp;nbsp;So there will be noticeable overhead when there are short packets.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/thread/444837?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 07:21:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9379b01-8449-47ff-b6ad-3baf5cdd2982</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;Hi Sigurd.&lt;/p&gt;
&lt;p&gt;Any news or idea on that issue?&lt;/p&gt;
&lt;p&gt;Giuliano&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/thread/444526?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2023 13:24:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed43e8f8-1757-4414-8625-40bb56226615</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;1/ We send a lot of smaller packets (between 20 and 100 bytes approx.), and sometimes big ones&lt;/p&gt;
&lt;p&gt;2/ Yes, I changed both overlay.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/thread/444525?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2023 13:22:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56c550d5-1d39-4701-8505-8e4d9cadec07</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;1) Are you sending 2100 bytes packets, or smaller ones as well?&lt;/p&gt;
&lt;p&gt;2) Did you set the baudrate to 1000000 for both the nRF9160 and the nRF5340?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/thread/444522?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2023 13:12:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3463c855-a830-4a73-bf15-349bcae25f73</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;Increasing the baudrate does not resolve the issue (it may even be a bit worse, not really sure)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/thread/444515?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2023 13:00:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee0459c9-e2bb-4d83-9cc5-4c14d4f168b6</guid><dc:creator>GiulianoFranchetto</dc:creator><description>&lt;p&gt;No error.&lt;/p&gt;
&lt;p&gt;The messages are received.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll try the baudrate right away&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Very slow performance using LPUART</title><link>https://devzone.nordicsemi.com/thread/444513?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2023 12:43:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82159394-43a9-4916-8c20-3f2715e29437</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="16133" url="~/f/nordic-q-a/103464/very-slow-performance-using-lpuart"]We would need to be able to send/receive packets of at least 2100 bytes.[/quote]
&lt;p&gt;&lt;span&gt;Are you getting any errors when doing that? or is only only a bit slow?&lt;/span&gt;&lt;/p&gt;
[quote userid="16133" url="~/f/nordic-q-a/103464/very-slow-performance-using-lpuart"]&amp;nbsp;current-speed = &amp;lt;115200&amp;gt;;[/quote]
&lt;p&gt;Could you try this ?&lt;/p&gt;
&lt;pre&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;baudrate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;1000000&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;; &lt;/span&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>