<?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>Multiple serial &amp;quot;ports&amp;quot; on nRF51822, e.g., using app_uart module from SDK with UIDs?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2604/multiple-serial-ports-on-nrf51822-e-g-using-app_uart-module-from-sdk-with-uids</link><description>Folks,
I&amp;#39;d like to use the single UART peripheral in the nRF51822 in interleaved fashion to support two serial &amp;quot;ports&amp;quot;, e.g., sets of GPIO pins dedicated to separate serial channels. 
 Is the version of the app_uart module in SDK 4.4.2 (because I have</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Nov 2014 20:02:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2604/multiple-serial-ports-on-nrf51822-e-g-using-app_uart-module-from-sdk-with-uids" /><item><title>RE: Multiple serial "ports" on nRF51822, e.g., using app_uart module from SDK with UIDs?</title><link>https://devzone.nordicsemi.com/thread/10309?ContentTypeID=1</link><pubDate>Fri, 07 Nov 2014 20:02:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1edb1c1-c67e-4112-9b7b-cefd0b77ae65</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;The C0 still works with SDK6, SDK5 too.  You are not stuck with 4.  I don&amp;#39;t recall app_uart issuing UID.  Do you mean UID for BLE ? You don&amp;#39;t need to reinit each time.  You just need to switch pin map for the UART, provide 2 both use the same baudrate.  But that is only good for transmit, you may have issue on receive.  Unless you use hardware handshaking.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Multiple serial "ports" on nRF51822, e.g., using app_uart module from SDK with UIDs?</title><link>https://devzone.nordicsemi.com/thread/10308?ContentTypeID=1</link><pubDate>Fri, 07 Nov 2014 19:49:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7433532-6c35-4630-b0e5-a408ad694387</guid><dc:creator>David Robins</dc:creator><description>&lt;p&gt;Yes, you need to bracket usage of each port with &lt;code&gt;app_uart_init&lt;/code&gt; and &lt;code&gt;app_uart_close&lt;/code&gt;, and you should reuse the UID you got back from the first &lt;code&gt;app_uart_init&lt;/code&gt; when re-initializing a peripheral.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been doing something similar; note, however, I&amp;#39;ve found that &lt;code&gt;app_uart_close&lt;/code&gt; does not do a proper shutdown; it disables the UART before receive/transmit are finished, resulting in lost data if transmit or receive are happening at the time of shutdown (you&amp;#39;ll be fine if you pre-arrange with the other device to shut down first). I&amp;#39;ll be making a post on the issue I found and a fix (search on &lt;code&gt;app_uart_close&lt;/code&gt;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>