<?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 Async RX Latency When Using STOPRX Task on nRF5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123764/uart-async-rx-latency-when-using-stoprx-task-on-nrf5340</link><description>Hello, 
 I&amp;#39;m using the nRF5340 and have configured UART with EasyDMA to receive a variable number of bytes at 307200 baud. Our application has strict timing constraints, so we need to detect the end of a UART frame as quickly as possible. 
 To achieve</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Aug 2025 14:56:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123764/uart-async-rx-latency-when-using-stoprx-task-on-nrf5340" /><item><title>RE: UART Async RX Latency When Using STOPRX Task on nRF5340</title><link>https://devzone.nordicsemi.com/thread/546081?ContentTypeID=1</link><pubDate>Tue, 19 Aug 2025 14:56:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db86ef7e-57f1-4565-b0ff-fc82eb78bff2</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My apologies for the incorrect device link! I got my tabs mixed up, unfortunately. The&amp;nbsp;UARTE peripheral in the different nRF52/53/54 devices is very similar in behaviour.&lt;/p&gt;
[quote user="manojv"]In our setup, the delay from issuing &lt;strong&gt;&lt;code&gt;STOPRX&lt;/code&gt; &lt;/strong&gt;until &lt;strong&gt;&lt;code&gt;ENDRX&lt;/code&gt; &lt;/strong&gt;is generated is typically around &lt;strong&gt;200 µs&lt;/strong&gt;, which unfortunately exceeds our timing requirements. Is there any way to mitigate or reduce this latency, even partially?[/quote]
&lt;p&gt;Unfortunately, the sequence is required, as stated in the datasheet:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf5340/page/uarte.html#ariaid-title8"&gt;https://docs.nordicsemi.com/bundle/ps_nrf5340/page/uarte.html#ariaid-title8&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="manojv"]You mentioned that this delay ensures any &lt;em&gt;“potential on-going transaction”&lt;/em&gt; is completed before stopping the receiver. Could you elaborate on what qualifies as an “on-going transaction”? In my tests, the delay is consistently ~200 µs &lt;strong&gt;regardless of how long I wait after the last received byte before issuing &lt;code&gt;STOPRX&lt;/code&gt;&lt;/strong&gt;. Shouldn’t the receiver already be idle by then?[/quote]
&lt;p&gt;The timeout scales&amp;nbsp;accordingly towards&amp;nbsp;the configured baudrate. As described in the datasheet, it can read up to 4 bytes during the timeframe from TASKS_STOPRX to EVENTS_RXTO has occurred:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;UARTE can receive up to four bytes after the STOPRX task has been triggered, if these are sent in succession immediately after the RTS signal is deactivated.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is the major contributor to the overall delay that you&amp;#39;re seeing.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Async RX Latency When Using STOPRX Task on nRF5340</title><link>https://devzone.nordicsemi.com/thread/545957?ContentTypeID=1</link><pubDate>Mon, 18 Aug 2025 16:52:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cc46e60-59aa-4d4d-a582-c7720ceb4ea7</guid><dc:creator>manojv</dc:creator><description>&lt;p data-start="151" data-end="165"&gt;Hello H&amp;aring;kon,&lt;/p&gt;
&lt;p data-start="167" data-end="274"&gt;Thank you for your response.&lt;/p&gt;
&lt;p data-start="276" data-end="320"&gt;I do have a couple of follow-up questions:&lt;/p&gt;
&lt;ol data-start="322" data-end="930"&gt;
&lt;li data-start="322" data-end="553"&gt;
&lt;p data-start="325" data-end="553"&gt;In our setup, the delay from issuing &lt;strong&gt;&lt;code data-start="362" data-end="370"&gt;STOPRX&lt;/code&gt; &lt;/strong&gt;until &lt;strong&gt;&lt;code data-start="377" data-end="384"&gt;ENDRX&lt;/code&gt; &lt;/strong&gt;is generated is typically around &lt;strong data-start="418" data-end="428"&gt;200 &amp;micro;s&lt;/strong&gt;, which unfortunately exceeds our timing requirements. Is there any way to mitigate or reduce this latency, even partially?&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="555" data-end="930"&gt;
&lt;p data-start="558" data-end="930"&gt;You mentioned that this delay ensures any &lt;em data-start="600" data-end="634"&gt;&amp;ldquo;potential on-going transaction&amp;rdquo;&lt;/em&gt; is completed before stopping the receiver. Could you elaborate on what qualifies as an &amp;ldquo;on-going transaction&amp;rdquo;? In my tests, the delay is consistently ~200 &amp;micro;s &lt;strong data-start="793" data-end="879"&gt;regardless of how long I wait after the last received byte before issuing &lt;code data-start="869" data-end="877"&gt;STOPRX&lt;/code&gt;&lt;/strong&gt;. Shouldn&amp;rsquo;t the receiver already be idle by then?&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p data-start="932" data-end="1132"&gt;Additionally, I noticed that the documentation link you shared refers to the &lt;strong data-start="1009" data-end="1021"&gt;nRF54L15&lt;/strong&gt; product. Was that intentional, or should I refer instead to the &lt;strong data-start="1086" data-end="1097"&gt;nRF5340&lt;/strong&gt; documentation for this behavior?&lt;/p&gt;
&lt;p data-start="1134" data-end="1157"&gt;Best regards,&lt;br data-start="1147" data-end="1150" /&gt; Manoj&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART Async RX Latency When Using STOPRX Task on nRF5340</title><link>https://devzone.nordicsemi.com/thread/545941?ContentTypeID=1</link><pubDate>Mon, 18 Aug 2025 13:42:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f32b120-7692-4bae-af46-30fd1f96d770</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Is the delay I&amp;#39;m observing directly caused by this documented timeout behavior?[/quote]
&lt;p&gt;Yes, there is a delay between the TASKS_STOPRX and the EVENTS_RXTO. This is to ensure any potential on-going transaction is completed before the UART receiver is fully stopped.&lt;/p&gt;
[quote user=""]Is there any way to reduce or eliminate this delay, so the data can be processed immediately after &lt;code&gt;STOPRX&lt;/code&gt; is issued?[/quote]
&lt;p&gt;Here&amp;#39;s the chapter in question:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/uarte.html#ariaid-title5"&gt;https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/uarte.html#ariaid-title5&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You need to wait, as shown in the figure that you shared, and later on in the low power chapter:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/uarte.html#ariaid-title12"&gt;https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/uarte.html#ariaid-title12&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>