<?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>Async UART; FIFO buffer; buffer length de-synced</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115178/async-uart-fifo-buffer-buffer-length-de-synced</link><description>Hi folks, 
 I&amp;#39;m having some UART trouble - help would be much appreciated, and thank you in advance. 
 ------------------------ 
 Overview: 
 I&amp;#39;m working on a project that sends a few kilobytes of configuration data back and forth over BLE. To this end</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Jun 2025 10:10:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115178/async-uart-fifo-buffer-buffer-length-de-synced" /><item><title>RE: Async UART; FIFO buffer; buffer length de-synced</title><link>https://devzone.nordicsemi.com/thread/540691?ContentTypeID=1</link><pubDate>Fri, 27 Jun 2025 10:10:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39883092-5b92-4d1c-90f1-9745c72efff0</guid><dc:creator>Hictle</dc:creator><description>&lt;p&gt;I&amp;rsquo;ve encountered a similar issue before when using async UART with FIFO. In my case, it helped to double-check how many bytes were actually flushed vs. how many were pushed into the buffer. &lt;span style="color:#ffffff;"&gt;&lt;a style="color:#ffffff;" href="https://slice-masters.io"&gt;slice master&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;Sometimes uart_tx_done might return before all data is fully shifted out, depending on the implementation.&lt;/p&gt;
&lt;p&gt;Have you tried adding a mutex or flag around your tx_done callback to avoid race conditions?&lt;/p&gt;
&lt;p&gt;Also, what hardware/SDK version are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>