<?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>one uart is cli console, another uart connect peripheral device.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40758/one-uart-is-cli-console-another-uart-connect-peripheral-device</link><description>Hi Sir 
 I start development form uart cli example (uart0), now nrf52840 module will connect an uart peripheral device by uart1, so two uarts would be used. 
 My goal is to initial uart1 by uart0 cli command, Is it possible ? Could you give me a example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Nov 2018 12:39:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40758/one-uart-is-cli-console-another-uart-connect-peripheral-device" /><item><title>RE: one uart is cli console, another uart connect peripheral device.</title><link>https://devzone.nordicsemi.com/thread/158630?ContentTypeID=1</link><pubDate>Thu, 22 Nov 2018 12:39:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f633630-818d-400f-b0d4-2b3d753da5a2</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, this is possible. You need to create a CLI command, as shown in the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/lib_cli.html?cp=4_0_0_3_10_1_0#lib_cli_commands_sub_creation"&gt;CLI library documentation&lt;/a&gt;, and then initialize the UART interface in the function called on reception of the CLI command.&lt;/p&gt;
&lt;p&gt;I would recommend using the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/lib_serial.html?cp=4_0_0_3_41"&gt;nrf_serial library&lt;/a&gt; for the second UART instance. You can find an &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/serial_example.html?cp=4_0_0_4_5_35"&gt;example&lt;/a&gt; of how to use this library in the SDK. There is no specific examples doing exactly what you want, you need to combine code from multiple examples yourself.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>