<?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>UART transmission seems to be working weirdly</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79811/uart-transmission-seems-to-be-working-weirdly</link><description>I created a simple driver call for UART transmission and when I debug the program and put breakpoints at every transmission, it seems to work fine (I see the characters sent being printed to the serial console) but when I run the program without any breakpoints</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 25 Sep 2021 04:42:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79811/uart-transmission-seems-to-be-working-weirdly" /><item><title>RE: UART transmission seems to be working weirdly</title><link>https://devzone.nordicsemi.com/thread/331165?ContentTypeID=1</link><pubDate>Sat, 25 Sep 2021 04:42:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87151d63-d640-4baa-911c-8c42179751c8</guid><dc:creator>morpho</dc:creator><description>&lt;p&gt;Well, the issue certainly was with the flags.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;- First issue: `while (txdRdyEvnt); `isn&amp;#39;t taking into account the updated value.&lt;/p&gt;
&lt;p&gt;- Second: the following flow and disabling TxdRdy interrupt flag did the trick!&lt;/p&gt;
&lt;pre class="lang-c s-code-block"&gt;&lt;code class="hljs language-c"&gt;&lt;span class="hljs-type"&gt;void&lt;/span&gt; &lt;span class="hljs-title function_"&gt;Uart::TxBlocking&lt;/span&gt;&lt;span class="hljs-params"&gt;(&lt;span class="hljs-type"&gt;uint8_t&lt;/span&gt; *buffer, &lt;span class="hljs-type"&gt;size_t&lt;/span&gt; bytesToSend)&lt;/span&gt;
{
    &lt;span class="hljs-keyword"&gt;for&lt;/span&gt; (&lt;span class="hljs-type"&gt;uint8_t&lt;/span&gt; idx = &lt;span class="hljs-number"&gt;0&lt;/span&gt;; idx &amp;lt; bytesToSend; idx++)
    {   
        setNrfEvent(NRF_UART_EVENT_TXDRDY, &lt;span class="hljs-number"&gt;0&lt;/span&gt;);
        TxByte(buffer[idx]);
        &lt;span class="hljs-keyword"&gt;while&lt;/span&gt; (getNrfEventStatus(NRF_UART_EVENT_TXDRDY) == &lt;span class="hljs-number"&gt;0&lt;/span&gt;);
    }
}&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART transmission seems to be working weirdly</title><link>https://devzone.nordicsemi.com/thread/330959?ContentTypeID=1</link><pubDate>Fri, 24 Sep 2021 05:47:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18bf044d-0894-4fde-bf81-02d3523ac754</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;What pins are you using for UART transmissions? Is there a way to reproduce this on an nRF52 DK or do you only see it on a custom board?&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: UART transmission seems to be working weirdly</title><link>https://devzone.nordicsemi.com/thread/330731?ContentTypeID=1</link><pubDate>Wed, 22 Sep 2021 23:44:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b540381b-4925-4647-8b73-e1fc7b4b462a</guid><dc:creator>morpho</dc:creator><description>&lt;p&gt;it literally just prints &amp;quot;&lt;strong&gt;?&lt;/strong&gt;&amp;quot;. I am running at 115200. I am trying to narrow down the potential cause(s) here...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART transmission seems to be working weirdly</title><link>https://devzone.nordicsemi.com/thread/330613?ContentTypeID=1</link><pubDate>Wed, 22 Sep 2021 10:11:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ff0149a5-c2f2-43dc-b5fe-6527e677971d</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Not that I can see, no. Are the characters that are printed actual question marks &amp;quot;&lt;strong&gt;?&lt;/strong&gt;&amp;quot; or just jibberish (broken characters and such)? What baud rate are you trying to print on exactly? It could be that the device isn&amp;#39;t able to print correctly when running &amp;quot;full speed&amp;quot;&amp;nbsp; at too high of a baud rate for instance and is only able to print one character successfully at a time (which is why the breakpoints succeed).&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: UART transmission seems to be working weirdly</title><link>https://devzone.nordicsemi.com/thread/330370?ContentTypeID=1</link><pubDate>Tue, 21 Sep 2021 04:47:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77a5d4e6-65ea-46c0-ad31-66dc01dff61c</guid><dc:creator>morpho</dc:creator><description>&lt;p&gt;Again, if baud rates were different, I probably wouldn&amp;#39;t have&amp;nbsp;seen the expected output with the breakpoints set. Same reasoning with ASCII conversion. Do you see any issues with the way I&amp;#39;m using the flags?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART transmission seems to be working weirdly</title><link>https://devzone.nordicsemi.com/thread/330285?ContentTypeID=1</link><pubDate>Mon, 20 Sep 2021 12:47:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:978b5267-de91-4499-8541-381a3d581c81</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The first thing that comes to mind is that you might be using different baud rates in the application and terminal which would cause jibberish data. Alternatively, are there some problems with the ASCII conversion perhaps.&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></channel></rss>