<?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>Should I release RX buffer after NRF_LIBUARTE_ASYNC_EVT_ERROR</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102228/should-i-release-rx-buffer-after-nrf_libuarte_async_evt_error</link><description>So our nrf52840 UARTE2 is connected to a cellular modem. Occasionally, while waiting to receive a response, our uart_event_handler() gets a UARTE_ERRORSRC_FRAMING and UARTE_ERRORSRC_BREAK error via the p_evt-&amp;gt;type: NRF_LIBUARTE_ASYNC_EVT_ERROR. 
 My question</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Jul 2023 20:42:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102228/should-i-release-rx-buffer-after-nrf_libuarte_async_evt_error" /><item><title>RE: Should I release RX buffer after NRF_LIBUARTE_ASYNC_EVT_ERROR</title><link>https://devzone.nordicsemi.com/thread/438629?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2023 20:42:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb34a42d-cd17-4e5e-90b5-7b5c34cc2b99</guid><dc:creator>Dwight Fowler</dc:creator><description>&lt;p&gt;Much thanks, Jared. I really needed that answer. Your going to make my boss very happy. &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Should I release RX buffer after NRF_LIBUARTE_ASYNC_EVT_ERROR</title><link>https://devzone.nordicsemi.com/thread/438236?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2023 11:32:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1d3072f-18ee-44f1-8a97-f1f88a3dc162</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]&lt;strong&gt;My question is:&lt;/strong&gt; do I need to call nrf_libuarte_async_rx_free(p_libuarte, p_evt-&amp;gt;data.rxtx.p_data, p_evt-&amp;gt;data.rxtx.length); and free up the rx buffer in my NRF_LIBUARTE_ASYNC_EVT_ERROR error handling routine? Will this cause a memory leak if I don&amp;#39;t free up the rx buffer?[/quote]
&lt;p&gt;Yes it will, you should free up the buffer even in the case where the transaction fails so that the module can reuse the same rx buffer for the next transaction.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>