<?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>ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102499/async-uart-and-uart_rx_rdy-timeout</link><description>I saw some similar question, but none is what I am experiencing. 
 I notice some weird behavior while testing DMA mode, so I made a simple setup: 
 I set the DMA buffer to be 100 bytes, and a timeout of 100ms, and a custom callback: 
 
 uart_callback_set</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Jun 2024 03:19:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102499/async-uart-and-uart_rx_rdy-timeout" /><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/487194?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2024 03:19:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:119e44b5-c4f5-4acf-a29d-ab6b7e9399ea</guid><dc:creator>LongQi</dc:creator><description>&lt;p&gt;Thanks, but interrupt occupy too much CPU time and my other&amp;nbsp;thread will get affected. I use the data padding&amp;nbsp;to fulfill the buffer like &lt;a href="https://devzone.nordicsemi.com/members/mrburvall"&gt;MrBurvall&lt;/a&gt;&amp;nbsp;did for now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/487117?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2024 12:13:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d150e98-9a2d-4670-bf3c-f14f6ef46041</guid><dc:creator>MrBurvall</dc:creator><description>&lt;p&gt;Hello, I reproduced it using two PCA10056 and the answer from Nordic in a private ticket was &amp;quot;Link &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/85128/uart-wrong-offset-after-buffer-overflow/362477"&gt;here&lt;/a&gt;. The workaround as suggested in that case is to enable HW byte counting.&amp;quot;&lt;/p&gt;
&lt;p&gt;That works for me. No real fix from Nordic exists.&lt;/p&gt;
&lt;p&gt;Best Regards, Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/487099?ContentTypeID=1</link><pubDate>Mon, 03 Jun 2024 11:24:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a893798e-cb95-4f35-b29a-17d270aef347</guid><dc:creator>LongQi</dc:creator><description>&lt;p&gt;any progress? I am using 2.6.1 and still have the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/472672?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 11:32:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adabda1a-06a5-426c-8217-6d4e521b6dd0</guid><dc:creator>MrBurvall</dc:creator><description>&lt;p&gt;Hello mmm,&lt;/p&gt;
&lt;p&gt;Where you able to find a solution for this problem?&lt;/p&gt;
&lt;p&gt;I see the same behavior, workaround for me is to send some extra data, which is ignored. This triggers UART_RX_RDY.&lt;/p&gt;
&lt;p&gt;Best Regards, Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/453787?ContentTypeID=1</link><pubDate>Thu, 02 Nov 2023 14:47:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8bd11bd-2866-4edc-b84e-4be9e896099b</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi, an update, we have received multiple tickets about this, so it appears that it may be a bug in the driver. I am currently looking into these reports and I&amp;#39;ll keep you updated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/452634?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2023 14:24:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d043d79e-b022-4a95-a278-740c627286fe</guid><dc:creator>mmm</dc:creator><description>&lt;p&gt;&amp;gt; From your log it seems that the single byte is not lost, as it is included at the start of the following message.&lt;/p&gt;
&lt;p&gt;correct, this ticket is not about data getting lost, but UART_RX_RDY reporting an incorrect number of bytes received.&lt;/p&gt;
&lt;p&gt;With 2.4.0 the number was kinda random, with 2.4.2 seems is it always under-reported by 1, but may be just a coincidence.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;gt; Could you try debugging and check where this byte is when the RX RDY event is triggered&lt;/p&gt;
&lt;p&gt;I do see the byte are all the 10 bytes in the buffer as expected; but UART_RX_RDY&amp;#39;s evt-&amp;gt;data.rx.len is wrong&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/452513?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2023 11:10:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:277c37ce-3c55-4058-bf12-45719e84aa92</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;From your log it seems that the single byte is not lost, as it is included at the start of the following message.&lt;/p&gt;
&lt;p&gt;Could you try debugging and check where this byte is when the RX RDY event is triggered in your event handler? Check the contents of the RX buffer and whether data.rx.len matches the number of bytes in the RX buffer. A logic trace on the UART lines could also be insightful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/452291?ContentTypeID=1</link><pubDate>Wed, 25 Oct 2023 13:34:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87f31a2f-31a7-496e-b4e0-26af2add7bc7</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Edvin is&amp;nbsp;our of office so the case has been re-assigned. We will look into it and get back to you. Please let us know if you have had any updates on your end in the meantime.&lt;/p&gt;
&lt;p&gt;Br,&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/451265?ContentTypeID=1</link><pubDate>Thu, 19 Oct 2023 11:20:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d98dbfb-df9e-4d01-8f59-f4948451a532</guid><dc:creator>mmm</dc:creator><description>&lt;p&gt;Hi, long time, new update.&lt;/p&gt;
&lt;p&gt;Im testing with toolchain 2.4.2 and seems better but still some issues.&lt;/p&gt;
&lt;p&gt;Output and code from my test follow.&lt;br /&gt;First column is time in seconds, if data is send/received and what is sent/received (received data has b&amp;#39;&amp;#39; around them as i print the raw bytes, to see if i get weird non-visible ascii bytes, for example \n is an actual line feed)&lt;/p&gt;
&lt;p&gt;The test send a message every 2 seconds, the nrf is set to 100ms timeout, and send back data immediately.&lt;/p&gt;
&lt;p&gt;1 byte is systematically not reported as received (tested with different length of data, seems always 1 is &amp;quot;lost&amp;quot;), the buffer swap happen correctly at 100 bytes, and all no data is lost.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;1697713032.61: sent: 0123456789&lt;br /&gt;1697713032.811: recv: b&amp;#39;INF: got 9 bytes\nDATA: -012345678-\n&amp;#39;&lt;br /&gt;1697713034.618: sent: 0123456789&lt;br /&gt;1697713034.818: recv: b&amp;#39;INF: got 9 bytes\nDATA: -901234567-\n&amp;#39;&lt;br /&gt;1697713036.624: sent: 0123456789&lt;br /&gt;1697713036.825: recv: b&amp;#39;INF: got 9 bytes\nDATA: -890123456-\n&amp;#39;&lt;br /&gt;1697713038.631: sent: 0123456789&lt;br /&gt;1697713038.832: recv: b&amp;#39;INF: got 9 bytes\nDATA: -789012345-\n&amp;#39;&lt;br /&gt;1697713040.638: sent: 0123456789&lt;br /&gt;1697713040.839: recv: b&amp;#39;INF: got 9 bytes\nDATA: -678901234-\n&amp;#39;&lt;br /&gt;1697713042.645: sent: 0123456789&lt;br /&gt;1697713042.846: recv: b&amp;#39;INF: got 9 bytes\nDATA: -567890123-\n&amp;#39;&lt;br /&gt;1697713044.652: sent: 0123456789&lt;br /&gt;1697713044.853: recv: b&amp;#39;INF: got 9 bytes\nDATA: -456789012-\n&amp;#39;&lt;br /&gt;1697713046.66: sent: 0123456789&lt;br /&gt;1697713046.861: recv: b&amp;#39;INF: got 9 bytes\nDATA: -345678901-\n&amp;#39;&lt;br /&gt;1697713048.667: sent: 0123456789&lt;br /&gt;1697713048.868: recv: b&amp;#39;INF: got 9 bytes\nDATA: -234567890-\n&amp;#39;&lt;br /&gt;1697713050.674: sent: 0123456789&lt;br /&gt;1697713050.774: recv: b&amp;#39;INF: detected end of buffer for 19 bytes\nDATA: -1234567890123456789-\n&amp;#39;&lt;br /&gt;1697713052.681: sent: 0123456789&lt;br /&gt;1697713052.882: recv: b&amp;#39;INF: got 9 bytes\nDATA: -012345678-\n&amp;#39;&lt;br /&gt;1697713054.688: sent: 0123456789&lt;br /&gt;1697713054.889: recv: b&amp;#39;INF: got 9 bytes\nDATA: -901234567-\n&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Code python:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;import serial
import time

last_write = time.time()
with serial.Serial(&amp;#39;/dev/ttyACM0&amp;#39;, 921600, timeout=0.1) as ser:
 while True:
 x = ser.read(100) # read one byte
 if len(x):
 print(f&amp;quot;{round(time.time(), 3)}: recv: {x}&amp;quot;)
 if time.time() - last_write &amp;gt;= 2:
 last_write = time.time()
 msg = &amp;quot;0123456789ABCDEFGHILMNOPQRSTUVZ&amp;quot;
 print(f&amp;quot;{round(time.time(), 3)}: sent: {msg}&amp;quot;)
 ser.write(msg.encode(&amp;quot;ascii&amp;quot;))
print(&amp;quot;failed to open serial&amp;quot;)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Code NRF:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;zephyr/types.h&amp;gt;
#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/drivers/uart.h&amp;gt;
#include &amp;lt;zephyr/usb/usb_device.h&amp;gt;

#include &amp;lt;zephyr/device.h&amp;gt;
#include &amp;lt;zephyr/devicetree.h&amp;gt;
#include &amp;lt;soc.h&amp;gt;

#include &amp;lt;stdio.h&amp;gt;

#define LOG_MODULE_NAME peripheral_uart
LOG_MODULE_REGISTER(LOG_MODULE_NAME);

uint8_t uart_buffer_rx[100];
volatile size_t uart_buffer_written = 0;
volatile size_t uart_buffer_completed = 0;
volatile bool disabled = true;

static const struct device *uart = DEVICE_DT_GET(DT_CHOSEN(nordic_nus_uart));

const int32_t UART_RX_TIMEOUT_US = 1000 * 100; // 100 millisecond timeout

void app_uart_async_callback(const struct device *uart_dev, struct uart_event *evt, void *user_data) {
 switch (evt-&amp;gt;type) {
 case UART_TX_DONE:
 // do nothing
 break;
 
 case UART_RX_RDY:
 uart_buffer_written += evt-&amp;gt;data.rx.len;
 break;
 
 case UART_RX_BUF_REQUEST:
 //assign same buffer; basically this is now a circular buffer
 uart_rx_buf_rsp(uart, uart_buffer_rx, sizeof(uart_buffer_rx));
 uart_buffer_completed++;
 uart_buffer_written = 0; 
 break;

 case UART_RX_BUF_RELEASED:
 break;

 case UART_RX_DISABLED:
 disabled = true;
 break;
 
 default:
 break;
 }
}

static int uart_init(void) {
 int err = 0;
 struct uart_config serial_config;
 uart_config_get(uart, &amp;amp;serial_config);
 uart_configure(uart, &amp;amp;serial_config);

 if (!device_is_ready(uart)) {
 return -ENODEV;
 }

 err |= uart_callback_set(uart, app_uart_async_callback, NULL);
 err |= uart_rx_enable(uart, uart_buffer_rx, sizeof(uart_buffer_rx), UART_RX_TIMEOUT_US);
 disabled = false;
 return err;
}

void log(const char *msg, ...) {
 static char s[1000];
 va_list argptr;
 va_start(argptr, msg);
 size_t len = vsnprintf(s, sizeof(s), msg, argptr);
 va_end(argptr);
 
 uart_tx(uart, s, len, SYS_FOREVER_MS);
 k_sleep(K_MSEC(1)); //92 char
}

void error(void) {
 while (true) {
 /* Spin for ever */
 k_sleep(K_MSEC(1000));
 }
}

int main(void) {
 int err = 0;

 err = uart_init();
 if (err) {
 log(&amp;quot;ERR: uart_init&amp;quot;);
 error();
 }

 log(&amp;quot;started!&amp;quot;);

 size_t last_uart_buffer_written = uart_buffer_written;
 size_t last_uart_buffer_completed = uart_buffer_completed;
 for (;;) {
 if (disabled){
 uart_rx_enable(uart, uart_buffer_rx, sizeof(uart_buffer_rx), UART_RX_TIMEOUT_US);
 if (err == 0)
 disabled = false;
 log(&amp;quot;ERR: Serial re-enabled&amp;quot;);
 }
 size_t number_of_oveflow = uart_buffer_completed - last_uart_buffer_completed;
 switch (number_of_oveflow){
 default: 
 {
 log(&amp;quot;ERR: TOO MANY OVERFLOW FOR %d TIMES&amp;quot;, number_of_oveflow);
 // we want to fallthrough to read whatever we got
 }
 case 1:
 {
 // now we print remaining buffer
 size_t remaining_data = sizeof(uart_buffer_rx) - last_uart_buffer_written;
 log(&amp;quot;INF: detected end of buffer for %d bytes\n&amp;quot;, remaining_data);
 log(&amp;quot;DATA: -%.*s-\n&amp;quot;, remaining_data, uart_buffer_rx+last_uart_buffer_written);
 // now reset buffer counters
 last_uart_buffer_completed += number_of_oveflow;
 last_uart_buffer_written = 0;
 // we want to fallthrough to read the initial data
 }
 case 0:
 {
 size_t available = uart_buffer_written - last_uart_buffer_written;
 if (!available){
 break;
 }
 log(&amp;quot;INF: got %d bytes\n&amp;quot;, available);
 log(&amp;quot;DATA: -%.*s-\n&amp;quot;, available, uart_buffer_rx+last_uart_buffer_written);
 last_uart_buffer_written += available;
 }
 }
 k_sleep(K_MSEC(10));
 }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/440973?ContentTypeID=1</link><pubDate>Fri, 11 Aug 2023 13:08:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62d02489-e731-46c2-9704-b338d1d48844</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I understand. I am sorry for the late reply. I have been trying to clear up my backlog, because I will be out of office for a while.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Try adding RTT logging to your project, so that you can look into what the functions in the UART_TX_DONE event returns, and whether they work as you expected. I didn&amp;#39;t manage to understand the logic flow during my last take on this ticket.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Check whether bytes_claimed have the correct value when UART_TX_DONE triggers, and whether k_sem_give(&amp;amp;tx_done) is called when it shouldn&amp;#39;t be (if bytes_claimed != 0).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Since I will be out of office, I suggest you create a new ticket for follow up questions. You can refer to this one for background, but please upload your application there, if you changed anything at this point, and try to give a summary of your current status.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/440117?ContentTypeID=1</link><pubDate>Mon, 07 Aug 2023 13:13:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86aa933a-02ee-4190-87fd-619da5591f33</guid><dc:creator>mmm</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;yes, those differences are desired.&lt;/p&gt;
&lt;p&gt;This is a minimal example to reproduce and debug the issue, i did not want to add anything more than necessary.&lt;/p&gt;
&lt;p&gt;I need to be able to saturate the 921600 baudrate, so i had to get rid of the interrupt implementation and switch to a DMA based. I managed to reach full write speed, but when i started to test the input speed, i notice the test failing and the issue was the weird timing.&lt;/p&gt;
&lt;p&gt;Then i started to remove stuff, thinking it may be some issue with timing or concurrency..&lt;/p&gt;
&lt;p&gt;Until i notice the issue is coming from the callback.&lt;/p&gt;
&lt;p&gt;Note that the data is missing already in the callback event, so even if TX would misbehave, the issue is present; the TX output is just a nice to have&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/440115?ContentTypeID=1</link><pubDate>Mon, 07 Aug 2023 13:01:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7736200-32c5-4d58-88df-06cdb6bed0ca</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I see that your implementation differs quite a bit from the peripheral_uart sample. Is that on purpose? I played around with the sleep in your main() loops, and I see that it queues only parts of the message on every sleep cycle. Also, your&amp;nbsp;UART_TX_DONE event (inside app_uart_async_callback()) is not successfully triggering the next byte, so this will continue to fill up the buffer, as you write to it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I think you need to look into the UART_TX_DONE implementation that you are using. Especially the bytes_claimed handling. Is this working as you expect? Or are you freeing up the buffer faster than you are processing it? I also suggest adding logging via RTT, so that you can use LOG_INF() to see what&amp;#39;s going on. (It is difficult to use printk, which is using the UART, when the UART is not working as you expect it to).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I see that when I remove all the printk() it is working closer to what I expect it to, but then again, as it says in the comments, these functions are not thread safe, so interrupting it with printk() may not be very fortunate.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/439873?ContentTypeID=1</link><pubDate>Fri, 04 Aug 2023 09:54:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5f1d624-5abc-4cfa-a840-f7b3a9464152</guid><dc:creator>mmm</dc:creator><description>&lt;p&gt;of course,here it is!&lt;br /&gt;The board I am using is a FANSTEL BT480E&lt;br /&gt; I started from a standard example and did a couple of configuration changes.&lt;/p&gt;
&lt;p&gt;Note i am using&lt;/p&gt;
&lt;div style="background-color:#1f1f1f;color:#cccccc;font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:18px;font-weight:normal;line-height:24px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#569cd6;"&gt;CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC&lt;/span&gt;&lt;span style="color:#cccccc;"&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2480.peripheral_5F00_uart.zip"&gt;devzone.nordicsemi.com/.../2480.peripheral_5F00_uart.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/439818?ContentTypeID=1</link><pubDate>Fri, 04 Aug 2023 06:56:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54490017-9b69-4f3b-9a6b-25d4f69b8ad7</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I can&amp;#39;t say that I have seen this before. Is it possible to zip the application that you are using to replicate this, so that I can give it a go? Are you running it on a DK, or are you using custom HW?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/439738?ContentTypeID=1</link><pubDate>Thu, 03 Aug 2023 14:21:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3c07df1-4eda-4baa-a1d6-4a6478e33cff</guid><dc:creator>mmm</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;it does not fix the issue but I did indeed used a wrong example.&lt;br /&gt;I am using 2.4.0, the example is bluetooth/peripherical_uart.&lt;/p&gt;
&lt;p&gt;I changed this timeout to be 1 second and I still get timeout with partial received data:&lt;/p&gt;
&lt;p&gt;I am sending, all together, 0123456789ABCDF, then wait for timeout, then send again the string 0123456789ABCDF&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;here what i see&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:38:190] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;Hello world through the UART async driver␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:47:780] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_RDY 15 536881776 0!␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:47:780] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;RX 15: 0123456789ABCDE␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:53:182] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_RDY 15 536881776 15!␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:53:182] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;RX 15: F0123456789ABCD␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;at about 16:08:46 i send 0123456789ABCDF␍␊,&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;one second later we see&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:47:780] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_RDY 15 536881776 0!␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;means the event has been called, with len 15 (wrong, should be 16), dma buffer at memory 536881776 (ok) and offset 0 (ok)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:47:780] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;RX 15: 0123456789ABCDE␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;is the main loop that send our data back, we see it send back the first 15 bytes, we are missing &amp;#39;F&amp;#39;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;Then we can see i dont do nothing for more than 5 seconds, and no timeout for the remaining data.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;then at about 16:08:52 i send again 0123456789ABCDF&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;and we see&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:53:182] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_RDY 15 536881776 15!␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;len 15 (wrong, should be 16 of the new message plus the 1 of the old message), dma buffer at memory 536881776 (ok) and offset 15 (ok, at least is aligned with what happen before)&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:53:182] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;RX 15: F0123456789ABCD␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;we see that we finally obtained the last F, and the first 14 bytes, but now E and F are missing.. but the event UART_RX_RDY is never called...&lt;br /&gt;My application has no way to know that there are 2 more bytes waiting.&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;full test up until buffer swap:&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:38:190] &lt;/span&gt;UART Async example started␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:38:190] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_BUF_REQUEST␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:38:190] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;Hello world through the UART async driver␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&amp;gt;&amp;gt;&amp;gt; 0123456789ABCDEF&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:47:780] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_RDY 15 536881776 0!␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:47:780] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;RX 15: 0123456789ABCDE␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&amp;gt;&amp;gt;&amp;gt; 0123456789ABCDEF&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:53:182] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_RDY 15 536881776 15!␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:08:53:182] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;RX 15: F0123456789ABCD␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&amp;gt;&amp;gt;&amp;gt; 0000000000&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:12:37:011] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_RDY 9 536881776 30!␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:12:37:011] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;RX 9: EF0000000␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&amp;gt;&amp;gt;&amp;gt; 1111111111&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:12:49:414] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_RDY 9 536881776 39!␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:12:49:414] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;RX 9: 000111111␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&amp;gt;&amp;gt;&amp;gt; 3333333333&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:12:55:008] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_RDY 9 536881776 48!␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:12:55:008] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;RX 9: 111133333␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&amp;gt;&amp;gt;&amp;gt; 4444444444&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:12:57:806] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_RDY 10 536881776 57!␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:12:57:806] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;RX 10: 3333344444␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&amp;gt;&amp;gt;&amp;gt; 5555555555&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:12:59:803] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_RDY 9 536881776 67!␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:12:59:819] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;RX 9: 444444555␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&amp;gt;&amp;gt;&amp;gt; 6666666666&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:13:02:616] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_RDY 9 536881776 76!␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:13:02:616] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;RX 9: 555555566␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&amp;gt;&amp;gt;&amp;gt; 7777777777&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:13:03:545] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_RDY 15 536881776 85!␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:13:03:545] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_BUF_RELEASED␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:13:03:545] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_BUF_REQUEST␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:13:03:545] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;RX 15: 666666667777777␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&amp;gt;&amp;gt;&amp;gt; 0123456789ABCDEF&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:14:08:549] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;UART_RX_RDY 14 536881876 0!␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#78b4c8;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;[16:14:08:549] &lt;/span&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;RX 14: 7770123456789A␍␊&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style="margin:0px;text-indent:0px;"&gt;&lt;span style="color:#000000;font-family:&amp;#39;DejaVu Sans&amp;#39;;font-size:10pt;"&gt;we see the buffer swap happen correctly at len 100 and no data is lost and the second buffer is used, but we always have few byes lost, and the amount of lost byte is not constant.&lt;br /&gt;It can become so bad, sometimes i can be more than 10 bytes late!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: ASYNC uart and UART_RX_RDY timeout</title><link>https://devzone.nordicsemi.com/thread/439621?ContentTypeID=1</link><pubDate>Thu, 03 Aug 2023 07:45:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08bb1740-3070-4ead-8f85-5a7b73e8d43b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What NCS version are you using? The reason I ask is that we have a bug in some of the previous ncs versions (fixed in v2.4.0) where the uart_rx_enable() expects a timeout in microseconds, but we provided it in milliseconds. So depending on what your&amp;nbsp;&lt;span&gt;UART_RX_TIMEOUT_MS is set to, it may only receive 1/1000 of what you expect it to be.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1691048727886v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If that is the issue, the fix is easy. Just increase the&amp;nbsp;UART_RX_TIMEOUT_MS by a factor of 1000, and you should be fine.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Let me know if that doesn&amp;#39;t help.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Edvin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>