<?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>Bug in nRF UARTE driver, async Rx buffer handling</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123888/bug-in-nrf-uarte-driver-async-rx-buffer-handling</link><description>Hello! 
 I am stress-testing the nRF54L15 devkit by sending it random-sized chunks of data over UART at 921600 baud, which the devkit code receives using the asynchronous API in Zephyr 4.0.99. 
 The test always fails after some time, the symptom is that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Jul 2026 16:04:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123888/bug-in-nrf-uarte-driver-async-rx-buffer-handling" /><item><title>RE: Bug in nRF UARTE driver, async Rx buffer handling</title><link>https://devzone.nordicsemi.com/thread/569256?ContentTypeID=1</link><pubDate>Mon, 20 Jul 2026 16:04:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c94a1a00-7015-4786-a811-2d70a0f1ae2f</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thanks for sharing the fix of this bus fault issue.&lt;/p&gt;
&lt;p&gt;I will report and let relevant team to know about this.&lt;/p&gt;
&lt;p&gt;By the way, the github link does not show any information.&lt;/p&gt;
&lt;p&gt;BR&lt;br /&gt;Kazi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in nRF UARTE driver, async Rx buffer handling</title><link>https://devzone.nordicsemi.com/thread/569196?ContentTypeID=1</link><pubDate>Fri, 17 Jul 2026 11:28:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fedd8968-efdd-4a33-9841-d49f3cac12f5</guid><dc:creator>BrotherBear</dc:creator><description>&lt;p&gt;I found an issue with the same root cause (NULL &lt;code&gt;async_rx-&amp;gt;buf&lt;/code&gt;), but a more severe manifestation &amp;mdash; and still present in NCS v3.3.0 / Zephyr 4.3.99.&lt;/p&gt;
&lt;p&gt;We hit what looks like the same underlying defect described in this thread &amp;mdash; &lt;code&gt;async_rx-&amp;gt;buf&lt;/code&gt; becoming NULL while the RX machinery still runs &amp;mdash; but on the &lt;strong&gt;count-bytes-with-timer (cbwt)&lt;/strong&gt; path and with a worse outcome. Instead of &lt;code&gt;uart_rx_buf_rsp()&lt;/code&gt; returning &lt;code&gt;-EACCES&lt;/code&gt;, the driver &lt;strong&gt;dereferences the NULL buffer and takes a precise bus fault&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Environment&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;nRF54L15, NCS v3.3.0 (Zephyr 4.3.99)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;CONFIG_UART_ASYNC_API=y&lt;/code&gt;, cbwt path active (&lt;code&gt;CONFIG_UARTE_NRFX_UARTE_COUNT_BYTES_WITH_TIMER&lt;/code&gt; &amp;mdash; DT node has a &lt;code&gt;timer&lt;/code&gt; property + frame-timeout support)&lt;/li&gt;
&lt;li&gt;9600 8N1, no hardware flow control; the attached device begins streaming bytes at power-up&lt;/li&gt;
&lt;li&gt;Low-power RX off; RX enabled once and left running; two ping-pong buffers handed back via &lt;code&gt;uart_rx_buf_rsp()&lt;/code&gt; from &lt;code&gt;UART_RX_BUF_REQUEST&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Trigger&lt;/strong&gt; (different from the high-baud / short-timeout case in this thread): we hit it when &lt;code&gt;uart_rx_enable()&lt;/code&gt; is called on a line that is &lt;strong&gt;already receiving bytes&lt;/strong&gt; (a peripheral that streams immediately at power-up). It is intermittent &amp;mdash; only a minority of resets. Delaying RX-enable until the line is idle hides it, consistent with the NULL-buffer window being entered when the first buffer completes almost immediately at enable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fault (captured against the exact flashed ELF)&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;***** BUS FAULT *****
  Precise data bus error
  BFAR Address: 0x2
r0/a1:  0x00000002   ...   r14/lr: 0x00011403
EXC_RETURN: 0xfffffff1        (fault taken in handler / ISR mode)
Faulting instruction address (r15/pc): 0x00024b56
FATAL: reason 25 (K_ERR_ARM_BUS_PRECISE_DATA_BUS)&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;addr2line&lt;/code&gt; against the flashed ELF:&lt;/p&gt;
&lt;pre&gt;$ arm-zephyr-eabi-addr2line -f -i -e zephyr.elf 0x24b56 0x11402
memcpy
??:?
fill_usr_buf
zephyr/drivers/serial/uart_nrfx_uarte.c:1113&lt;/pre&gt;
&lt;p&gt;So the PC is the &lt;code&gt;memcpy&lt;/code&gt; byte-copy store, called from &lt;code&gt;fill_usr_buf()&lt;/code&gt;, and the &lt;code&gt;memcpy&lt;/code&gt; destination register is &lt;code&gt;0x2&lt;/code&gt;, i.e. &lt;code&gt;&amp;amp;async_rx-&amp;gt;buf[usr_wr_off]&lt;/code&gt; with &lt;code&gt;async_rx-&amp;gt;buf == NULL&lt;/code&gt; and &lt;code&gt;usr_wr_off == 2&lt;/code&gt; (hence &lt;code&gt;BFAR = 0x2&lt;/code&gt;). The fault is taken in ISR context (&lt;code&gt;EXC_RETURN 0x...f1&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Root cause (cbwt path)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;fill_usr_buf()&lt;/code&gt; copies into the user buffer with no NULL check:&lt;/p&gt;
&lt;pre&gt;/* uart_nrfx_uarte.c:1106 */
memcpy(&amp;amp;async_rx-&amp;gt;buf[cbwt_data-&amp;gt;usr_wr_off], &amp;amp;buf[cbwt_data-&amp;gt;bounce_off], cpy_len);&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;async_rx-&amp;gt;buf&lt;/code&gt; can be NULL here for exactly the reason described in this thread &amp;mdash; &lt;code&gt;notify_rx_rdy()&lt;/code&gt; shifts &lt;code&gt;async_rx-&amp;gt;buf = async_rx-&amp;gt;next_buf&lt;/code&gt; (&lt;code&gt;uart_nrfx_uarte.c:1010&lt;/code&gt;), which is NULL if no next buffer was supplied in time. The drain paths that reach &lt;code&gt;update_usr_buf()&lt;/code&gt; &amp;rarr; &lt;code&gt;fill_usr_buf()&lt;/code&gt; (the timer byte-count ISR and the RX timeout) do &lt;strong&gt;not&lt;/strong&gt; guard against a NULL &lt;code&gt;async_rx-&amp;gt;buf&lt;/code&gt;; only &lt;code&gt;cbwt_rxto_isr()&lt;/code&gt; does (&lt;code&gt;if (async_rx-&amp;gt;buf)&lt;/code&gt;, &lt;code&gt;uart_nrfx_uarte.c:1441&lt;/code&gt; and &lt;code&gt;:1445&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;In other words, the &lt;code&gt;-EACCES&lt;/code&gt; from &lt;code&gt;uart_rx_buf_rsp()&lt;/code&gt; reported here and this bus fault look like two faces of the same NULL-buffer window: the &lt;code&gt;buf_rsp&lt;/code&gt; path returns an error, but the cbwt drain path dereferences the NULL instead.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Suggested fix&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Mirror the guard &lt;code&gt;cbwt_rxto_isr()&lt;/code&gt; already has: bail out of &lt;code&gt;update_usr_buf()&lt;/code&gt; / &lt;code&gt;fill_usr_buf()&lt;/code&gt; (skip the &lt;code&gt;memcpy&lt;/code&gt; and the buffer-full handling) when &lt;code&gt;async_rx-&amp;gt;buf == NULL&lt;/code&gt;, so a drain event that lands in the &amp;quot;buffer released, next not yet supplied&amp;quot; window is a no-op instead of a NULL dereference.&lt;/p&gt;
&lt;p&gt;Happy to share the full ESF dump and a minimal reproducer. I&amp;#39;ve also opened a Zephyr GitHub issue for the driver fix:&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/113812."&gt;github.com/.../113812.&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in nRF UARTE driver, async Rx buffer handling</title><link>https://devzone.nordicsemi.com/thread/567054?ContentTypeID=1</link><pubDate>Thu, 28 May 2026 13:12:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdd53390-856d-47ba-83d9-9180b1134988</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;it is fixed here&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/commit/7979d37f42b23e50cf0999fbf714414ab3c54317"&gt;https://github.com/nrfconnect/sdk-zephyr/commit/7979d37f42b23e50cf0999fbf714414ab3c54317&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in nRF UARTE driver, async Rx buffer handling</title><link>https://devzone.nordicsemi.com/thread/566901?ContentTypeID=1</link><pubDate>Tue, 26 May 2026 19:54:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:885234bb-cc34-4e0c-b0d7-f68272d01d1f</guid><dc:creator>sread</dc:creator><description>&lt;p&gt;Hello, any update on this issue?&lt;/p&gt;
&lt;p&gt;We had been working around a similar issue by enabling HW byte counting Kconfigs but were not able to use this with sdk-nrf version v3.2.4.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in nRF UARTE driver, async Rx buffer handling</title><link>https://devzone.nordicsemi.com/thread/553641?ContentTypeID=1</link><pubDate>Fri, 07 Nov 2025 09:09:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:350617cd-d07a-442c-a977-481ccb53eb12</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;we are working on this bug. I will let you know if there is an update.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in nRF UARTE driver, async Rx buffer handling</title><link>https://devzone.nordicsemi.com/thread/553056?ContentTypeID=1</link><pubDate>Fri, 31 Oct 2025 15:46:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6387feca-b2bd-47f2-98ed-f03077292348</guid><dc:creator>Tom Weber</dc:creator><description>&lt;p&gt;Same here. I increased the timeout to 200 us (about 20 bytes) as a workaround.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in nRF UARTE driver, async Rx buffer handling</title><link>https://devzone.nordicsemi.com/thread/552996?ContentTypeID=1</link><pubDate>Fri, 31 Oct 2025 11:30:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3fd40c9-79da-4445-9fd0-7068aed1fe9d</guid><dc:creator>ahmed-dl</dc:creator><description>&lt;p&gt;Hi, is there any work towards fixing this bug? We are using high baudrate of 1M without flow control and low timeouts of 100us and see this problem. When increasing the timeout to 1ms we don&amp;#39;t see this problem anymore.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in nRF UARTE driver, async Rx buffer handling</title><link>https://devzone.nordicsemi.com/thread/552986?ContentTypeID=1</link><pubDate>Fri, 31 Oct 2025 10:42:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed93132e-9673-4446-a92d-86bb3e13689d</guid><dc:creator>ahmed-dl</dc:creator><description>&lt;p&gt;&lt;br /&gt;&lt;span&gt;I&amp;#39;m currently experiencing the same bug when using no HW flow control. I also saw that the problem goes away when using higher timeouts.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Did you find a better workaround or solution for this problem?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in nRF UARTE driver, async Rx buffer handling</title><link>https://devzone.nordicsemi.com/thread/549675?ContentTypeID=1</link><pubDate>Wed, 24 Sep 2025 12:24:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ea2994a-5c4a-4abb-8702-ebd88f0eb157</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It looks like a bug in the driver; the driver intentionally handle the ENDRX first before UART_RX_BUF_REQUEST (RXSTARTED event) for other reasons. In case of short buffer that event order may happen and that is unexpected. I think you have used high baud rate?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in nRF UARTE driver, async Rx buffer handling</title><link>https://devzone.nordicsemi.com/thread/548727?ContentTypeID=1</link><pubDate>Mon, 15 Sep 2025 11:02:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a82efb69-7c6e-42cc-9b95-bb82c9a19af3</guid><dc:creator>Tom Weber</dc:creator><description>&lt;p&gt;What baud rate and Rx timeout are you using?&lt;/p&gt;
&lt;p&gt;My workaround for now is to use a longer timeout, it means the bug will not get triggered.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in nRF UARTE driver, async Rx buffer handling</title><link>https://devzone.nordicsemi.com/thread/548659?ContentTypeID=1</link><pubDate>Sat, 13 Sep 2025 22:59:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9894e257-c194-413b-bff5-d2e5ba34cbfa</guid><dc:creator>helpfulchicken</dc:creator><description>&lt;p&gt;I had a similar issue (I think, I may be wrong in my understanding of your issue) where using the asynchronous UART driver I would get missed and corrupted bytes received.&lt;/p&gt;
&lt;p&gt;I stumbled on a solution to my issue in some sample code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;While using async UART API:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_UART_ASYNC_API=y
CONFIG_UART_INTERRUPT_DRIVEN=n&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I would see corrupted and missed Rx bytes intermittently.&lt;/p&gt;
&lt;p&gt;I found that the issue went away if I added the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_UART_0_ASYNC=y
CONFIG_UART_0_INTERRUPT_DRIVEN=n
CONFIG_UART_0_NRF_HW_ASYNC=y
CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2
CONFIG_NRFX_TIMER2=y

CONFIG_UART_1_ASYNC=y
CONFIG_UART_1_INTERRUPT_DRIVEN=n
CONFIG_UART_1_NRF_HW_ASYNC=y
CONFIG_UART_1_NRF_HW_ASYNC_TIMER=3
CONFIG_NRFX_TIMER3=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In my use case, I am using both uart0 and uart1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in nRF UARTE driver, async Rx buffer handling</title><link>https://devzone.nordicsemi.com/thread/546650?ContentTypeID=1</link><pubDate>Mon, 25 Aug 2025 14:11:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b17a5d3-19b6-4d36-b6c4-88d879a6b667</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;The UARTE peripheral on&amp;nbsp;Dks is known to have limitations in signaling partial buffer fills. I am not aware if we have some woraround for nRF54L15.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;I have asked team. I will come back to you later.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Thanks.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;BR&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Kazi&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>