<?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>Libuarte - RX fullbuffer event</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86723/libuarte---rx-fullbuffer-event</link><description>Hi, How can I detect or using a flag to indicatate that RX buffer was full ? I follow this thread of Edvin thread 
 But i got this problem Thank you !</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Apr 2022 13:46:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86723/libuarte---rx-fullbuffer-event" /><item><title>RE: Libuarte - RX fullbuffer event</title><link>https://devzone.nordicsemi.com/thread/362377?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 13:46:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdd71b92-11d0-4851-9c6f-2f3fe5220dfa</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I am glad to hear that the problem is solved.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Libuarte - RX fullbuffer event</title><link>https://devzone.nordicsemi.com/thread/362270?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 09:36:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3b261ae-d159-4b82-9da6-2325d8662a06</guid><dc:creator>John12</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;My problem was solved&lt;/p&gt;
&lt;p&gt;&lt;span class="Y2IQFc" lang="en"&gt;There is some difference from Edvin thread I follow&lt;br /&gt;&lt;br /&gt;in main.c&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
if (p_evt-&amp;gt;data.rxtx.src == 0)
{
NRF_LOG_INFO(&amp;quot;triggered by full buffer&amp;quot;);
} else if (p_evt-&amp;gt;data.rxtx.src == 1)
{
NRF_LOG_INFO(&amp;quot;Triggered by timeout&amp;quot;);
}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
typedef struct
{
uint8_t * p_data; ///&amp;lt; Pointer to memory used for transfer.
size_t length; ///&amp;lt; Number of bytes transfered.
uint8_t src;
} nrf_libuarte_async_data_t;



&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="Y2IQFc" lang="en"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;case NRF_LIBUARTE_DRV_EVT_RX_DATA:
{

uint32_t rx_amount = p_evt-&amp;gt;data.rxtx.length - p_libuarte-&amp;gt;p_ctrl_blk-&amp;gt;sub_rx_count;
if (rx_amount)
{
p_libuarte-&amp;gt;p_ctrl_blk-&amp;gt;rx_count += rx_amount;
nrf_libuarte_async_evt_t evt = {
.type = NRF_LIBUARTE_ASYNC_EVT_RX_DATA,
.data = {
.rxtx = {
.p_data = &amp;amp;p_evt-&amp;gt;data.rxtx.p_data[p_libuarte-&amp;gt;p_ctrl_blk-&amp;gt;sub_rx_count],
.length = rx_amount,
.src = 0,
}
}
};

void nrf_libuarte_async_timeout_handler(const nrf_libuarte_async_t * p_libuarte)
{
NRFX_IRQ_DISABLE((IRQn_Type)NRFX_IRQ_NUMBER_GET(p_libuarte-&amp;gt;p_libuarte-&amp;gt;uarte));

uint32_t capt_rx_count = p_libuarte-&amp;gt;p_libuarte-&amp;gt;timer.p_reg-&amp;gt;CC[3];

if (capt_rx_count &amp;gt; p_libuarte-&amp;gt;p_ctrl_blk-&amp;gt;rx_count)
{
uint32_t rx_amount = capt_rx_count - p_libuarte-&amp;gt;p_ctrl_blk-&amp;gt;rx_count;
nrf_libuarte_async_evt_t evt = {
.type = NRF_LIBUARTE_ASYNC_EVT_RX_DATA,
.data = {
.rxtx = {
.p_data = &amp;amp;p_libuarte-&amp;gt;p_ctrl_blk-&amp;gt;p_curr_rx_buf[p_libuarte-&amp;gt;p_ctrl_blk-&amp;gt;sub_rx_count],
.length = rx_amount,
.src = 1,
}
}
};&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="left:-61px;position:absolute;top:73.804px;" id="gtx-trans"&gt;
&lt;div class="gtx-trans-icon"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>