<?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 example does not work.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39470/uart-example-does-not-work</link><description>Hello. 
 What do I need to run this example called uart? 
 As far as I understand this should be simple echo program meaning what comes in goes out but I can not see anything on terminal. I tried to enable NRF_LOG_ENABLED with CMSIS but after that I got</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Oct 2018 10:26:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39470/uart-example-does-not-work" /><item><title>RE: UART example does not work.</title><link>https://devzone.nordicsemi.com/thread/153187?ContentTypeID=1</link><pubDate>Wed, 17 Oct 2018 10:26:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:652a9f8d-dd98-4447-9db5-9434b503c1fa</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;If you only connected &lt;strong&gt;RX &lt;/strong&gt;and &lt;strong&gt;TX &lt;/strong&gt;pins, this will not work, because the flowcontrol is enabled in the application.&lt;/p&gt;
&lt;p&gt;If you want to use this setup with flowcontrol you also have to connect the &lt;strong&gt;CTS&lt;/strong&gt; and &lt;strong&gt;RTS &lt;/strong&gt;pins (CTS = pin 7, and RTS = pin 5). You can also disable the flowcontrol by editing the &lt;strong&gt;#define HWFC&lt;/strong&gt; found in the file &lt;strong&gt;pca10040.h&lt;/strong&gt;. The same place you configurate the pins.&lt;/p&gt;
&lt;p&gt;Like this (edit line 93 to &lt;strong&gt;false&lt;/strong&gt;):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define RX_PIN_NUMBER  8
#define TX_PIN_NUMBER  6
#define CTS_PIN_NUMBER 7
#define RTS_PIN_NUMBER 5
#define HWFC           false //THIS MUST BE FALSE TO DISABLE FLOWCONTROL&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;- Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example does not work.</title><link>https://devzone.nordicsemi.com/thread/153138?ContentTypeID=1</link><pubDate>Wed, 17 Oct 2018 07:45:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:743425d5-c5a8-4857-aa47-9fc80ecc2a46</guid><dc:creator>twar</dc:creator><description>&lt;p&gt;Hello.&lt;/p&gt;
&lt;p&gt;I will do that later but meantime I connected this board with some stm32 discovery board like this picture shows&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="https://cdn.sparkfun.com/assets/2/5/c/4/5/50e1ce8bce395fb62b000000.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;as described here&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/pdf/nRF52_DK_User_Guide_v1.2.pdf"&gt;http://infocenter.nordicsemi.com/pdf/nRF52_DK_User_Guide_v1.2.pdf&lt;/a&gt;&amp;nbsp;pins 06 and 08 and it seems there&amp;#39;s no communication. When nrf52 is connected with pc via usb cable I can send and receive data without any problems. Do I need&amp;nbsp; short some pins or something similar? Usb cable is disconnected during uart connection and board is powered with battery if this change something.&lt;/p&gt;
&lt;p&gt;Do you know where can be a problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example does not work.</title><link>https://devzone.nordicsemi.com/thread/152974?ContentTypeID=1</link><pubDate>Tue, 16 Oct 2018 07:49:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d5711b7-2bf3-4aab-a7e1-0d3416e3ae89</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;It should work as intended with these configurations. I suggest you start from scratch with an &lt;strong&gt;unmodified&lt;/strong&gt; version of this example.&lt;/p&gt;
&lt;p&gt;Download and unzip the &lt;strong&gt;nRF5_SDK_15.0.0_a53641a\examples\peripheral\uart&lt;/strong&gt; example, compile it &lt;strong&gt;without&lt;/strong&gt; doing any modfications and &lt;strong&gt;without&lt;/strong&gt; any debug&lt;strong&gt;&lt;/strong&gt;ging, and use the configurations I suggested for Tera Term, and see if this works.&lt;/p&gt;
&lt;p&gt;If this doesn&amp;#39;t work, could you please attach this project in a &lt;strong&gt;.zip &lt;/strong&gt;file so I can have a look at it?&lt;/p&gt;
&lt;p&gt;- Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example does not work.</title><link>https://devzone.nordicsemi.com/thread/152961?ContentTypeID=1</link><pubDate>Tue, 16 Oct 2018 06:58:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e7bc461-dedb-40a1-a318-6a2aee8e898c</guid><dc:creator>twar</dc:creator><description>&lt;p&gt;Yeah, just checked those options and nothing has changed, I even change program logic to this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;while (true)
{
uint8_t cr=&amp;#39;t&amp;#39;;
while (app_uart_put(cr) != NRF_SUCCESS);
nrf_delay_ms(100);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;so it sends lower case letter t every 100ms but I can not see anything on my terminal unless I start debugging.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/uart2.png" /&gt;&lt;/p&gt;
&lt;p&gt;when I flash the board in &amp;quot;normal&amp;quot; way nothing shows up on terminal.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yet another edit:&lt;/p&gt;
&lt;p&gt;It turned out that there is something wrong with terminal configuration on my pc, on other computer it works fine.&lt;/p&gt;
&lt;p&gt;Thank you for help and best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example does not work.</title><link>https://devzone.nordicsemi.com/thread/152958?ContentTypeID=1</link><pubDate>Tue, 16 Oct 2018 06:49:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9432058-4a4b-4209-9afd-4e22be3f8ee3</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Have you check for &amp;quot;Local echo&amp;quot;, &amp;quot;Receive: AUTO&amp;quot;, and &amp;quot;Transmit: LF&amp;quot; under &lt;strong&gt;Setup --&amp;gt; Terminal...&lt;/strong&gt;, like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-cc3794eb18484149b8ca664340acdfd6/pastedimage1539672447676v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;When you type either &amp;quot;q&amp;quot; or &amp;quot;Q&amp;quot; the program terminates into a while-loop, as shown at the bottom of the main-loop in the code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        uint8_t cr;
        while (app_uart_get(&amp;amp;cr) != NRF_SUCCESS);
        while (app_uart_put(cr) != NRF_SUCCESS);

        if (cr == &amp;#39;q&amp;#39; || cr == &amp;#39;Q&amp;#39;)
        {
            printf(&amp;quot; \r\nExit!\r\n&amp;quot;);

            while (true)
            {
                // Do nothing.
            }
        }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here you can see I typed &amp;quot;q&amp;quot;:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-cc3794eb18484149b8ca664340acdfd6/pastedimage1539672348486v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;- Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example does not work.</title><link>https://devzone.nordicsemi.com/thread/152956?ContentTypeID=1</link><pubDate>Tue, 16 Oct 2018 06:16:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:632a5b3b-23d4-4d54-a522-f76c293cdca6</guid><dc:creator>twar</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/7610.uart.png" /&gt;&lt;/p&gt;
&lt;p&gt;Above are my settings and I can type as long as I want but there&amp;#39;s no any output.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Yet another observation from my side, when I start debugging it works it echo every character I type until q or Q but in &amp;quot;normal&amp;nbsp; mode&amp;quot; (without debugging) I can not see anything.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example does not work.</title><link>https://devzone.nordicsemi.com/thread/152953?ContentTypeID=1</link><pubDate>Tue, 16 Oct 2018 05:52:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1c201f9-de7c-46e5-8400-78258b1618a3</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;It should work, I suspect you might have wrong configurations in TeraTerm.&lt;/p&gt;
&lt;p&gt;These are the configurations I used in &lt;strong&gt;Termite 3.4:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-cc3794eb18484149b8ca664340acdfd6/pastedimage1539669022213v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;As you can see, it gave me a echo output:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-cc3794eb18484149b8ca664340acdfd6/pastedimage1539669065937v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;- Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example does not work.</title><link>https://devzone.nordicsemi.com/thread/152934?ContentTypeID=1</link><pubDate>Mon, 15 Oct 2018 18:46:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a62249ee-2cca-435f-ae9f-b3276e63b4a3</guid><dc:creator>twar</dc:creator><description>&lt;p&gt;OK, I&amp;#39;ve disabled&amp;nbsp;that login&amp;nbsp;module and it compiled but it does not seems to work.&lt;/p&gt;
&lt;p&gt;I compiled it and flash and reset the board. Then run &lt;a href="https://ttssh2.osdn.jp/"&gt;https://ttssh2.osdn.jp/&lt;/a&gt; set connection to j-link and baud to 115200.&lt;br /&gt;Then type some random characters (except q or Q) in tera term window but there is no echo but it should be. Am I right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART example does not work.</title><link>https://devzone.nordicsemi.com/thread/152875?ContentTypeID=1</link><pubDate>Mon, 15 Oct 2018 12:23:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b811304-93bc-4b4d-949d-ff947e8e7e6f</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NRF_LOG_ENABLED &lt;/strong&gt;is a macro used for the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Flib_nrf_log.html&amp;amp;cp=4_0_1_3_26"&gt;logger module&lt;/a&gt;, not the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fgroup__app__uart.html&amp;amp;cp=4_0_1_6_11_57"&gt;UART module,&lt;/a&gt; which this example uses.&lt;/p&gt;
&lt;p&gt;If you disable &lt;strong&gt;NRF_LOG_ENABLED&lt;/strong&gt; and build the example it should compile and work as intended.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;- Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>