<?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>Cannot Receive data using UARTE with nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60298/cannot-receive-data-using-uarte-with-nrf52832</link><description>Hi everyone, 
 
 I&amp;#39;m now using nRF52832 to communicate with a device using UARTE. 
 In my application, i need to constantly send a control packet to the device, to keep it responsive to the control (~15ms between each data). 
 I don&amp;#39;t want my application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Apr 2020 08:06:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60298/cannot-receive-data-using-uarte-with-nrf52832" /><item><title>RE: Cannot Receive data using UARTE with nRF52832</title><link>https://devzone.nordicsemi.com/thread/245751?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2020 08:06:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55a37200-c3d6-4989-940e-d7c7ea3d9c83</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Sounds great Jonathan.&amp;nbsp;I would suggest to use a Logic analyzer when debugging UART (or other digital signals) it can analyze the protocol and most likely can catch the BREAK signal.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot Receive data using UARTE with nRF52832</title><link>https://devzone.nordicsemi.com/thread/245610?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 14:49:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d68a7f5-bce2-46ff-8d77-2f2b41d37676</guid><dc:creator>sycra.jonathan</dc:creator><description>&lt;p&gt;Finally i found that the device would return with a BREAK before the data.&lt;/p&gt;
&lt;p&gt;I was focusing on the data part and overlook the BREAK in the waveform.&lt;/p&gt;
&lt;p&gt;After i handled the BREAK, the UARTE RX driver works perfectly!&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot Receive data using UARTE with nRF52832</title><link>https://devzone.nordicsemi.com/thread/245584?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 13:58:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4757087e-7c28-4785-b9ca-0d9d90146970</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;The libuarte wouldn&amp;#39;t solve the issue if it&amp;#39;s at lower level (as I mentioned, it&amp;#39;s more on the higher level where you can have a time out and can check how many bytes received).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I would suggest you to test&amp;nbsp;with the simple uart example in&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/uart_example.html?cp=7_1_4_6_50"&gt;\examples\peripheral\uart &lt;/a&gt;to check if it work. You can also test using the loop back option the provided in the code.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot Receive data using UARTE with nRF52832</title><link>https://devzone.nordicsemi.com/thread/245402?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 02:43:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:021a02ed-08f9-4b17-9751-e8909023c951</guid><dc:creator>sycra.jonathan</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;/p&gt;
&lt;p&gt;Thanks for your reply. I have defined a 64 bytes RX buffer, and the payload i need to receive is max. 30 bytes.&lt;/p&gt;
&lt;p&gt;The device only replies upon request from nRF52, so it is unlikely that the buffer will overflow.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My problem is UARTE cannot receive data or have framing error with a valid UART waveform.&lt;/p&gt;
&lt;p&gt;How does libuarte help to solve the problem? Is there any bug fix or improvement compared to the old nrfx_uarte library?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I did compare the libuarte &amp;amp; nrfx_uarte library.&lt;/p&gt;
&lt;p&gt;I found that in libuarte, it will initialize the events in the following sequence:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_uarte_event_clear(p_libuarte-&amp;gt;uarte, NRF_UARTE_EVENT_ENDRX);
nrf_uarte_event_clear(p_libuarte-&amp;gt;uarte, NRF_UARTE_EVENT_RXSTARTED);
nrf_uarte_task_trigger(p_libuarte-&amp;gt;uarte, NRF_UARTE_TASK_STARTRX);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In nrfx_uarte library, it initializes the events in this way:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_uarte_event_clear(p_instance-&amp;gt;p_reg, NRF_UARTE_EVENT_ENDRX);
nrf_uarte_event_clear(p_instance-&amp;gt;p_reg, NRF_UARTE_EVENT_RXTO);
nrf_uarte_task_trigger(p_instance-&amp;gt;p_reg, NRF_UARTE_TASK_STARTRX);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is it the reason why i cannot receive data with UARTE?&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot Receive data using UARTE with nRF52832</title><link>https://devzone.nordicsemi.com/thread/245244?ContentTypeID=1</link><pubDate>Fri, 17 Apr 2020 13:10:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15a9e97c-134e-4a8e-8fff-31f12ce5d12c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jonathan,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How big is the size of the rx buffer ? (rx_len) ?&amp;nbsp;&lt;br /&gt;Please be aware that even though there is variable&amp;nbsp;&lt;span&gt;rxtx.bytes, it&amp;#39;s not possible to count the number of byte received. You only receive the number of bytes in your rx buffer (rx_len) when all bytes are received (event&amp;nbsp;NRFX_UARTE_EVT_RX_DONE). This is due to the limitation of the UARTE hardware that there is no register keeping track of number of bytes currently arrived.&amp;nbsp;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;To solve this issue we have made a new and more advanced UART library. This library allow you to query the number of bytes received and also have a timeout if not all the bytes are arrived. Please have a look &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_libuarte.html?cp=7_1_3_27"&gt;here&lt;/a&gt;.&lt;br /&gt;The example for it is at&amp;nbsp;\examples\peripheral\libuarte&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>