<?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>UARTE does not receive RX RDY on timeout when double buffering</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83234/uarte-does-not-receive-rx-rdy-on-timeout-when-double-buffering</link><description>I&amp;#39;ve tested two scenarios using a hardware loopback to test UART functionality. The double buffer approach does not work as expected. 
 SDK version 1.6.1 
 CONFIG_SERIAL=y CONFIG_UART_ASYNC_API=y 
 
 Single buffer works as expected:
 
 Setup a buffer</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Jan 2022 14:09:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83234/uarte-does-not-receive-rx-rdy-on-timeout-when-double-buffering" /><item><title>RE: UARTE does not receive RX RDY on timeout when double buffering</title><link>https://devzone.nordicsemi.com/thread/346965?ContentTypeID=1</link><pubDate>Mon, 10 Jan 2022 14:09:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff455421-ca93-4b54-8776-cd7bc51ddacb</guid><dc:creator>EDLT</dc:creator><description>&lt;p&gt;Okay thanks for confirming my suspicion. I&amp;#39;ve offloaded the work into a work handler instead that seems to be working well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE does not receive RX RDY on timeout when double buffering</title><link>https://devzone.nordicsemi.com/thread/346701?ContentTypeID=1</link><pubDate>Fri, 07 Jan 2022 12:40:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6053e9c0-0f7c-43ec-a5a3-ed863557f5cd</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It sounds like that could be the case yes, that you spend too much time in the handler for the software to count the bytes.&lt;/p&gt;
&lt;p&gt;Please refer these configs for HW RX byte counting:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/kconfig/CONFIG_UARTE_NRF_HW_ASYNC.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/kconfig/CONFIG_UARTE_NRF_HW_ASYNC.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/kconfig/CONFIG_UART_0_ASYNC.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/kconfig/CONFIG_UART_0_ASYNC.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/kconfig/CONFIG_UART_0_NRF_HW_ASYNC.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/kconfig/CONFIG_UART_0_NRF_HW_ASYNC.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/kconfig/CONFIG_UART_0_NRF_HW_ASYNC_TIMER.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.6.1/kconfig/CONFIG_UART_0_NRF_HW_ASYNC_TIMER.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&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: UARTE does not receive RX RDY on timeout when double buffering</title><link>https://devzone.nordicsemi.com/thread/346541?ContentTypeID=1</link><pubDate>Thu, 06 Jan 2022 15:56:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e2e5923-3363-4a88-ab23-b260aaab74a7</guid><dc:creator>EDLT</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;J&amp;oslash;rgen ,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I ran a very similar test to the zephyr provided double buffer test. This worked as expected. &lt;br /&gt;&lt;br /&gt;Now I&amp;#39;m running into another issue where some characters are dropped. This appears to happen only when a RX timeout occurs.&lt;/p&gt;
&lt;p&gt;For example, I might send 100 characters over UART to my 82 byte double buffers (2 x 82 bytes). I get the&amp;nbsp;&lt;span&gt;UART_RX_RDY&amp;nbsp;for the first buffer full with 82 bytes. The second buffer I&amp;#39;ll notice all the data is in memory, but the length&amp;nbsp;of data/number of bytes returned is between 15-17 bytes (short 1-3 bytes).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m running a loopback at 115,200 baud. If I do nothing in&amp;nbsp;UART_RX_RDY&amp;nbsp; event, I get all the data and the correct length.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If I do too much work in the event, I then start missing characters. I suspect I need to enable UART hardware counting.&lt;br /&gt;&lt;br /&gt;Does this sound correct? What steps do I need to take to enable hardware counting?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE does not receive RX RDY on timeout when double buffering</title><link>https://devzone.nordicsemi.com/thread/345624?ContentTypeID=1</link><pubDate>Mon, 03 Jan 2022 10:43:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d7cc7e5-62bd-46c3-9ace-641ded545d19</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you post the code you used for the 3 scenarios (preferably with full samples in order to reproduce on our end)?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>