<?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>UARTE FLUSHRX&amp;amp;RXFIFO</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26348/uarte-flushrx-rxfifo</link><description>Thanks for reading my question. 
 I use SDK14 , PCA10040, S132 and modified a little bit of uarte driver, but that should not affect what I said below. 
 I set the DMA buffer to 10 bytes, did not use the double buffer, and then sent to the UARTE 3 bytes</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Oct 2017 02:58:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26348/uarte-flushrx-rxfifo" /><item><title>RE: UARTE FLUSHRX&amp;RXFIFO</title><link>https://devzone.nordicsemi.com/thread/103689?ContentTypeID=1</link><pubDate>Mon, 30 Oct 2017 02:58:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f64cd8d8-fa86-444d-8bd3-df1b20177522</guid><dc:creator>Stayhungry</dc:creator><description>&lt;p&gt;Thanks,Sigurd.&lt;/p&gt;
&lt;p&gt;I have seen this information, but I have some problems.&lt;/p&gt;
&lt;p&gt;1, if the RX FIFO does not have data, which means no overflow,and I use TASK_FLUSHRX, then in the next EVENTS_ENDRX interrupt read .AMOUT get what? I found that it was the last EVENTS_ENDRX value, not 0. This is a normal situation, or is my operation wrong?&lt;/p&gt;
&lt;p&gt;2, I use the hardware flow control, according to S132_SD_v5.0 82 pages, PostProcessing typical 90us, assuming that at this time I use 1M baud rate uarte to receive data (a byte about 10us), due to uarte interrupt by Softdevice timing- critical preemption, then there will be 2 bytes into the RX FIFO (6byte RX FIFO Size - 4byte RTS deactivated), ble_uart_app there are ways to deal with these two bytes?Because in ble_app_uart, I did not find the function associated with TASK_FLUSHRX.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE FLUSHRX&amp;RXFIFO</title><link>https://devzone.nordicsemi.com/thread/103688?ContentTypeID=1</link><pubDate>Sun, 29 Oct 2017 10:04:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f4a5edf-caf4-46e7-b94f-376e0a9be262</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You should get a &lt;code&gt;EVENTS_ENDRX&lt;/code&gt; event when it has filled up the RX buffer. For every byte received, you should get a &lt;code&gt;EVENTS_RXDRDY&lt;/code&gt; event.
After you trigger the &lt;code&gt;TASKS_FLUSHRX&lt;/code&gt; task, you should get a &lt;code&gt;EVENTS_ENDRX&lt;/code&gt; event.&lt;/p&gt;
&lt;p&gt;To make sure that this data does not overwrite data in the RX buffer, the RX buffer should be emptied or the &lt;code&gt;RXD.PTR&lt;/code&gt; should be updated before the &lt;code&gt;TASKS_FLUSHRX&lt;/code&gt; task is triggered.&lt;/p&gt;
&lt;p&gt;Note that when you are using the UARTE, the  &lt;code&gt;.PTR&lt;/code&gt; and &lt;code&gt;.MAXCNT&lt;/code&gt; registers are double-buffered.&lt;/p&gt;
&lt;p&gt;See this infocenter page for more information: &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uarte.html?cp=2_1_0_34_3#concept_uzb_p2m_wr"&gt;infocenter.nordicsemi.com/.../uarte.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>