<?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>printf / UART debug does not work properly on nRF51822 s110 ble_app_hts example.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6729/printf-uart-debug-does-not-work-properly-on-nrf51822-s110-ble_app_hts-example</link><description>Hi, 
 Thanks for taking the time looking into issue.
We are using Keil uVision 5.14.
Our target is a custom board (BMD200 eval Module based on nRF51822)
We were able to run uart example with expected outputs to Putty through the UART by following</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 16 Jun 2017 22:49:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6729/printf-uart-debug-does-not-work-properly-on-nrf51822-s110-ble_app_hts-example" /><item><title>RE: printf / UART debug does not work properly on nRF51822 s110 ble_app_hts example.</title><link>https://devzone.nordicsemi.com/thread/23619?ContentTypeID=1</link><pubDate>Fri, 16 Jun 2017 22:49:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2250e55-b65c-4fbe-a528-7646af17c4d7</guid><dc:creator>Nelson Rodriguez</dc:creator><description>&lt;p&gt;put on DTR and RTS in your serial monitor&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf / UART debug does not work properly on nRF51822 s110 ble_app_hts example.</title><link>https://devzone.nordicsemi.com/thread/23612?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2015 15:27:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12f00f28-dcbd-419e-ad50-33e0f0671020</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;happens in our programming world :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf / UART debug does not work properly on nRF51822 s110 ble_app_hts example.</title><link>https://devzone.nordicsemi.com/thread/23615?ContentTypeID=1</link><pubDate>Wed, 29 Apr 2015 15:11:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e9226ef-46b7-4e1f-800e-1493dac35996</guid><dc:creator>PeterH</dc:creator><description>&lt;p&gt;The SEGGER_RTT API and JLink RTT Viewer works like a charm.
Detailed set up steps can be found here: &lt;a href="https://devzone.nordicsemi.com/tutorials/6/debugging-with-real-time-terminal/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;
Thanks a lot Alex!&lt;/p&gt;
&lt;p&gt;@Aryan, I think I found the reason why the printf()s and the state enum values didn&amp;#39;t work in the first place - My Mistake.
The version of the softdevice running on my module is 7.0.1. But On Keil, it looks like I am developing with 8.0.0.
So after updating the softdevice to 8.0.0 using nRFgo Studio, the examples works as expected.
Thanks a lot for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf / UART debug does not work properly on nRF51822 s110 ble_app_hts example.</title><link>https://devzone.nordicsemi.com/thread/23618?ContentTypeID=1</link><pubDate>Tue, 28 Apr 2015 07:23:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b705b68-ca0a-4511-96e9-7b8e3f576aec</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The enum might not be changing because the the advertiser is probably always on and there is no connection event that has happened to change the state? Did you make sure that the device was in connection? Also the enum is operating in different contexts so i think you should make it volatile and hopefully perform operations on it in critical sections, Just thinking aloud here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf / UART debug does not work properly on nRF51822 s110 ble_app_hts example.</title><link>https://devzone.nordicsemi.com/thread/23614?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2015 16:04:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:018b3e05-414c-4f82-bb7f-4e301a8c57b9</guid><dc:creator>PeterH</dc:creator><description>&lt;p&gt;Alex, Thanks for your input!
That&amp;#39;s exactly what I&amp;#39;d like to do, print some debug messages through UART.
This SEGGER_RTT_WriteString API seems very interesting and worth a try - I will provide updates on whether it works or not.
Thanks again, really appreciate the help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf / UART debug does not work properly on nRF51822 s110 ble_app_hts example.</title><link>https://devzone.nordicsemi.com/thread/23617?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2015 15:58:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b2d7799-a939-44a4-bc14-e82cd9ce494e</guid><dc:creator>PeterH</dc:creator><description>&lt;p&gt;Thanks for your reply Aryan.
I have tried increased the TX buffer size from 256 to 1024, and 2048; RX Buffer size from 1 to 32 and 256; Code compiles and runs, but still, only &amp;quot;hel&amp;quot; is printed instead of &amp;quot;hello&amp;quot; and the rest of the debug messages are not printed as well.
I just found a similar issue (&lt;a href="https://devzone.nordicsemi.com/question/1588/can-nordic-please-document-how-to-debug-code-on-their-processors/)"&gt;devzone.nordicsemi.com/.../)&lt;/a&gt; where Ole provided &amp;quot;ble_app_hrs_printf.zip&amp;quot;. I think I will give this approach a try and update my findings.&lt;/p&gt;
&lt;p&gt;Meanwhile, I am just wondering if you would have any thoughts on the enum value not being update issue (I assign different &amp;quot;state enum&amp;quot; values in the functions in main.c, and then print out the values in the main() loop. But somehow, the enum variable just doesn&amp;#39;t seem to change value..)&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf / UART debug does not work properly on nRF51822 s110 ble_app_hts example.</title><link>https://devzone.nordicsemi.com/thread/23613?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2015 11:57:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:736e9609-cb9a-4fdd-98f8-675bc524879c</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;Sorry if it is not your case but if you are planning to use UART only for debugging purposes while running with JLink then I&amp;#39;d advise to use SEGGER_RTT_WriteString instead of printf and JLink RTT viewer on PC. It doesn&amp;#39;t have delays or buffer overflow issues.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: printf / UART debug does not work properly on nRF51822 s110 ble_app_hts example.</title><link>https://devzone.nordicsemi.com/thread/23616?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2015 11:43:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:840fb5e0-d41d-4d8e-aff9-5419c81e90a3</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;When using softdevice, the timings for UART read and writes has been changed. The interrupt handler execution could be delayed causing buffer overflows. Try to increase the value for UART_RX_BUF_SIZE and UART_TX_BUF_SIZE  to a greater value so that fifo library has more space to buffer.
I am not sure if this will solve the problem, but it will at least rule out insufficient buffer problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>