<?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 implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23380/how-to-implement-soft-uart-in-pca10028</link><description>Hello, 
 I am using pca10028 and sdk 12. I want to use 2 uart for my application but as per datasheet nrf51 has only one hardware uart. Can I implement soft uart on pca10028? I want to use both the uart at the same time so multiplexing will not help</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Jul 2017 13:22:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23380/how-to-implement-soft-uart-in-pca10028" /><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91897?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2017 13:22:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f612e91e-a36e-4b00-b986-3d23fd7174b1</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;See the comment section of the answer below for more context regarding this solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91902?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2017 09:16:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e31bcc8-2e52-4a9b-afb1-c7c2f0a4f82a</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Happy to help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91901?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2017 09:08:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03aa60da-9ed2-4892-b72e-04db1d7d334b</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi,
Its working now. I used NRF_LOG_DEFERRED to 0  and now I can see the output in RTT viewer.
Thanks,
Shailav&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91896?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2017 09:02:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4e4d427-95df-44bd-8846-6f197ee6c138</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Try setting NRF_LOG_DEFERRED to 0 and then comment out NRF_LOG_PROCESS() in main.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91909?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2017 09:00:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aaa7b1ff-d56b-40d4-ba6f-8df53ad83362</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;None of the above call NRF_LOG_INFO  works in BLE_GAP_EVT_ADV_REPORT. I am using NRF_LOG_PROCESS() in the main . Though when I am printing
// Start scanning for peripherals and initiate connection
// with devices that advertise NUS UUID.
NRF_LOG_INFO(&amp;quot;Uart_c Scan started\r\n&amp;quot;);&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;scan_start(); 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above code works but when I am calling NRF_LOG_INFO in BLE_GAP_ADV_REPORT it doesn&amp;#39;t works.
Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91908?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2017 08:52:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d3c7c20-f538-4c7b-ab7e-fd5bbfd2cc9d</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;So none of the NRF_LOG_INFO calls under the BLE_GAP_EVT_ADV_REPORT case in on_ble_evt() shows up in RTT viewer? Did you set NRF_LOG_DEFERRED to 0 or did you call NRF_LOG_PROCESS() in the main while loop?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91907?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2017 08:35:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24023c12-8e34-484b-bfe0-155759a58ab1</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi,
I am able to print something on RTT_viewer by implementing your suggestions but I also want to print the mac address, Rssi and adv data of nearby ble devices as I am using ble_app_uart_c(central) code.
I am not able to see above data in rtt_viewer. My code snippet is as follows&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;const ble_gap_evt_adv_report_t * p_adv_report = &amp;amp;p_gap_evt-&amp;gt;params.adv_report;
{
         // scan is automatically stopped by the connect
         err_code = bsp_indication_set(BSP_INDICATE_IDLE);
            APP_ERROR_CHECK(err_code);
             NRF_LOG_INFO(&amp;quot;Mac address %02x%02x%02x%02x%02x%02x\r\n&amp;quot;,
               p_adv_report-&amp;gt;peer_addr.addr[5],
               p_adv_report-&amp;gt;peer_addr.addr[4],
               p_adv_report-&amp;gt;peer_addr.addr[3],
               p_adv_report-&amp;gt;peer_addr.addr[2],
               p_adv_report-&amp;gt;peer_addr.addr[1],
               p_adv_report-&amp;gt;peer_addr.addr[0]
            );

		NRF_LOG_INFO(&amp;quot;Data: &amp;quot;);

	        for(i=0;i&amp;lt;17;i++)
		{
		     NRF_LOG_INFO(&amp;quot;%02x&amp;quot;, p_adv-&amp;gt;data[i]);
		}
									
		NRF_LOG_INFO(&amp;quot; \r\nRSSI: %d\n&amp;quot;, p_adv-&amp;gt;rssi);							
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91903?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2017 07:37:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8267f35-9844-4cd3-9725-0bf52a2f8324</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;You also need to either set &lt;code&gt;NRF_LOG_DEFERRED&lt;/code&gt; to 0 in &lt;strong&gt;sdk_config.c&lt;/strong&gt; or call &lt;code&gt;NRF_LOG_PROCESS()&lt;/code&gt; in the main while loop.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91906?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2017 07:01:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12a61993-e2e4-4058-8b88-8c1284fe146b</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi,
I am unable to see any output using NRF_LOG_INFO. I am attaching my sdk_config.h file and main.c file above.
Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91905?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2017 06:53:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26424460-4405-4b3c-b19b-a2c3fa697c74</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;You should use the &lt;code&gt;NRF_LOG_INFO&lt;/code&gt; macro instead of &lt;code&gt;SEGGER_RTT_printf()&lt;/code&gt; , e.g.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;NRF_LOG_INFO(&amp;quot;Heart Rate Sensor Start!\r\n&amp;quot;);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91904?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2017 05:49:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8df1456-b3d4-422d-a587-0b4965e75010</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi Bjørn,
I was able to set up RTT viewer. When I am writing this SEGGER_RTT_WriteString(0, &amp;quot;Hello World!\n&amp;quot;); I am able to see output in RTT viewer but when I am using the printf function for example
SEGGER_RTT_printf(0, &amp;quot;variable value: %d\n&amp;quot;, err_code);		
I am getting error as
._build\nrf51422_xxac.axf: Error: L6218E: Undefined symbol SEGGER_RTT_printf (referred from main.o).
What can be the problem?
Thanks,
Shailav&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91900?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2017 13:01:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e957fa3e-69de-4e04-9166-f8018a107009</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Yes, you can use Segger&amp;#39;s RTT instead of the UART by setting &lt;code&gt;NRF_LOG_BACKEND_SERIAL_USES_RTT&lt;/code&gt; to 1 and &lt;code&gt;NRF_LOG_BACKEND_SERIAL_USES_UART&lt;/code&gt; to 0 in &lt;code&gt;skd_config.h&lt;/code&gt;. See &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/nrf_log.html?resultof=%22%6c%6f%67%67%69%6e%67%22%20%22%6c%6f%67%22%20"&gt;this&lt;/a&gt; Infocenter page for more information on the logger module.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91899?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2017 12:49:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32b33167-44b2-45e3-aab1-0b37bd7634b3</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi Bjørn,
As of now I am not using nrf52840. I have nrf51 and nrf52832(pca10040). My application is as follows:
I am scanning the nearby ble devices using code ble_app_uart_c(central role). Now uart pins 11 and 9 are used for tx and rx so that I can see the output on my terminal.
Can I see the output in terminal without wasting this pins?
I want to send some at commands to esp8266 using pins 11 and 9 but as these pins are already in use I am not able to do this.
Any suggestions?
Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91910?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2017 09:54:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b50f9e8-90b5-4d3d-96ae-d8382d989c7a</guid><dc:creator>Mahesh Venkitachalam</dc:creator><description>&lt;p&gt;A bit banged UART is not that hard to implement, especially for low baud rates - for a simple example see:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://electronut.in/serial-communications-with-the-attiny84/"&gt;electronut.in/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to implement soft uart in Pca10028?</title><link>https://devzone.nordicsemi.com/thread/91898?ContentTypeID=1</link><pubDate>Mon, 10 Jul 2017 09:05:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fe794f7-70ff-4522-b7b5-862431751cd8</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Shailav,&lt;/p&gt;
&lt;p&gt;I am afraid that we do not have any examples showing how create a software-based(&amp;quot;bit-banged&amp;quot;) UART for the nRF51 Series. Have you considered using the nRF52840 that has two UARTs?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>