<?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>nrf52832 Serial UART input example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52699/nrf52832-serial-uart-input-example</link><description>Hello. I use nrf52832 on Adafruit Feather board among with nrf5 SDK. As a default I can log any info via NRF_LOG_DEBUG to my serial monitor. But how can I use Serial input to send some data to app via same serial UART? Are there any example in SDK to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 01 Oct 2019 03:49:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52699/nrf52832-serial-uart-input-example" /><item><title>RE: nrf52832 Serial UART input example</title><link>https://devzone.nordicsemi.com/thread/212697?ContentTypeID=1</link><pubDate>Tue, 01 Oct 2019 03:49:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b589ebbd-a92d-4bc1-8088-8fb65812ee4a</guid><dc:creator>tBStar</dc:creator><description>&lt;p&gt;I am not familiar with ESB examples but I suspect it will be trial and error. Try to add the app_uart header file to your project. Initialize the UART module and add your event handler. You&amp;#39;ll have to play with it it as I believe it&amp;#39;s possible since ESB and UART operate independently.&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 Serial UART input example</title><link>https://devzone.nordicsemi.com/thread/212574?ContentTypeID=1</link><pubDate>Mon, 30 Sep 2019 12:07:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bce3845a-6194-4179-bfbf-078103013e3c</guid><dc:creator>Ivan</dc:creator><description>&lt;p&gt;Output debug works no problem.&lt;br /&gt;&lt;br /&gt;I only mean some terminal input parse (i need to input some commands via serial and get responce to them in main application of my ESB example).&lt;br /&gt;like &amp;quot;app_uart_read&amp;quot; but to get access to it from ESB examples, cause app. can&amp;#39;t find UART low level&amp;nbsp;functions to read byte(couple of bytes).&lt;br /&gt;&lt;br /&gt;I think I need reimplement this handler in my app, right?&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint8_t dataArray[MSG_LEN] = {0};

void uart_event_handle(app_uart_evt_t * p_event)
{
    static uint8_t index = 0;

    switch (p_event-&amp;gt;evt_type)
    {
        case APP_UART_DATA_READY:
            app_uart_get(&amp;amp;dataArray[index]);
            index++;
            
            if (index == MSG_LEN) {
                index = 0;
                
                //data ready
            }
            
            break;

        default:
            break;
    }
}

//do smth with @dataArray&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And what I need to include to get this work?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 Serial UART input example</title><link>https://devzone.nordicsemi.com/thread/212401?ContentTypeID=1</link><pubDate>Sun, 29 Sep 2019 03:06:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:deaf54eb-3fb0-4d74-a962-ee0d86c9f512</guid><dc:creator>tBStar</dc:creator><description>&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;I am using printf() without any issues. Assuming you enabled all of the UART related macros in sdk_config file: (UART instances,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;UART peripheral&amp;nbsp;driver,&amp;nbsp;EasyDMA, UART Config Log, UART RX/TX Pins, etc...).&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;If you&amp;#39;re having problem understanding, your best course of action is to open existing UART examples and play with them until you get it.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Now to answer your question, you&amp;#39;ll probably have to enable&amp;nbsp;&lt;/span&gt;&lt;span&gt;RETARGET_ENABLED. If you go this route and you are successful in sending data through, then you might want to add this to&lt;/span&gt;o you Makefile file to enable printing floats:&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;#&amp;nbsp;Linker&amp;nbsp;flags&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;LDFLAGS&lt;/span&gt;&lt;span&gt;&amp;nbsp;+=&amp;nbsp;&lt;/span&gt;&lt;span&gt;$(&lt;/span&gt;&lt;span&gt;OPT&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;LDFLAGS&lt;/span&gt;&lt;span&gt;&amp;nbsp;+=&amp;nbsp;-u&amp;nbsp;_printf_float&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Hope this helps,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Cheers&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>