<?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>Zephyr UART Asynchronous API continuous data receiving</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89245/zephyr-uart-asynchronous-api-continuous-data-receiving</link><description>Hi all, 
 I&amp;#39;m having problems receiving data from UART using Zephyr Asynchronous API. I&amp;#39;ve read documentation from UART — Zephyr Project Documentation and I think I understand how UART API new buffer requests work, to have always a seamless data receiving</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Feb 2023 11:07:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89245/zephyr-uart-asynchronous-api-continuous-data-receiving" /><item><title>RE: Zephyr UART Asynchronous API continuous data receiving</title><link>https://devzone.nordicsemi.com/thread/408245?ContentTypeID=1</link><pubDate>Mon, 06 Feb 2023 11:07:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3ced984-f3b6-4a7e-8091-72ba5573e9a0</guid><dc:creator>Pedro</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I removed all&amp;nbsp;LOG_ and malloc functions. Take also a l&lt;/span&gt;ook&amp;nbsp;to &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/90964/uart-async-api-notifys-fewer-bytes-than-it-has-received/"&gt;this post&lt;/a&gt;. It may help you.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Pedro.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART Asynchronous API continuous data receiving</title><link>https://devzone.nordicsemi.com/thread/408055?ContentTypeID=1</link><pubDate>Fri, 03 Feb 2023 15:18:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:725fcfc2-e6c6-4abe-8336-fd6054f673ab</guid><dc:creator>mahq</dc:creator><description>&lt;p&gt;Hello, thanks for sharing your solution, I&amp;#39;m having the same issue. When&amp;nbsp;receiving data that are larger than my UART buffer size i.e. when allocating more than one buffer i always seem to loose three bytes in the transition between those two buffers.&lt;/p&gt;
&lt;p&gt;What kind of things did you remove in the interrupt handler in order to get it to work?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART Asynchronous API continuous data receiving</title><link>https://devzone.nordicsemi.com/thread/374580?ContentTypeID=1</link><pubDate>Tue, 28 Jun 2022 14:19:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d636a53-6ad0-4ab0-b6af-177edada5efd</guid><dc:creator>Pedro</dc:creator><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve finally solved it. The problem was doing too many thins inside the interrupt handler of UART. When I reduce to minimum the things done in the interrupt handler, all work as expected.&lt;/p&gt;
&lt;p&gt;I hope this can help somebody.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART Asynchronous API continuous data receiving</title><link>https://devzone.nordicsemi.com/thread/374234?ContentTypeID=1</link><pubDate>Sat, 25 Jun 2022 22:23:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d43316a-063b-4611-814d-56d788d243fc</guid><dc:creator>Pedro</dc:creator><description>&lt;p&gt;Hello Kazi,&lt;/p&gt;
&lt;p&gt;Do you mean disabling and re-enabling UART?&lt;/p&gt;
&lt;p&gt;I tried disabling and re-enabling UART each time I receive something and some bytes are also lost.&lt;/p&gt;
&lt;p&gt;Thanks you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART Asynchronous API continuous data receiving</title><link>https://devzone.nordicsemi.com/thread/374221?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2022 22:20:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bfe06c6-03e1-494a-9588-a846a9521fca</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello Pedro,&lt;/p&gt;
&lt;p&gt;Have you tried to restart the UART to workaround this?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Kazi Afroza Sultana&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr UART Asynchronous API continuous data receiving</title><link>https://devzone.nordicsemi.com/thread/374059?ContentTypeID=1</link><pubDate>Fri, 24 Jun 2022 07:24:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62bf11b3-6ade-43c7-9b74-43e5af3da230</guid><dc:creator>Pedro</dc:creator><description>&lt;p&gt;I can answer to myself the last issue, about not working when defining 256 o 512 bytes buffers. &lt;code&gt;RXD.MAXCNT&lt;/code&gt; register in &lt;code&gt;UARTE0&lt;/code&gt; (Maximum number of bytes in receive buffer) is 8 bits. When you write 256 o 512 to it, you are actually writing a 0 to that 8 bits.&lt;/p&gt;
&lt;p&gt;Surprisingly this is not detected as an error by &lt;code&gt;uart_rx_enable()&lt;/code&gt;. Could it be possible to fix this for future releases?&lt;/p&gt;
&lt;p&gt;About the other problem, I&amp;#39;ve simplified a lot my code, but I&amp;#39;m still receiving less bytes.&lt;/p&gt;
&lt;p&gt;If the buffer is 40 bytes, and I send 90 bytes length string&lt;/p&gt;
&lt;p&gt;&lt;code&gt;#abcdef-10,ghijkl-20,mnopqr-30,stuvwx-40,abcdef-50,ghijkl-60,mnopqr-70,stuvwx-80,abcdef-90&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I receive 3 &lt;code&gt;UART_RX_RDY&lt;/code&gt; events:&lt;br /&gt;1&lt;sup&gt;st&lt;/sup&gt; with &lt;code&gt;#abcdef-10,ghijkl-20,mnopqr-30,stuvwx-40&lt;/code&gt;&lt;br /&gt;2&lt;sup&gt;nd&lt;/sup&gt; with &lt;code&gt;,abcdef-50,ghijkl-60,mnopqr-70,stuvwx-80&lt;/code&gt;&lt;br /&gt;3&lt;sup&gt;rd&lt;/sup&gt; with &lt;code&gt;,a&lt;/code&gt; (Missing 8 bytes)&lt;/p&gt;
&lt;p&gt;Then, if I continue sending chars, I start receiving the &amp;#39;lost&amp;#39; chars, for example:&lt;br /&gt;I send &lt;code&gt;123&lt;/code&gt;, I receive &lt;code&gt;bcd&lt;/code&gt;, then I send &lt;code&gt;4&lt;/code&gt; and receive &lt;code&gt;e&lt;/code&gt; and so on, until I fill the 40 bytes buffer and I receive all the &amp;#39;delayed&amp;#39; data.&lt;/p&gt;
&lt;p&gt;What I&amp;#39;m doing wrong??&lt;/p&gt;
&lt;p&gt;Thanks again!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>