<?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>NCS UART uart_poll_out with nordic,nrf-uart faulty TX, but works nordic,nrf-uarte</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111776/ncs-uart-uart_poll_out-with-nordic-nrf-uart-faulty-tx-but-works-nordic-nrf-uarte</link><description>Hi folks, 
 The blocking transmit function uart_poll_out() works as expected with UARTE, but not with UART. 
 For our project low power is critical. Thats why I need to use UART (~300 uA) instead of UARTE (~1300 uA). Baud is very low, so DMA does not</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 19 Jun 2024 10:54:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111776/ncs-uart-uart_poll_out-with-nordic-nrf-uart-faulty-tx-but-works-nordic-nrf-uarte" /><item><title>RE: NCS UART uart_poll_out with nordic,nrf-uart faulty TX, but works nordic,nrf-uarte</title><link>https://devzone.nordicsemi.com/thread/489475?ContentTypeID=1</link><pubDate>Wed, 19 Jun 2024 10:54:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:750eb5e7-1d8b-4c4f-9668-19ab122b9559</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Leevi&lt;/p&gt;
&lt;p&gt;This seems to be an issue with the&amp;nbsp;end of transmissions in the uart_nrfx_uart driver. But there also seems to be an issue with using 2400 as the baud rate. By setting a delay of 1us&amp;nbsp;at the end of&amp;nbsp;&lt;strong&gt;uart_nrfx_poll_out&lt;/strong&gt;() in &lt;strong&gt;uart_nrfx_uart&lt;/strong&gt;.c let me print the test data correctly when using the UART at 115200 baud rate, but not at a 2400 baud rate.&lt;/p&gt;
&lt;p&gt;Still investigating, but a progress report at least.&lt;/p&gt;
&lt;p&gt;UART frame data with a 1us delay between TX events:&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/8103.pastedimage1718794458417v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT:&amp;nbsp;&lt;/strong&gt;Shortly after we realized what the issue was. In the&amp;nbsp;&lt;strong&gt;uart_nrfx_poll_out&lt;/strong&gt;() function the &lt;strong&gt;NRFX_WAIT_FOR&lt;/strong&gt;() check only attempts to check if the UART is ready for ~1ms, so for lower baud rates this is a bug that will propagate on all lower baud rates. I will report this internally and a proper fix will be added in the future. For now I think increasing the second parameter in the &lt;strong&gt;NRFX_WAIT_FOR&lt;/strong&gt;() function from 1000 to 10000 or just a much higher one should do the trick for lower baud rates as well, but this should be a variable depending on the set baud rate I believe.&lt;/p&gt;
&lt;p&gt;UART frame data where the only change made to your sample was setting the&amp;nbsp;&lt;strong&gt;NRFX_WAIT_FOR(event_txdrdy_check(), 10000, 1, res);&amp;nbsp;&lt;/strong&gt;on line 291 in uart_nrfx_uart.c:&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/8132.pastedimage1718796149830v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;A more &amp;quot;proper&amp;quot; fix would be replacing the &lt;strong&gt;NRFX_WAIT_FOR()&amp;nbsp;&lt;/strong&gt;function with the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint8_t ms_per_txbyte = DIV_ROUND_UP((NUM_BITS_PER_TRANSACTION * 1000), BAUDRATE) ;
  NRFX_WAIT_FOR(event_txdrdy_check(), ms_per_txbyte * 1000, 1, res);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS UART uart_poll_out with nordic,nrf-uart faulty TX, but works nordic,nrf-uarte</title><link>https://devzone.nordicsemi.com/thread/489306?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2024 12:34:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72196ff3-9695-4963-ae5b-d89303eb9e7f</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Yes, I can indeed reproduce it on my end, just wanted to let you know. I will still need some time to take a proper look at your project to see what exactly is happening, but it seems like it&amp;#39;s always the 8th bit (stop bit) that is warped on the UART, so something is off there. Note that I used a logic analyzer instead of a scope, but it&amp;#39;s still easy to see that it is warped and that it only happens when UART is used instead of UARTE.&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/pastedimage1718713305743v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll give you another update by end of week. Hopefully we&amp;#39;ll be able to find something soon.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS UART uart_poll_out with nordic,nrf-uart faulty TX, but works nordic,nrf-uarte</title><link>https://devzone.nordicsemi.com/thread/489083?ContentTypeID=1</link><pubDate>Mon, 17 Jun 2024 11:37:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a58caa45-a947-49db-9601-1cc4cd39ecee</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I will reproduce and test this on my end today and/or tomorrow and get back to you by end of tomorrow with what I find. Thank you for your patience!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS UART uart_poll_out with nordic,nrf-uart faulty TX, but works nordic,nrf-uarte</title><link>https://devzone.nordicsemi.com/thread/488528?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2024 14:04:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:800cac65-56e4-4d83-b7bb-eee75f024f9b</guid><dc:creator>lev</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Here is the entire project folder (build folder deleted). I added CMake Preset for quick build configuration for PCA10040 DK (i have 3.0.0 2023.22).&lt;br /&gt;&lt;br /&gt;Build and flash it. Connect oscilloscope on pin P0.22. The partial&amp;nbsp;TX (as seen on image of my original&amp;nbsp;post) runs every 2 seconds.&lt;/p&gt;
&lt;p&gt;Then modify &amp;quot;&lt;span&gt;nordic,nrf-uart&lt;/span&gt;&amp;quot; in brd_test.overlay to &amp;quot;&lt;span&gt;nordic,nrf-uarte&amp;quot; and TX works as expected.&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/echo_5F00_bot_5F00_2.zip"&gt;devzone.nordicsemi.com/.../echo_5F00_bot_5F00_2.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS UART uart_poll_out with nordic,nrf-uart faulty TX, but works nordic,nrf-uarte</title><link>https://devzone.nordicsemi.com/thread/487534?ContentTypeID=1</link><pubDate>Wed, 05 Jun 2024 13:36:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccdae2b6-56dc-4906-a508-36ebe71f815d</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;We tested the echo UART sample with an nRF52832 DK on our end with your overlay and config files and both UART and UARTE works perfectly fine on our end, so please provide some more information to how we can reproduce this on our end.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS UART uart_poll_out with nordic,nrf-uart faulty TX, but works nordic,nrf-uarte</title><link>https://devzone.nordicsemi.com/thread/487499?ContentTypeID=1</link><pubDate>Wed, 05 Jun 2024 11:52:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a35e6cb-85d4-4c94-9a1f-29fa1b79510e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Okay, if it&amp;#39;s reproducible on the DK, we&amp;#39;d very much like to reproduce it on our end. Can you provide either a project or .hex file where it&amp;#39;s easy to reproduce on a DK?&lt;/p&gt;
&lt;p&gt;Also, discussing this with a colleague, we realized that the stop bit after the first transmission on the UART trace seems to not be a digital signal, but rather a component or the pin going off since the fall on the last byte has this weird curve, so we&amp;#39;re expecting that this is either an issue with how the GPIO is handled or with the component the UART is connected to. It&amp;#39;s also worth noting that this is the 8th byte (stop byte) after the first transmission and it seems like the transmission is basically ending abruptly. So, is the data before this also jumbled, or does it start out by sending correct data?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS UART uart_poll_out with nordic,nrf-uart faulty TX, but works nordic,nrf-uarte</title><link>https://devzone.nordicsemi.com/thread/487314?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2024 12:20:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2861b72c-2be4-4677-b302-3a72a6f088f7</guid><dc:creator>lev</dc:creator><description>&lt;p&gt;Thanks for looking into it!&lt;br /&gt;&lt;br /&gt;Quick answers:&lt;br /&gt;1. Latest SDK 2.6.1&lt;br /&gt;2. Will try to analyse&lt;br /&gt;3. No error messages in console log.&lt;br /&gt;4. Its reproducible on nRF52DK.&lt;br /&gt;5. Which config &amp;nbsp;flag do you mean?&lt;span&gt;&amp;nbsp;&lt;/span&gt;UARTE_NRF_HW_ASYNC?&amp;nbsp;&lt;span&gt;I dont have hardware flow pins. Could it help to enable it without actually using them?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS UART uart_poll_out with nordic,nrf-uart faulty TX, but works nordic,nrf-uarte</title><link>https://devzone.nordicsemi.com/thread/487309?ContentTypeID=1</link><pubDate>Tue, 04 Jun 2024 12:12:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b32c8141-40f6-41b3-927b-25abc2e55cf6</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have any specific suggestions as to why this must be, so I&amp;#39;m mostly starting out by asking a few clarifying questions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;What version of the nRF Connect SDK are you using?&lt;/li&gt;
&lt;li&gt;Does the data you write seem to just be random, or are the data skewed/offset by something specific when using the regular UART?&lt;/li&gt;
&lt;li&gt;Are you seeing any sort of error messages when debugging this on your end or does the application seemingly work as expected except the UART data being jumbled?&lt;/li&gt;
&lt;li&gt;Is this reproducible on an nRF52832 DK or just on a custom board?&lt;/li&gt;
&lt;li&gt;Have you tried enabling HWFC in the UART overlay to see if that makes any change?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>