<?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>Zephyr Output of USB UART Serial Leaks Into Input Buffer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/128198/zephyr-output-of-usb-uart-serial-leaks-into-input-buffer</link><description>I wrote a simple terminal that reads the keyboard input from USB UART device and echos it back to the same device. It works as follows: 1. It registers an interrupt handler (uart_isr) 2. The handler reads input data and writes it to a buffer 3. Main loop</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 May 2026 08:44:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/128198/zephyr-output-of-usb-uart-serial-leaks-into-input-buffer" /><item><title>RE: Zephyr Output of USB UART Serial Leaks Into Input Buffer</title><link>https://devzone.nordicsemi.com/thread/566751?ContentTypeID=1</link><pubDate>Fri, 22 May 2026 08:44:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24e32633-29b2-443c-b825-7ec31acfc6ec</guid><dc:creator>Michal W</dc:creator><description>&lt;p&gt;I don&amp;#39;t understand how the TX queue leaks into the RX queue as well. I played around with this code and commenting out the changes made in 23a helped with my case. The crucial part was not running the else branch when TX is disabled. The commit broke that.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The change 23a doesn&amp;#39;t even make sense. Why would you even start transmiting when TX is disabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Output of USB UART Serial Leaks Into Input Buffer</title><link>https://devzone.nordicsemi.com/thread/566736?ContentTypeID=1</link><pubDate>Fri, 22 May 2026 06:21:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:933f5970-0859-449c-9434-f53c982042d3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I have already tried to reproduce what you are observing using the same build target and Zephyr version (checked out at commit hash bcf31c20f0) without success. If you are unable to flash .hex files, please let me know which format you prefer instead. I also had a look at the commit you mentioned and I struggle to see how it could be related to the issue you mentioned. I don&amp;#39;t see how this change could result in getchar() returning characters from the boot string.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Output of USB UART Serial Leaks Into Input Buffer</title><link>https://devzone.nordicsemi.com/thread/566724?ContentTypeID=1</link><pubDate>Thu, 21 May 2026 22:18:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:063563be-e55d-453f-b10c-fd9f6ed44d17</guid><dc:creator>Michal W</dc:creator><description>&lt;p&gt;I bisected even further. The following commit introduces the bug:&lt;br /&gt;&lt;br /&gt;commit 23a92a6ec889aa817599a56186fb381b0d1a1fa5&lt;br /&gt;Author: Alexandre Boeglin &amp;lt;alexandre.boeglin@qorvo.com&amp;gt;&lt;br /&gt;Date:&amp;nbsp; &amp;nbsp;Fri Oct 17 16:25:51 2025 +0200&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; usb: device_next: cdc_acm: Trigger TX on configuration enable&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; When CDC ACM instance gets enabled and there is some data in TX FIFO,&lt;br /&gt;&amp;nbsp; &amp;nbsp; the TX FIFO work will not be triggered if no UART API is used. And if TX&lt;br /&gt;&amp;nbsp; &amp;nbsp; FIFO was full before CDC ACM instance get enabled, TX work will never be&lt;br /&gt;&amp;nbsp; &amp;nbsp; triggered. To fix it TX FIFO should always be drained when CDC ACM gets&lt;br /&gt;&amp;nbsp; &amp;nbsp; enabled.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; Signed-off-by: Alexandre Boeglin &amp;lt;alexandre.boeglin@qorvo.com&amp;gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Output of USB UART Serial Leaks Into Input Buffer</title><link>https://devzone.nordicsemi.com/thread/566722?ContentTypeID=1</link><pubDate>Thu, 21 May 2026 20:43:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eee35755-829a-4b8e-861a-fbe9585a7b30</guid><dc:creator>Michal W</dc:creator><description>&lt;p&gt;I bisected the zephyr versions v4.3.0 is not affected while v4.4.0 is affected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Output of USB UART Serial Leaks Into Input Buffer</title><link>https://devzone.nordicsemi.com/thread/566715?ContentTypeID=1</link><pubDate>Thu, 21 May 2026 16:28:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b9ff31c-015b-4017-94d4-641eea0538e2</guid><dc:creator>Michal W</dc:creator><description>&lt;p&gt;Is it possible to upload your hex file to my device?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Output of USB UART Serial Leaks Into Input Buffer</title><link>https://devzone.nordicsemi.com/thread/566712?ContentTypeID=1</link><pubDate>Thu, 21 May 2026 15:43:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e8e5e44-af01-4c49-9105-61738444780a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I thought I remembered reading you using the &lt;span&gt;echo_bot sample, so that is why I chose that. This sample is a part of the zephyr repo and you can find it under the following path:&amp;nbsp;&lt;/span&gt;&lt;span&gt;zephyr/samples/drivers/uart/.&amp;nbsp;&lt;/span&gt;&lt;span&gt;Anyway, here is the r&lt;/span&gt;esult with&amp;nbsp;the getchar sample:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1779377982595v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Hex file:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7635.zephyr.hex"&gt;devzone.nordicsemi.com/.../7635.zephyr.hex&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Output of USB UART Serial Leaks Into Input Buffer</title><link>https://devzone.nordicsemi.com/thread/566697?ContentTypeID=1</link><pubDate>Thu, 21 May 2026 13:34:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb98df39-623f-4d70-9eee-62f7151247c5</guid><dc:creator>Michal W</dc:creator><description>&lt;p&gt;There is no the echo_bot example in zephyr samples. Can you try&amp;nbsp;&lt;span&gt;console/getchar which is a part of Zephyr repository?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Output of USB UART Serial Leaks Into Input Buffer</title><link>https://devzone.nordicsemi.com/thread/566668?ContentTypeID=1</link><pubDate>Thu, 21 May 2026 10:24:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1375271a-458b-4764-99da-f5d21f0ee1f7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for confirming. Unfortunately, I am afraid I don&amp;#39;t have an explanation for what you are observing. I tested on a nRF52840 DK while using the XIAO BLE board as the build target (Note: this board uses the USB instead of UART)&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/4456.pastedimage1779359036585v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Hex file from my build:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6675.zephyr.hex"&gt;devzone.nordicsemi.com/.../6675.zephyr.hex&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Output of USB UART Serial Leaks Into Input Buffer</title><link>https://devzone.nordicsemi.com/thread/566662?ContentTypeID=1</link><pubDate>Thu, 21 May 2026 09:32:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6418906-8bdd-4908-8c8f-b8e7d0c43d1d</guid><dc:creator>Michal W</dc:creator><description>&lt;p&gt;I created zephyr workspace from the latest&amp;nbsp;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;bcf31c20f0 commit of&amp;nbsp;github.com/zephyrproject-rtos/zephyr following&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/develop/getting_started/index.html"&gt;getting started guide&lt;/a&gt;.I tried also a version from a few weeks ago and it was also affected. But some version from the last year was not affected. Unfortunately, I don&amp;#39;t know which as I lost it when I updated the Zephyr workspace.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;I&amp;#39;m using XIAO BLE for development. I didn&amp;#39;t introduce any hardware modification.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:monospace;"&gt;&lt;span style="background-color:#ffffff;color:#000000;"&gt;Edit: inserted correct link&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Output of USB UART Serial Leaks Into Input Buffer</title><link>https://devzone.nordicsemi.com/thread/566656?ContentTypeID=1</link><pubDate>Thu, 21 May 2026 08:57:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fb9d4b6-9e1b-459d-9b91-4ef3b6ee829c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Could you please let me know which SDK version, what HW you are using, and also just to be sure, please confirm that you have not connected TX with RX for loopback testing? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Output of USB UART Serial Leaks Into Input Buffer</title><link>https://devzone.nordicsemi.com/thread/566652?ContentTypeID=1</link><pubDate>Thu, 21 May 2026 08:29:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9df2750f-2982-41d5-b820-9264d94fd41e</guid><dc:creator>Michal W</dc:creator><description>&lt;p&gt;The Zephyr console exhibits the same bug as well as other samples from the console subsystem e.g.&amp;nbsp;&lt;span&gt;on NRF52840 the console/getchar sample produces the following output without any key press:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;char: [0x2a] *
char: [0x20]
char: [0x42] B
char: [0x6f] o
char: [0x6f] o
char: [0x74] t
char: [0x69] i
char: [0x6e] n
char: [0x67] g
char: [0x20]
char: [0x5a] Z
char: [0x65] e
char: [0x70] p
char: [0x68] h&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr Output of USB UART Serial Leaks Into Input Buffer</title><link>https://devzone.nordicsemi.com/thread/566637?ContentTypeID=1</link><pubDate>Thu, 21 May 2026 05:55:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c91cf0b3-d95e-42bc-81c9-df702c795734</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;The&amp;nbsp;zephyr_console should already have an internal UART interrupt handler IMHO.&lt;/p&gt;
&lt;p&gt;If you wanted to handle user input, I recommend using the SHELL subsystem in zephyr. This way you don&amp;#39;t require UART stuff in your code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>