<?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 and TIMER conflicts happening while receiving data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64390/uart-and-timer-conflicts-happening-while-receiving-data</link><description>Hi Everyone We are using nrfx_uarte library to implement the uart functionality , Everything seems to work fine with the uart , but the problem comes when we want to have a timeout in the read function. To implement the timer we are using TIMER 2 instance</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 31 Jul 2020 13:26:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64390/uart-and-timer-conflicts-happening-while-receiving-data" /><item><title>RE: UART and TIMER conflicts happening while receiving data</title><link>https://devzone.nordicsemi.com/thread/262590?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 13:26:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89fc2375-531f-4901-ac65-749cb05fa655</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;I didn&amp;#39;t try that, but two libuarte_async instances should work as well (you&amp;#39;ll also need two additional timers, or timer+rtc for each instance)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART and TIMER conflicts happening while receiving data</title><link>https://devzone.nordicsemi.com/thread/262581?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 12:41:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abf0c5ec-4c2b-475a-9a19-0ab252646f8b</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;We need to use two UARTs at once , will that be possible with that?&lt;br /&gt;We also tried the nrf_Serial library and found that it is not well suited for our device&amp;nbsp; that we are working on&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART and TIMER conflicts happening while receiving data</title><link>https://devzone.nordicsemi.com/thread/262578?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 12:35:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80d19589-56c9-437b-a754-cb84960b2664</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;Yes , it does give me the same issues&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART and TIMER conflicts happening while receiving data</title><link>https://devzone.nordicsemi.com/thread/262568?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 12:04:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd95bfe2-df71-40fb-8917-69df45edd3d5</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;I see,&amp;nbsp;&lt;span&gt;nrfx_uarte_rx_abort() doesn&amp;#39;t clear buffer pointers. Also, you won&amp;#39;t get stable reception with current approach - as new data can appear at any time, restarted reception will sometimes cause loss of bitstream sync and garbaged data. In your case it&amp;#39;s better to use nrf_libuarte_async library from SDK, it can handle rx timeouts internally.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART and TIMER conflicts happening while receiving data</title><link>https://devzone.nordicsemi.com/thread/262559?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 11:45:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29fdb75a-e3fb-4678-840d-8a814eeb7ddc</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Did you try adding the abort function&amp;nbsp;nrfx_uarte_rx_abort() as Dmitry suggested at all? Does this still give you the same issues?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART and TIMER conflicts happening while receiving data</title><link>https://devzone.nordicsemi.com/thread/262537?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 09:48:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53b168bd-3afe-465b-8f74-f24323b19920</guid><dc:creator>Rajat</dc:creator><description>&lt;p&gt;Unfortunately , it doesn&amp;#39;t work for me&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART and TIMER conflicts happening while receiving data</title><link>https://devzone.nordicsemi.com/thread/262517?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 08:12:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:346f8351-f7fa-499e-9ecf-ac3fd49f31dc</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;when your timer is triggered, UART reception stays active. Try to add&amp;nbsp;nrfx_uarte_rx_abort()&amp;nbsp; before returning&amp;nbsp;UARTE_TIMEOUT.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>