<?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>Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69008/problems-with-uart-in-52840</link><description>I am using a code similar to App_uart_C from SDK17.02 - central sending data over uart to another peripheral. 
 After 30-60 sec, the operation stops probably due to an error in the UART and I need to reset the chip 
 How can I handle UART errors ? I don</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 Dec 2020 19:27:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69008/problems-with-uart-in-52840" /><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/286886?ContentTypeID=1</link><pubDate>Tue, 29 Dec 2020 19:27:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d4a9514-ac24-41a8-aa1f-8253855ffd00</guid><dc:creator>Avi</dc:creator><description>&lt;p&gt;After several attempts to focus on the exact reason for the failure, I am now sure that it is due to RX error that is causing an error which is non recoverable.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am streaming data into the chip via UART interface at 38K (not able to use FC). Is there a recommendation on how to handle such error? i.e. any signals from the uart driver that can be used in advance?&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/284100?ContentTypeID=1</link><pubDate>Wed, 09 Dec 2020 14:06:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1f44350-2fcd-470c-b656-86df3d22ead3</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I received your code, but I have not found a solution for you yet. Will get back to you as soon as possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/284030?ContentTypeID=1</link><pubDate>Wed, 09 Dec 2020 12:09:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:248c57a7-511b-451f-9403-c8a3c7a44c1e</guid><dc:creator>Avi</dc:creator><description>&lt;p&gt;Please update if you got my code with the problem of SDK17.02 vs. SDK15&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/283500?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2020 10:52:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ef612c8-fece-49ab-8b08-f985f52fab52</guid><dc:creator>Avi</dc:creator><description>&lt;p&gt;Hi Jorgen,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you get the code?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thx&lt;/p&gt;
&lt;p&gt;Avi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/283284?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2020 10:30:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd705b0b-fb9c-4ae6-aa89-a1a711c2c362</guid><dc:creator>Avi</dc:creator><description>&lt;p&gt;Can I send it in private mail?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/283278?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2020 10:15:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb3263e7-2f46-4129-933b-ec042e2cc7cf</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;It is very hard to say something about what changes in the SDK/softdevice that could cause this without knowing where the error happens. There are many modules involved in the example.&lt;/p&gt;
&lt;p&gt;If you are not able to determine the source of the error through debugging, maybe you could upload the full project for me to reproduce/debug it for you?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/283238?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2020 07:11:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9a3c0c0-efc2-4a9a-aa7e-f4e0ed9168a4</guid><dc:creator>Avi</dc:creator><description>&lt;p&gt;I checked with &lt;span style="text-decoration:underline;"&gt;SDK15.0&lt;/span&gt; and the code is &lt;span style="text-decoration:underline;"&gt;working&lt;/span&gt; without any delay&lt;/p&gt;
&lt;p&gt;So, it may be easier to find the problem in SDK17.02 if you can explain what are the changes in:&lt;/p&gt;
&lt;p&gt;UART, NUS or softdevice related to the problem I see.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/283012?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2020 09:37:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:300ba071-629d-44a8-820d-58fdc665ba2e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Can you start a debug-session with your application and put breakpoints around to find out where the issue is happening? Note that you will have to restart the application once you hit a breakpoint, the softdevice will not allow you to single-step far into the application.&lt;/p&gt;
&lt;p&gt;APP_ERROR_CHECK() will call&amp;nbsp;app_error_handler(), where you should be able to determine the origin of the error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/282987?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2020 08:25:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffee297c-6224-43b2-aa4c-abeb446bec84</guid><dc:creator>Avi</dc:creator><description>&lt;p&gt;I build up a debugging environment based on 52840DK connected to a PC with Serial to input the streams. I can recreate the crash. Currently the last message on the RTT viewer is:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;quot;&amp;lt;debug&amp;gt; nrf_ble_gq: Processing the request queue...&amp;quot;&lt;/p&gt;
&lt;p&gt;I&amp;#39;s appreciate some help on how to find the reason for crash and to fix it&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/282949?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 20:57:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad3b062d-d9c8-4933-9ae7-995193623dfb</guid><dc:creator>Avi</dc:creator><description>&lt;p&gt;Please look at this part of the code:&lt;/p&gt;
&lt;p&gt;do&lt;br /&gt; {&lt;br /&gt; err_code = central_string_send(data_array, index);&lt;br /&gt; if ( (err_code != NRF_ERROR_INVALID_STATE) &amp;amp;&amp;amp; (err_code != NRF_ERROR_RESOURCES) )&lt;br /&gt; {&lt;br /&gt; //APP_ERROR_CHECK(err_code);&lt;br /&gt; }&lt;br /&gt; } while (err_code == NRF_ERROR_RESOURCES);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;uint32_t central_string_send(uint8_t * p_string, uint16_t length)&lt;br /&gt;{&lt;br /&gt; return ble_nus_c_string_send(&amp;amp;m_ble_nus_c, p_string, length);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Anyway to improve it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/282948?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 20:55:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29adc558-dc5f-4509-9042-d2cf59b565ad</guid><dc:creator>Avi</dc:creator><description>&lt;p&gt;I cannot use the HWFC since my ext processor doesn&amp;#39;t support it.&lt;/p&gt;
&lt;p&gt;I removed the&amp;nbsp;//APP_ERROR_HANDLER(p_event-&amp;gt;data.error_code);&lt;/p&gt;
&lt;p&gt;And still the transfer is stuck after few seconds (about 1000 lines of 15 chars each).&lt;/p&gt;
&lt;p&gt;The only way to recover is via hard reset&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/282947?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 20:40:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb2d6eb9-92b7-4373-9061-a727a4142656</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Have you considered adding HWFC pins to the UART in your application? If you are not able to process the FIFO fast enough, the incoming stream of data may overflow the UART, causing an error.&lt;/p&gt;
&lt;p&gt;You can try to remove the APP_ERROR_CHECK in APP_UART_FIFO_ERROR case in&amp;nbsp;uart_event_handle(). This will ignore any OVERRUN/&lt;span&gt;PARITY/FRAMING/&lt;/span&gt;BREAK errors from the UART peripheral, which may lead to data loss.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;case APP_UART_FIFO_ERROR:
    //APP_ERROR_HANDLER(p_event-&amp;gt;data.error_code);
    break;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/282945?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 20:13:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d80fe77-f5df-4cbc-acbf-c2ea7ec38abe</guid><dc:creator>Avi</dc:creator><description>&lt;p&gt;Indeed, after more testing, it was not a reliable solution.&lt;/p&gt;
&lt;p&gt;I am streaming data via the UART at 38K from external processor, and transmitting the data to another peripheral.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The reception is done via&amp;nbsp;uart_event_handle which is forwarding the data arrays to&amp;nbsp;ble_nus_c_string_send&lt;/p&gt;
&lt;p&gt;Since my circuit is part of a system (i.e. ext processor), I cannot use debugger and I cannot see the errors if exist.&lt;/p&gt;
&lt;p&gt;I will have to try &amp;quot;fixing&amp;quot; the code and check it on my system to see if it helps.&lt;/p&gt;
&lt;p&gt;I would appreciate any ideas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/282942?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 19:48:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3932099-407b-4b2b-9793-44cf29c405ea</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It does not sound like a very reliable way to resolve the issue with a delay, and this could also increase the current consumption of your device.&lt;/p&gt;
&lt;p&gt;If you can explain where the error occurs, and what the error is, I can help you find a better solution. If the chip &amp;quot;stops&amp;quot;, it is most likely ending up in the error handler, because an error code was passed to APP_ERROR_CHECK() macro, and you have built the application in debug mode. You do not have to pass all error codes to this macro, it is fully up to you how you handle an error. For instance, if you get a NRF_ERROR_NO_MEM error from a call to&amp;nbsp;app_uart_put(), you can filter this error and tell your application to retry the operation at a later point.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with UART in 52840</title><link>https://devzone.nordicsemi.com/thread/282934?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 17:35:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a76a5a0-0f99-4800-8e98-007ba3877f22</guid><dc:creator>Avi</dc:creator><description>&lt;p&gt;I solved the problem by adding a delay of 4msec after each packet of 10bytes at 38K UART.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>