<?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>How to print UART message in &amp;quot;ble_app_uart&amp;quot; project in SDK15.2</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44952/how-to-print-uart-message-in-ble_app_uart-project-in-sdk15-2</link><description>Hi, 
 Does &amp;quot;ble_app_uart&amp;quot; project can print debug message from &amp;quot;UART&amp;quot; interface? How can I do this job? 
 PS. My UART Port is at P0.18 (TX) and P0.19(RX). 
 
 Thank you, 
 Chianglin</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Mar 2019 09:46:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44952/how-to-print-uart-message-in-ble_app_uart-project-in-sdk15-2" /><item><title>RE: How to print UART message in "ble_app_uart" project in SDK15.2</title><link>https://devzone.nordicsemi.com/thread/177781?ContentTypeID=1</link><pubDate>Fri, 22 Mar 2019 09:46:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f08c3afb-c9c7-41d8-88cd-658d3066c39c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Chianglin,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;There&amp;#39;s only one UART instance on the 52832. The Jlink chip acts as a UART&amp;lt;-&amp;gt;USB bridge when you use P.0.06 and P.0.08&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to print UART message in "ble_app_uart" project in SDK15.2</title><link>https://devzone.nordicsemi.com/thread/177772?ContentTypeID=1</link><pubDate>Fri, 22 Mar 2019 09:32:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa4780b3-8f1c-4240-8158-9056eb630606</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;span&gt;Vidar,,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As well know, EVM have a &amp;quot;JLINK CDC UART&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I use EVM to test &amp;quot;&lt;strong&gt;ble_app_uart&amp;quot;&amp;nbsp;&lt;/strong&gt;project and I execute following setting:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;    app_uart_comm_params_t const comm_params =
    {
        .rx_pin_no    = RX_PIN_NUMBER,
        .tx_pin_no    = TX_PIN_NUMBER\,
        .rts_pin_no   = RTS_PIN_NUMBER,
        .cts_pin_no   = CTS_PIN_NUMBER,
        .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
        .use_parity   = false,
#if defined (UART_PRESENT)
        .baud_rate    = NRF_UART_BAUDRATE_115200
#else
        .baud_rate    = NRF_UARTE_BAUDRATE_115200
#endif
    };
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When I use &amp;quot;printf&amp;quot; function to out a debug message via UART interface, both &amp;quot;CDC UART&amp;quot; and &amp;quot;UART which use P0.06 for TXD and P0.08 for RXD&amp;quot; will get the same debug message.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can I print different debug message to these two UART port?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For example, print &amp;quot;ABC&amp;quot; to CDC UART, and print &amp;quot;123&amp;quot; to the other UART port.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Chianglin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to print UART message in "ble_app_uart" project in SDK15.2</title><link>https://devzone.nordicsemi.com/thread/177313?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2019 12:04:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0da3ffbf-366a-4484-86ef-aaa332e9caf1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Glad to hear that it works now, thanks for the update.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to print UART message in "ble_app_uart" project in SDK15.2</title><link>https://devzone.nordicsemi.com/thread/177302?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2019 11:38:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c6e94c6-4898-4a15-b4a3-e3e77847a099</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Vidar,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It&amp;#39;s work now.&amp;nbsp; It should have something wrong in my previous process step.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Thank you for your serious support.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Chianglin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to print UART message in "ble_app_uart" project in SDK15.2</title><link>https://devzone.nordicsemi.com/thread/177298?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2019 11:26:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2934095f-7672-4d65-9105-c62b14539998</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Vidar,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I think P0.18 and P0.19 don&amp;#39;t have problem to define as UART, because this 2 pins can work correct when I use &amp;quot;peripheral\uart&amp;quot; project.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The &amp;quot;nRF UART APP&amp;quot; can not find the BLE device which describe In my previous mail. May be the device had been crash, so BLE can not work.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The only change between &amp;ldquo;BLE can work or not&amp;quot; is &amp;quot;I modify the tx_pin_no and rx_pin_no in structure &amp;quot;comm_params&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Would you please tell me why my device is crash after I do these change?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Chianglin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to print UART message in "ble_app_uart" project in SDK15.2</title><link>https://devzone.nordicsemi.com/thread/177294?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2019 11:10:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43946e56-a990-40c4-adff-cc026a5968ea</guid><dc:creator>Vidar Berg</dc:creator><description>[quote userid="34970" url="~/f/nordic-q-a/44952/how-to-print-uart-message-in-ble_app_uart-project-in-sdk15-2/177288"]Can I modify TXD to P0.18 and RXD to P0.19 for UART output?[/quote]
&lt;p&gt;It shouldn&amp;#39;t be a problem, but make sure that the RXD pin isn&amp;#39;t left floating as that may cause framing errors, etc due to noise.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to print UART message in "ble_app_uart" project in SDK15.2</title><link>https://devzone.nordicsemi.com/thread/177288?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2019 10:39:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a2be540-15f9-4d0b-8014-7e1b65300a8f</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Vidar,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can I modify TXD to P0.18 and RXD to P0.19 for UART output?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can I modify following code to do this purpose?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void uart_init(void)
{
    uint32_t                     err_code;
    app_uart_comm_params_t const comm_params =
    {
        .rx_pin_no    = 19	/*RX_PIN_NUMBER*/,
        .tx_pin_no    = 18	/*TX_PIN_NUMBER*/,
        .rts_pin_no   = RTS_PIN_NUMBER,
        .cts_pin_no   = CTS_PIN_NUMBER,
        .flow_control = APP_UART_FLOW_CONTROL_DISABLED,
        .use_parity   = false,
#if defined (UART_PRESENT)
        .baud_rate    = NRF_UART_BAUDRATE_115200
#else
        .baud_rate    = NRF_UARTE_BAUDRATE_115200
#endif
    };

    APP_UART_FIFO_INIT(&amp;amp;comm_params,
                       UART_RX_BUF_SIZE,
                       UART_TX_BUF_SIZE,
                       uart_event_handle,
                       APP_IRQ_PRIORITY_LOWEST,
                       err_code);
    APP_ERROR_CHECK(err_code);
}
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In original source code, the TXD, RXD is define at P0.06, P0.08.&amp;nbsp; The UART can print message and I can find BLE device on &amp;quot;RF UART APP&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But when I modify to P0.18 and P0.19, the &amp;quot;nRF UART APP&amp;rdquo; can not find this BLE device.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do I also need to do something?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Chianglin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to print UART message in "ble_app_uart" project in SDK15.2</title><link>https://devzone.nordicsemi.com/thread/177259?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2019 09:20:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9bb1bad-5e9c-4eb4-be0a-db67de25b421</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi &lt;span&gt;Chianglin,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You can change the pin numbers in&amp;nbsp;uart_init(), but the UART pins will not be routed to the JLink chip then.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to print UART message in "ble_app_uart" project in SDK15.2</title><link>https://devzone.nordicsemi.com/thread/177249?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2019 08:51:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef7b6560-e358-4a19-a7e5-ca3fb11612bf</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Vidar,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am using the EVM board like following image.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/IMG_5F00_20190320_5F00_153926.jpg" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes, it can print debug message via &amp;quot;JLink CDC UART Port&amp;quot; to PC.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I want to print debug message to other UART pin (for example: P0.06 for TXD and P0.08 for RXD), how to modify the source code to do this job?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Chianglin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to print UART message in "ble_app_uart" project in SDK15.2</title><link>https://devzone.nordicsemi.com/thread/177215?ContentTypeID=1</link><pubDate>Wed, 20 Mar 2019 06:55:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:433e7c57-d605-4b6c-a381-1887fca33c21</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Chianglin,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is this the Nordic devkit (nRF52 DK - PCA10040)? In that case, you shouldn&amp;#39;t need to modify anything, UART data will be written to the JLINK CDC UART port (virtual com port) on your PC. You just need a serial client and select the correct COM port and baudrate (default 115200)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to print UART message in "ble_app_uart" project in SDK15.2</title><link>https://devzone.nordicsemi.com/thread/177120?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2019 15:07:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1d7bf5c-76f4-436b-a99a-de1b154d34d1</guid><dc:creator>chianglin</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Vidar,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I had try to use printf() to write data to UART, and the UART interface is connect to PC, but I can not find any data&amp;nbsp; in PC console.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My environment is:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1. Use Nordic&amp;#39;s nRF52832 EVM board.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. Use &amp;quot;ble_app_uart&amp;quot; project of SDK15.2, and I doesn&amp;#39;t modify any thing.&amp;nbsp; Actually, there have &amp;quot;printf()&amp;quot; function in main.c.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But I still can not found any message from PC via UART interface.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How can I fix this problem?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Chianglin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to print UART message in "ble_app_uart" project in SDK15.2</title><link>https://devzone.nordicsemi.com/thread/177092?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2019 14:37:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8251c11f-16fd-4787-90c9-2455ef47ccb3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The ble_app_uart project prints debug messages over Segger RTT by default.&amp;nbsp; But you can use printf() if you wish to write data to the UART.&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>