<?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>Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7333/trying-to-get-nrf51822-on-rigado-bmd-200-to-print-to-hyperterminal-via-uart</link><description>Hello, 
 I&amp;#39;m trying to do some simple printfs to hyerperterminal as a way to debug my code. I have used the uart example init code but nothing prints: 
 void init_uart(void)
{
 uint32_t err_code;
 const app_uart_comm_params_t comm_params =
 {
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Jun 2015 10:13:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7333/trying-to-get-nrf51822-on-rigado-bmd-200-to-print-to-hyperterminal-via-uart" /><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25980?ContentTypeID=1</link><pubDate>Thu, 25 Jun 2015 10:13:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:104c0f19-41d7-4ee1-b6e1-6cc7a067fbd5</guid><dc:creator>Frodesto</dc:creator><description>&lt;p&gt;I&amp;#39;m just getting started with nRF development and hit the same problem -- Printf only printed the first character of the string.&lt;/p&gt;
&lt;p&gt;I found the solution in &lt;a href="https://devzone.nordicsemi.com/question/37128/problem-with-retargetc/"&gt;another thread&lt;/a&gt;: Switch to the FIFO variant of the app_uart driver (use Project-&amp;gt;Manage-&amp;gt;Runtime Environment in Keil. Remeber to add the app_fifo library as well).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25979?ContentTypeID=1</link><pubDate>Sat, 30 May 2015 06:50:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9cd9b679-2245-4ba0-a192-6b68a68ac6f2</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;How is the uart pins connected ? are there connections on CTS/RTS ? if not desirable Flow control.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25978?ContentTypeID=1</link><pubDate>Sat, 30 May 2015 03:02:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6c37516-e415-4512-8d92-76b99e335de5</guid><dc:creator>eq</dc:creator><description>&lt;p&gt;printf, app_uart, _write all spit out one character and one only&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25977?ContentTypeID=1</link><pubDate>Sat, 30 May 2015 02:28:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a2675ff-5472-4107-87c3-62ceff8c5272</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Does it happen only with printf ? If you use the app_uart function directly does it work ?  Just need to isolate the problem. If only printf is the problem try set printf buffering with&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;setvbuf (stdout , NULL , _IOLBF , 256 );
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25976?ContentTypeID=1</link><pubDate>Sat, 30 May 2015 02:19:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23d3f289-fba1-42c9-a315-c33885dce2c8</guid><dc:creator>eq</dc:creator><description>&lt;p&gt;Same result.  &amp;quot;H&amp;quot; only&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25975?ContentTypeID=1</link><pubDate>Sat, 30 May 2015 02:01:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:705cc9b6-f6af-4d08-8777-c65d023ae144</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;try printf(&amp;quot;Hello\n&amp;quot;);  with the \n at the end.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25974?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 21:30:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:288cd122-3914-4abf-8009-a68f17d1ae85</guid><dc:creator>eq</dc:creator><description>&lt;p&gt;Still no luck.  Using the init routine below, included retarget.c in the build, and using Printf, still only spits out the first character of the string.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void init_uart(void)
{
    uint32_t err_code;
    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_Baud38400
    };

    APP_UART_FIFO_INIT(&amp;amp;comm_params,
                         UART_RX_BUF_SIZE,
                         UART_TX_BUF_SIZE,
                         uart_error_handle,
                         APP_IRQ_PRIORITY_LOW,
                         err_code);

    APP_ERROR_CHECK(err_code);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;BTW, it looks like I am not the only person facing this issue:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/37128/problem-with-retargetc/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/39504/trying-to-get-nrf51822-on-rigado-bmd-200-to-print-to-hyperterminal-via-uart/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;These are BOTH unresolved questions as well :-(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25963?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 09:53:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:faadb4e0-1bef-48c6-85f0-ab7ed2289fbc</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;using S110 softdevice will not block UART forever. Why did you disable flow control?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;APP_UART_FLOW_CONTROL_DISABLED, //APP_UART_FLOW_CONTROL_ENABLED,
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Segger COM port emulation needs flow control to be enabled. Disabling flow control is for external device/sensors that are connected directly to nRF51 UART pins and if those devices does not have flow control.
Enable flow control and follow intructions mentioned by Hoan Hoang about retarget.c. Printf should function normally then.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25973?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 07:23:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b403e0be-af68-47de-8db6-a632109f5a57</guid><dc:creator>eq</dc:creator><description>&lt;p&gt;yeah this is not working for me.  I suspect it has something to do with me using the S110 Soft Device&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25972?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 07:11:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7254f62d-7497-4b7e-bfa6-93a469803555</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;have a look at this &lt;a href="https://devzone.nordicsemi.com/question/4387/how-does-retargetc-actually-work/"&gt;thread&lt;/a&gt;.  More info about retargeting printf &lt;a href="http://robotics.mcmanis.com/articles/20140623_retargeting-libc.html"&gt;here&lt;/a&gt;.  You can also find more answers about retarget by doing a search on the forum.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25971?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 07:05:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcfaa409-33de-45c8-a1e5-7cd8287835ae</guid><dc:creator>eq</dc:creator><description>&lt;p&gt;i added retarget.c to the project when you first mentioned it...still no luck tho..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25970?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 07:03:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8756d790-6be2-49f3-a8b3-401e7433cb26</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;You need to add target.c to your project.  Target will overwrite the _write function of the default library.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25969?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 06:55:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ab0d17f-ab97-442a-9559-c427de264c94</guid><dc:creator>eq</dc:creator><description>&lt;p&gt;printf still prints nothing...not sure what to do with retarget i guess...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25968?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 06:50:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84435c31-2100-4986-82e8-158eadf5864c</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;You don&amp;#39;t call _write.  _write is called by printf.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25967?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 05:25:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb4f29c6-6faa-4fb4-90a1-4ef0d5d9f2be</guid><dc:creator>eq</dc:creator><description>&lt;p&gt;Thanks.  I switched to _write from retarget.c and now only the first character is displayed and then it stops.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25966?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 02:53:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:331eb38d-2649-4b26-894f-7bf6f9ca0c9f</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;That is what require to reroute stdio over uart.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25965?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 02:37:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ee7da92-87ea-4bb0-9a3b-eaa55a329bec</guid><dc:creator>eq</dc:creator><description>&lt;p&gt;That file uses uart_putstring also which doesn&amp;#39;t work for me&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to get nrf51822 on Rigado BMD-200 to print to hyperterminal via uart</title><link>https://devzone.nordicsemi.com/thread/25964?ContentTypeID=1</link><pubDate>Fri, 29 May 2015 02:24:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02b96f73-aade-43c6-a22c-70d8efe05522</guid><dc:creator>Nguyen Hoan Hoang</dc:creator><description>&lt;p&gt;Look in libraries/uart for file retarget.c&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>