<?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>Nrf51 UART example code has problem!</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15886/nrf51-uart-example-code-has-problem</link><description>Dear Sir, 
 Here I test the ble_peripheral example &amp;quot;ble_app_uart&amp;quot; (Softdevice 8.0) with Kail MDK ARM 5.20 environemt on the PAC10028A board. 
 I found it&amp;#39;s not stable and alwasy will happen error (auto disoccnect) after continue notification a while</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Aug 2016 15:06:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15886/nrf51-uart-example-code-has-problem" /><item><title>RE: Nrf51 UART example code has problem!</title><link>https://devzone.nordicsemi.com/thread/60589?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2016 15:06:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec339284-5817-486e-8bb2-19925aabe5ac</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Ok, Im glad that you figured out the problem.&lt;/p&gt;
&lt;p&gt;The modified ble_app_uart example on &lt;a href="https://devzone.nordicsemi.com/question/89882/ble_app_uart-uart-overrun/?answer=90202#post-id-90202"&gt;the linked thread&lt;/a&gt; should not assert. You can select any UART BAUD rate and any BLE throughput setting, it will attempt to move data from UART to BLE as fast as it can. When UART fifo is full, the CPU will stop extracting data from the hardware UART buffer, which will make the UART set the RTS high and stop the UART peer device from sending more data. When softdevice buffer is full, the CPU will wait until BLE_EVT_TX_COMPLETE event is received or when BLE services are enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51 UART example code has problem!</title><link>https://devzone.nordicsemi.com/thread/60592?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2016 16:18:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8aea080-b3bf-4e50-891f-1911b2384e6e</guid><dc:creator>chtsai</dc:creator><description>&lt;p&gt;Dear Stefan,&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Here I clearified my case it&amp;#39;s different , no error code just restart but I found the reason, my uart adapater(usb2uart) connect to PC has problem, after change another one (different brand) not exist the situation, I don&amp;#39;t want wast time to check why this usb2uart adapater has problem.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I used the BLE_EVT_TX_COMPLETE event to send arrived UART RX data should be no BLE_ERROR_NO_TX_PACKETS error. Is it still exist problem  with higher throught according your experience  ? (115200bps ok ?)  in your experiment ( can up to 128Kbps).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;BLE4.2 can also update in nRF51 , no need to change chip to nR52 right ?&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51 UART example code has problem!</title><link>https://devzone.nordicsemi.com/thread/60591?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2016 12:20:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6fdd889-8e4f-4af4-9341-72d8222bf4cf</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi chtsai&lt;/p&gt;
&lt;p&gt;Did you read the &lt;a href="https://devzone.nordicsemi.com/question/89882/ble_app_uart-uart-overrun/?answer=90202#post-id-90202"&gt;updated answer from 18.8.2016?&lt;/a&gt; Example is there, also brief description, compatibility, and conclusion on throughput measured.&lt;/p&gt;
&lt;p&gt;If you are sending only one packet per second, that should however work fine with the standard ble_app_uart example. What is the reason for the disconnect? Do you see any error code returned? To figure out how to debug, look at these threads &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/?answer=60126#post-id-60126"&gt;1&lt;/a&gt; &lt;a href="https://devzone.nordicsemi.com/blogs/821/an-introduction-to-error-handling-in-nrf5-projects/"&gt;2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;BLE_ERROR_NO_TX_PACKETS means that no softdevice buffers are available. This error message is totally normal to get when you are pushing packets to the softdevice faster than the softdevice can send the packets over BLE. Then &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.0/group___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html?cp=3_6_2_1_0_2_4_2_3#ga313fe43c2e93267da668572e885945db"&gt;you should wait until some BLE packets have been sent and softdevice buffers become available again&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The data payload extension of BLE 4.2 has not been implemented yet into S130, but most likely soon.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51 UART example code has problem!</title><link>https://devzone.nordicsemi.com/thread/60590?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2016 10:49:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd14f299-2280-4477-88ca-bfa537686955</guid><dc:creator>chtsai</dc:creator><description>&lt;p&gt;Dear Stefan,&lt;/p&gt;
&lt;p&gt;Thanks the quickly response, I read some post and it seems the issue still on going ? no final example code available ? you mentioned that you have some improvement in it what&amp;#39;s the final result/conclusion ?
In my case I just repeated  transfer 20 bytes every one seconds , it should be enough time and should not get BLE_ERROR_NO_TX_PACKETS result in theory, but it happened which means has problem, skip put new data into stack if not success seems to avoid the problem not fix the problem in deep inside. Could help provide new &amp;quot;uart_app_uart&amp;quot; sample files (I use SD110 8.0 ) so  I can test here to check if it ok for such simple testing case.&lt;/p&gt;
&lt;p&gt;Another question is about increase throughput by using the BLE 4.2 large data package (&amp;gt; 20 bytes) , do you know can use on nRF51 device just update FW/SW to support BLE 4.2 is ok or need use new chip such as NRF52 ? any document, post to teach user how to upgrade to BLE 4.2 ?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf51 UART example code has problem!</title><link>https://devzone.nordicsemi.com/thread/60588?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2016 08:38:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:718e7d7f-5397-4dad-9993-4be1b76078b6</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;You are correct, the ble_app_uart example code has a problem. When throughput gets high, the application will assert. There is a &lt;a href="https://devzone.nordicsemi.com/question/89882/ble_app_uart-uart-overrun/"&gt;preliminary solution described in my answer here&lt;/a&gt;, which contains an improved ble_app_uart code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>