<?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 data loss on nRF52840DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72559/uart-data-loss-on-nrf52840dk</link><description>Hi all, 
 Project description and what works: 
 in my project I have one nRF52840DK as central and three nRF52DK as peripheral. The code on the central is based on the &amp;quot; nrf52-ble-app-uart-c-multilink-master&amp;quot; example and the code on the peripherals is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Mar 2021 14:58:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72559/uart-data-loss-on-nrf52840dk" /><item><title>RE: UART data loss on nRF52840DK</title><link>https://devzone.nordicsemi.com/thread/299861?ContentTypeID=1</link><pubDate>Mon, 15 Mar 2021 14:58:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c24dddf-b443-4d76-9aa0-da9a38b2156a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Without being able to pinpoint exactly what is happening, I believe it is related to all your data coming in chunks, and not in a streamlined flow. If two (or possibly more) chunks are too close to one another in time, then it will start to struggle. What will happen if you receive data too fast? If you are processing the data in the BLE interrupts, you may loose some interrupts, and if you process them from the main context, then you will risk the buffers being overflown.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Basically, you can&amp;#39;t rely on remaining in an interrupt for too long if you expect a lot of interrupts in your application, so you need some way to offload the UART handling to your main context, e.g. by copying the data to some other buffers in the events, and then process these buffers (send them over UART) in your main loop.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am not sure how you do all your tests, and what your test scripts are doing. You say that they are looking for 200 something of the same character. Perhaps you are just trying to print 200 of the same character from the interrupt? What about doing something like this&lt;/p&gt;
&lt;p&gt;&amp;nbsp;(pseudo code):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define MAX_CONNECTIONS 5
#define MAX_BUFFER_LEN 247
uint8_t all_my_data[MAX_CONNECTIONS][MAX_BUFFER_LEN];
uint8_t buffer_free[MAX_CONNECTIONS];

static void nus_event_handler(p_ble_evt p_evt)
{
    // Assuming that the length of an incoming buffer is always 247. If not, keep a separate table where you specify the length.
    uint8_t conn_handle = p_ble_evt-&amp;gt;evt...conn_handle;
    if (buffer_free[conn_handle] = true)
    {
        buffer_free[conn_handle] = false;
        for (uint8_t i=0; i&amp;lt;247 /*length*/; i++)
        {
            all_my_data[conn_handle][i] = p_evt-&amp;gt;evt...p_data[i];   //copying the buffer.
        }
    }
    else
    {
        NRF_LOG_INFO(&amp;quot;Not able to process data on conn_handle %d&amp;quot;, conn_handle);
        //figure out what to do in this scenario.
    }
}

static void process_uart(void)
{
    ret_code_t err_code;
    for(uint8_t i=0; i&amp;lt;MAX_CONNECTIONS; i++)
    {
        if (buffer_free[i] == false)
        {
            for(uint8_t j=0; j&amp;lt;247 /*length*/; j++)
            {
                do
                {
                    err_code = app_uart_put(all_my_data[i][j]);
                    if (err_code != NRF_ERROR_BUSY)
                    {
                        APP_ERROR_CHECK(err_code);
                    }
                }while (err_code == NRF_ERROR_BUSY);
            }
            //done with one buffer.
            buffer_free[i] = true;
        }
    }
}

int main(void)
{
    init_everything();
    ...
    
    while(true)
    {
        process_uart();
        sd_app_evt_wait();
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;By default, the ble_app_uart_c example doesn&amp;#39;t really handle this that thoroughly, because it is not intended for this. It is merely a simple example showing how to pass data over BLE.&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART data loss on nRF52840DK</title><link>https://devzone.nordicsemi.com/thread/299247?ContentTypeID=1</link><pubDate>Thu, 11 Mar 2021 12:37:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:722ececf-c710-4496-b9e0-e0440138d463</guid><dc:creator>Maria_19</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/72559/uart-data-loss-on-nrf52840dk/299232#299232"]Was this while using baudrate = 1 000 000?[/quote]
&lt;p&gt;Yes.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/72559/uart-data-loss-on-nrf52840dk/299232#299232"]Is your only option to use UART?[/quote]
&lt;p&gt;This product is going to be communicating with a computer. So &amp;quot;UART over USB&amp;quot; of the DK would be the only option?&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/72559/uart-data-loss-on-nrf52840dk/299232#299232"]How is that data sent?[/quote]
&lt;p&gt;From BLE interrupts. The data is sent whenever there is a &lt;span style="background-color:#ffffff;"&gt;BLE_NUS_C_EVT_NUS_TX_EVT. This is the snippet of the ble_nus_c_evt_handler:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;        case BLE_NUS_C_EVT_NUS_TX_EVT:
            ble_nus_chars_received_uart_print(p_ble_nus_evt-&amp;gt;p_data, p_ble_nus_evt-&amp;gt;data_len);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/72559/uart-data-loss-on-nrf52840dk/299232#299232"]Can you try to use your RX events to just copy the data into separate buffers, and use some flag to print these buffers over UART and see if that helps on the situation?[/quote]
&lt;p&gt;To be honest, that sounds a bit complicated, but I will see if I can do that.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/72559/uart-data-loss-on-nrf52840dk/299232#299232"] Are you using the DKs programmer to transfer the UART data, or another external UART device?[/quote]
&lt;p&gt;I am using the DKs programmer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/72559/uart-data-loss-on-nrf52840dk/299232#299232"]look into flow control[/quote]
&lt;p&gt;I have a few questions regarding the flow control:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;1. General question: The nRF52840DK has a UART&amp;lt;-&amp;gt; USB bridge. Can I use flow control (RTS/CTS) in this case? Is there flow control available? (RTS and CTS would be extra pins on a RS-232 interface)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;2. Can I achieve flow control with the following steps?:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;#&lt;span style="background-color:#ffffff;"&gt; .flow_control = APP_UART_FLOW_CONTROL_ENABLED&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;# Enable flow control on my pc&amp;acute;s application with RTS/CTS&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;3. Do I need more to proper use flow control?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;Thank you very much in advance.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;Maria&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART data loss on nRF52840DK</title><link>https://devzone.nordicsemi.com/thread/299232?ContentTypeID=1</link><pubDate>Thu, 11 Mar 2021 12:14:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c108ca95-9caf-4ac1-bdfd-5478b9a21c74</guid><dc:creator>Edvin</dc:creator><description>[quote user="Maria_19"]After 1-3 minutes I receive that messages and some data was lost. So it is definitely the UART on the Central which drops some bytes.[/quote]
&lt;p&gt;&amp;nbsp;Was this while using baudrate = 1 000 000?&lt;/p&gt;
&lt;p&gt;Is your only option to use UART? Is the product going to be communicating with a computer or another MCU?&amp;nbsp; If you are using another MCU, I would recommend SPI, as it is a lot faster.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Maria_19"]&lt;p&gt;I wrote a small application in LabVIEW which generates a message, when the received data over the COM-Port does not contain 205 same elements in a row.&lt;/p&gt;
&lt;p&gt;After 1-3 minutes I receive that messages and some data was lost. So it is definitely the UART on the Central which drops some bytes.&lt;/p&gt;[/quote]
&lt;p&gt;&amp;nbsp;How is that data sent? from BLE interrupts, or are you generating this UART data from your central application?&lt;/p&gt;
&lt;p&gt;Can you try to use your RX events to just copy the data into separate buffers, and use some flag to print these buffers over UART and see if that helps on the situation?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If that doesn&amp;#39;t work, it may be that you need to look into flow control. Are you using the DKs programmer to transfer the UART data, or another external UART device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART data loss on nRF52840DK</title><link>https://devzone.nordicsemi.com/thread/299166?ContentTypeID=1</link><pubDate>Thu, 11 Mar 2021 07:52:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ac058c0-158a-4c68-b0e0-54a286a93fe7</guid><dc:creator>Maria_19</dc:creator><description>&lt;p&gt;Hello Edvin,&lt;/p&gt;
&lt;p&gt;thank you very much for your answer.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/72559/uart-data-loss-on-nrf52840dk/298960#298960"]115200 is 115kbit/s[/quote]
&lt;p&gt;So it seems that my calculations were correct. However, I increased the baudrate to 1000000 to get the most performance out of it.&amp;nbsp;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/72559/uart-data-loss-on-nrf52840dk/298960#298960"]What function do you use to print your data?[/quote]
&lt;p&gt;I am using the default function for printing characters in the UART from the ble_app_uart_c example:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void ble_nus_chars_received_uart_print(uint8_t * p_data, uint16_t data_len)
{
    ret_code_t ret_val;

    //DEBUG
    if (data_len != 205)
    {
        NRF_LOG_INFO(&amp;quot;Too short&amp;quot;);
    }
    
    NRF_LOG_DEBUG(&amp;quot;Receiving data.&amp;quot;);
    NRF_LOG_HEXDUMP_DEBUG(p_data, data_len);

    for (uint32_t i = 0; i &amp;lt; data_len; i++)
    {
        do
        {
            ret_val = app_uart_put(p_data[i]);
            if ((ret_val != NRF_SUCCESS) &amp;amp;&amp;amp; (ret_val != NRF_ERROR_BUSY))
            {
                NRF_LOG_ERROR(&amp;quot;app_uart_put failed for index 0x%04x.&amp;quot;, i);
                APP_ERROR_CHECK(ret_val);
            }
        } while (ret_val == NRF_ERROR_BUSY);
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Is there an alternative?&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/72559/uart-data-loss-on-nrf52840dk/298960#298960"]Are you using the unmodified ble_app_uart_c implementation?[/quote]
&lt;p&gt;No. The code is based on the nrf-52-ble-app-uart-c-multilink example (from here: &lt;span style="background-color:#ffffff;"&gt;&lt;a href="https://github.com/NordicPlayground/nrf52-ble-app-uart-c-multilink"&gt;github.com/.../nrf52-ble-app-uart-c-multilink&lt;/a&gt;&lt;/span&gt;). I also added the wireless timer synchronization functionality to it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But the way how the data gets printed on the UART is the same as in the original &amp;quot;ble_app_uart_c&amp;quot; example.&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/72559/uart-data-loss-on-nrf52840dk/298960#298960"]Perhaps you can zip it and upload it here[/quote]
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf52_2D00_ble_2D00_app_2D00_uart_2D00_c_2D00_multilink_2D00_master_5F00_with_5F00_timesync_5F00_2.zip"&gt;devzone.nordicsemi.com/.../nrf52_2D00_ble_2D00_app_2D00_uart_2D00_c_2D00_multilink_2D00_master_5F00_with_5F00_timesync_5F00_2.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I am using&amp;nbsp;&lt;span style="background-color:#ffffff;"&gt;pca10056&lt;/span&gt;.&amp;nbsp;&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/72559/uart-data-loss-on-nrf52840dk/298960#298960"]increase the UART_TX_BUF_SIZE[/quote]
&lt;p&gt;I increased this buffer to the maximum possible. (&lt;span style="background-color:#ffffff;"&gt;32768&lt;/span&gt;)&lt;/p&gt;
[quote userid="26071" url="~/f/nordic-q-a/72559/uart-data-loss-on-nrf52840dk/298960#298960"]What will happen if you get two interrupts fairly close (before the first is done printing)?[/quote]
&lt;p&gt;To be honest, I do not really know that at the moment. But I will check that out.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Current Status:&lt;/p&gt;
&lt;p&gt;I wrote a small application in LabVIEW which generates a message, when the received data over the COM-Port does not contain 205 same elements in a row.&lt;/p&gt;
&lt;p&gt;After 1-3 minutes I receive that messages and some data was lost. So it is definitely the UART on the Central which drops some bytes.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can you recommend me any settings of the UART which could fix that?&lt;/p&gt;
&lt;p&gt;Do you have suggestions?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you soo much in advance :)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART data loss on nRF52840DK</title><link>https://devzone.nordicsemi.com/thread/298960?ContentTypeID=1</link><pubDate>Wed, 10 Mar 2021 10:46:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2611e62-81b0-4a51-a1ac-98551ef36030</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Maria,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="Maria_19"]The &amp;quot;Too short&amp;quot; message gets never printed. So the length of the received data is correct.[/quote]
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ok, so I guess we can eliminate the data disappearing before reaching the central then.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I guess it would make sense since the central is the one who has the must UART throughput.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Maria_19"]Which would be the correct baudrate when I want to transmit data with 123 kBit/s[/quote]
&lt;p&gt;&amp;nbsp;115200 is 115kbit/s, so that is too slow. 460800 should be enough for a steady 123000bit\s, but please be aware that you are not necessarily seeing&amp;nbsp;a &amp;quot;steady&amp;quot; 123kbps. You get your data in chunks with size whatever your message size is.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What function do you use to print your data? Are you using the unmodified ble_app_uart_c implementation? Perhaps you can zip it and upload it here, because you have at least made that sample support multiple connections, so you probably did some changes. Perhaps I can have a look.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Your computer shouldn&amp;#39;t struggle to keep up with a UART, but keep in mind that UART is a fairly slow protocol. Also, since your data is coming in bulks, I would try to increase the baudrate to 1000000, and increase the UART_TX_BUF_SIZE, but whether or not that helps depends on the rest of the implementation. What will happen if you get two interrupts fairly close (before the first is done printing)?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART data loss on nRF52840DK</title><link>https://devzone.nordicsemi.com/thread/298909?ContentTypeID=1</link><pubDate>Wed, 10 Mar 2021 08:06:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3d2bd75-9fd3-4c82-8fad-f47892fafb51</guid><dc:creator>Maria_19</dc:creator><description>&lt;p&gt;Hello Edvin,&lt;/p&gt;
&lt;p&gt;thank you very much for your quick reply.&lt;/p&gt;
&lt;p&gt;I already tried to debug this issue. But until your answer I did not really know what I should debug.&lt;/p&gt;
&lt;p&gt;As you suggested, I checked the length of the received data on central. I added the following to the code to the central:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void ble_nus_chars_received_uart_print(uint8_t * p_data, uint16_t data_len)
{
    ...
    //DEBUG
    if (data_len != 205)
    {
        NRF_LOG_INFO(&amp;quot;Too short&amp;quot;);
    }
    ...
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The &amp;quot;Too short&amp;quot; message gets never printed. So the length of the received data is correct.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I figured also out that the printed data via Putty only gets messed up, if I do another heavy task on my pc. So maybe the data in the serial port is correct but putty cant print the data out properly, because it does not always get the required resources from windows. So maybe I have to use another data sink to receive my data from the virtual COM port. I think I have to use a software where I can set up a really large input buffer for the serial port (e.g. LabVIEW). What do you think about this?&lt;/p&gt;
&lt;p&gt;At the moment I am also struggeling with choosing the right baudrate. Which would be the correct baudrate when I want to transmit data with 123 kBit/s over it?&lt;/p&gt;
&lt;p&gt;And finally, does it even make sense to change the&amp;nbsp;&lt;span style="background-color:rgba(255, 255, 255, 1);color:#11171a;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;UART_TX_BUF_SIZE&lt;/span&gt;&lt;span style="background-color:#ffffff;color:#11171a;float:none;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;letter-spacing:normal;line-height:1.5em;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt; and&amp;nbsp;&lt;/span&gt;&lt;span style="background-color:rgba(255, 255, 255, 1);color:#11171a;font-style:normal;font-weight:400;letter-spacing:normal;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;"&gt;UART_RX_BUF_SIZE&lt;/span&gt; on the central to their maximum value?&lt;/p&gt;
&lt;p&gt;Thank you very much in advance. Any kind of feedback is always appreciated.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;#Edit: Is there a proper way to debug, if the central prints all the data correct on the UART?&lt;span style="color:#007000;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:medium;"&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#007000;font-family:&amp;#39;GT Eesti&amp;#39;,&amp;#39;Helvetica&amp;#39;,Arial,sans-serif;font-size:medium;"&gt;Thank you again very much.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART data loss on nRF52840DK</title><link>https://devzone.nordicsemi.com/thread/298802?ContentTypeID=1</link><pubDate>Tue, 09 Mar 2021 16:14:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09edbafb-c777-47f7-9c00-15f8b8b45def</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Maria,&lt;/p&gt;
&lt;p&gt;Have you tried to debug this issue? Can you see whether all the data is correctly received over BLE?&lt;/p&gt;
&lt;p&gt;There are several places the data can &amp;quot;get lost&amp;quot;. UART -&amp;gt; peripheral -&amp;gt; BLE -&amp;gt; Central -&amp;gt; UART.&lt;/p&gt;
&lt;p&gt;Try to set a breakpoint, or to print only the length of the received data on the central. See if the length is what you expect. What you might see is that the data is lost either when the central tries to print the data on the UART, or on the peripheral when the UART tries to read all the data. If the cap is the UART speed,&amp;nbsp; you can try to use an even higher baudrate. Have you tried 1000000?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>