<?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>nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9604/nrf52-uarte-receive-timeout</link><description>Hi, 
 I have a question regarding the nrf52 UARTE driver. I have the basics setup and working, I can send and receive data using the UARTE.
What I need to do now, is find a way to receive incoming data BEFORE the rx buffer is full (if incoming data</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 03 Aug 2016 12:42:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9604/nrf52-uarte-receive-timeout" /><item><title>RE: nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/thread/35494?ContentTypeID=1</link><pubDate>Wed, 03 Aug 2016 12:42:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b5f9951-c166-4a16-af86-dac69ff9b256</guid><dc:creator>NewtoM</dc:creator><description>&lt;p&gt;I can confirm that Ole&amp;#39;s recommendation works. :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/thread/35493?ContentTypeID=1</link><pubDate>Tue, 26 Jul 2016 19:12:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb4ad0fd-971d-4bff-bad7-527d12b39cfc</guid><dc:creator>Sheikh_Khaled_Dubai</dc:creator><description>&lt;p&gt;yes it would be awesome to implement that soon in the SDK driver !!!!
we are planning to work in the future projects more with Nordic&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/thread/35492?ContentTypeID=1</link><pubDate>Thu, 21 Jul 2016 13:37:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b166bb2-93ee-4bd2-beb9-14c2a5c4d8e4</guid><dc:creator>NewtoM</dc:creator><description>&lt;p&gt;OK, it seems I got the first part (counter reset on RX) done. However, I used RTC0 (at 32768 Hz) instead of a timer. At this rate I get a tick at every ~31 μs, plus there is a &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/rtc.html?cp=2_2_0_24_7#concept_s4s_fg4_sr"&gt;delay for clearing the counter up to 46 μs based on the documentation&lt;/a&gt;. That adds up to a time in which about 7 characters could have been received at 1Mbps. So if during this period of time no more characters were received it seems reasonable to me to call nrf_drv_uart_rx_abort(), fetch the data of length nrf_uarte_rx_amount_get() from the buffer upon the NRF_DRV_UART_EVT_RX_DONE event, and call nrf_drv_uart_rx(..) to re-engage RX. Is that right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/thread/35491?ContentTypeID=1</link><pubDate>Thu, 21 Jul 2016 10:35:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e1360f9-132e-4d9c-a9f5-f01886e228dc</guid><dc:creator>NewtoM</dc:creator><description>&lt;p&gt;Thanks! This is what I was looking for.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/thread/35490?ContentTypeID=1</link><pubDate>Thu, 21 Jul 2016 10:31:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3502119-8d3d-42ff-9ad4-319b17d99ec3</guid><dc:creator>hcr</dc:creator><description>&lt;p&gt;Newtom: There is a nrf_drv_uart_rx_abort command which does what you want, stops the reception and gives you the received bytes (in the same event as when the dma buffer is full)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v11.0.0%2Fgroup__nrf__drv__uart.html"&gt;infocenter.nordicsemi.com/index.jsp&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/thread/35485?ContentTypeID=1</link><pubDate>Thu, 21 Jul 2016 09:26:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9165c47-e19b-4b6e-a2e3-86d80284b7de</guid><dc:creator>hcr</dc:creator><description>&lt;p&gt;No, sorry not any time soon. But if I remember correctly there are examples from nordic for all the parts you need.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/thread/35484?ContentTypeID=1</link><pubDate>Thu, 21 Jul 2016 08:21:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:44144449-6de8-4563-86a8-556e5dd24d02</guid><dc:creator>NewtoM</dc:creator><description>&lt;p&gt;Hi hcr, will you have access to the code soon or I better shouldn&amp;#39;t wait for that? Thx!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/thread/35489?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2016 20:45:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:428e5502-3086-40eb-a057-5b432e97f9db</guid><dc:creator>hcr</dc:creator><description>&lt;p&gt;Thanks, adding this functionality to the SDK driver would be very useful!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/thread/35483?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2016 20:44:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:673b1529-598a-40ff-80e1-f0524b000407</guid><dc:creator>hcr</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I implemented a solution similar to what Ole proposes below. Unfortunately I don&amp;#39;t have the code available at this time so I cannot help you with the details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/thread/35488?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2016 19:18:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0af161b0-5f5a-4853-ba99-3b3dd0061579</guid><dc:creator>NewtoM</dc:creator><description>&lt;p&gt;Ole, I still would have two questions to your solution for the meantime. First, &lt;strong&gt;by flushing the DMA buffer you mean discarding the bytes in the non-full buffer or fetching them? If the latter, how to do that?&lt;/strong&gt; Second, can you please explain (or at least give a good pointer to the documentation on) how to connect the GPIOTE IN event to the UARTE RX pin to reset a timer? Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/thread/35487?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2016 08:52:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4d0f84e-fb8a-40a0-b72c-020306beaec5</guid><dc:creator>NewtoM</dc:creator><description>&lt;p&gt;That&amp;#39;s great news! I am looking forward to using that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/thread/35486?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2016 08:32:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55dfd988-5922-4c39-bf84-7758e607a45f</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Unfortunately, there is no way to do this only with the UARTE peripheral.&lt;/p&gt;
&lt;p&gt;A solution is to connect GPIOTE IN event to the UARTE RX pin and reset a timer when there is any activity on the pin. If the timer reaches a certain timeout, you know that there have been no data received for that time and you can flush the DMA buffer.&lt;/p&gt;
&lt;p&gt;We are working on implementing this in the SDK driver.&lt;/p&gt;
&lt;p&gt;Ole&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/thread/35482?ContentTypeID=1</link><pubDate>Mon, 18 Jul 2016 20:51:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dacbda44-0749-4cf5-94ca-8d6f27b4a63b</guid><dc:creator>NewtoM</dc:creator><description>&lt;p&gt;The issue &lt;a href="https://devzone.nordicsemi.com/users/10747/hcr/"&gt;hcr&lt;/a&gt; was interested in is exactly my issue now. &lt;strong&gt;Did you find any feasible solution?&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 uarte receive timeout</title><link>https://devzone.nordicsemi.com/thread/35481?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2015 15:18:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99780ac1-998c-4f5c-9d1d-0092945f9248</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;I couldn&amp;#39;t find any way to do this with only the UART peripheral (a pity). I guess one of the timers need to be used in conjunction with the UART peripheral.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>