<?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>Using two UART in nrf51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55781/using-two-uart-in-nrf51822</link><description>I want to use two UARTS ie uart0 and uart1. I read that nrf51822 gpio pins can be set as rx &amp;amp; tx but i couldnt find any example. 
 I am using SDK12.3 
 Please attach some links for same.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Dec 2019 13:12:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55781/using-two-uart-in-nrf51822" /><item><title>RE: Using two UART in nrf51822</title><link>https://devzone.nordicsemi.com/thread/226149?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2019 13:12:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d1a5800-ec36-49c0-b81a-90f1b3347e45</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Please see the example&amp;nbsp;\nRF5_SDK_12.3.0_d7731ad\examples\peripheral\uart.&lt;/p&gt;
&lt;p&gt;In main.c, there&amp;#39;s a uart init function call:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;....
    const app_uart_comm_params_t comm_params =
      {
          RX_PIN_NUMBER,
          TX_PIN_NUMBER,
          RTS_PIN_NUMBER,
          CTS_PIN_NUMBER,
          APP_UART_FLOW_CONTROL_ENABLED,
          false,
          UART_BAUDRATE_BAUDRATE_Baud115200
      };

    APP_UART_FIFO_INIT(&amp;amp;comm_params,
                         UART_RX_BUF_SIZE,
                         UART_TX_BUF_SIZE,
                         uart_error_handle,
                         APP_IRQ_PRIORITY_LOWEST,
                         err_code);
....                         &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can change the define (in pca10028.h directly, or by adding your own board: &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/sdk_for_custom_boards.html?cp=7_5_8_1_5"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/sdk_for_custom_boards.html?cp=7_5_8_1_5&lt;/a&gt;) or give the function a pin-number of choice.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using two UART in nrf51822</title><link>https://devzone.nordicsemi.com/thread/226109?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2019 10:52:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:455506d0-58f0-405d-999f-95f77586ede1</guid><dc:creator>Nidhi</dc:creator><description>&lt;p&gt;Can you attach a example of how to&amp;nbsp; assign RXD and TXD pins to GPIO pins.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using two UART in nrf51822</title><link>https://devzone.nordicsemi.com/thread/226070?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2019 09:41:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a4a2173-fec1-4077-a04d-62ae3e67b113</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The nRF51x22&amp;nbsp;only has one UART peripheral, as per the product specification. RXD and TXD can be assigned to any unused GPIO of your choice.&lt;/p&gt;
&lt;p&gt;If you need a second UART, you have to implement a bit banged UART (a software implemented uart using GPIOs). Unfortunately, we do not have any implementations of this available, but it is however been discussed on the forum before. Try searching for &amp;quot;bit bang uart&amp;quot; and you should find some threads on this.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that nRF52840 has two hardware UARTE peripherals, so you could move to that device if your application require this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using two UART in nrf51822</title><link>https://devzone.nordicsemi.com/thread/226048?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2019 09:01:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0359ee9-7ce8-4c69-8749-e383824872af</guid><dc:creator>Nidhi</dc:creator><description>&lt;p&gt;two uarts in ble_peripheral -&amp;gt; ble_app_uart example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>