<?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>NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43370/nrf_log_info-and-printf-does-not-work</link><description>Hello, 
 I am trying to print things from my board. I would like to go with NRF_LOG_INFO. I have the modules enabled, included the essential libraries, including the c files, but it does not work. 
 
 
 I am using NRF52DK with SDK v14.20. I use PuTTY</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 25 Sep 2022 18:07:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43370/nrf_log_info-and-printf-does-not-work" /><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/387776?ContentTypeID=1</link><pubDate>Sun, 25 Sep 2022 18:07:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:159b6210-b366-43d8-86cb-919de5c2ccf3</guid><dc:creator>Ho_AMX</dc:creator><description>&lt;p&gt;Excellent! it sill dose does not work for me with all adjustments!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169558?ContentTypeID=1</link><pubDate>Tue, 05 Feb 2019 14:24:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a88368a0-bcb7-4ce6-9588-62af5a2b16b9</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Okay, i fixed it.&lt;/p&gt;
&lt;p&gt;Reading &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/22768/error-while-adding-app_uart_fifo-c"&gt;this&lt;/a&gt; thread, it shows that there&amp;#39;s a bug in SDK 11, which still present on SDK 14.&lt;/p&gt;
&lt;p&gt;TL;DR:&lt;/p&gt;
&lt;p&gt;1. Don&amp;#39;t use &lt;strong&gt;app_uart&lt;/strong&gt;. Use &lt;strong&gt;app_fifo&lt;/strong&gt; and &lt;strong&gt;app_uart_fifo&lt;/strong&gt; instead.&lt;/p&gt;
&lt;p&gt;2. add &amp;quot;#include &amp;quot;app_fifo.h&amp;quot; &amp;quot;&lt;/p&gt;
&lt;p&gt;3. add this in sdk_config.h:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;q&amp;gt; APP_FIFO_ENABLED  - app_fifo - Software FIFO implementation
 

#ifndef APP_FIFO_ENABLED
#define APP_FIFO_ENABLED 1
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I hope this thread will be #1 on Google so other developers won&amp;#39;t face this problem like I did.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m removing my project file and converting this thread to public&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169557?ContentTypeID=1</link><pubDate>Fri, 01 Feb 2019 10:17:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7ea8673-1f53-425a-9a14-b6e6a6fd65b0</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Oh, I thought it was only applicable for RTT.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll try it, will update soon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169556?ContentTypeID=1</link><pubDate>Fri, 01 Feb 2019 10:15:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:244b7ece-c4d8-48fd-ab6f-d9dc7a535a68</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;To make fprint work as expected in PuTTY,&amp;nbsp;you can try following &lt;a href="https://devzone.nordicsemi.com/tutorials/b/getting-started/posts/debugging-with-real-time-terminal"&gt;this tutorial&lt;/a&gt;, although it is old, it should still work if you follow it precisely. As for now I don&amp;#39;t have a fix on your NRF_LOG issue, but I will look a little more into it today.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;
&lt;p&gt;EDIT: Sorry, forgot to link to the tutorial, should be there now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169555?ContentTypeID=1</link><pubDate>Thu, 31 Jan 2019 13:09:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:614c7fc4-79f9-4f43-a8d1-3c0de70a683a</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply, here it is:&lt;/p&gt;
&lt;p&gt;== Removed ==&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169554?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 14:11:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69739b26-93db-4707-a3e3-6dec76851b85</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Seeing as you have made your own project, there are too many factors that can hinder the NRF_LOG INFO. I made this ticket private, so that you can share your project here. If I can see the project in its entirety it will be easier for me to understand, and we will find the solution much faster.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169553?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 14:11:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76beebfe-e818-4263-a0e5-be057cd1d307</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Seeing as you have made your own project, there are too many factors that can hinder the NRF_LOG INFO. I made this ticket private, so that you can share your project here. If I can see the project in its entirety it will be easier for me to understand, and we will find the solution much faster.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169552?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 14:11:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a5a012d-f8f5-4d66-8383-04ea2368ed27</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Okay, I decided to use printf instead.&lt;/p&gt;
&lt;p&gt;Currently, printf seem to work, but it is not printing the string. It only print the first character of the string..&lt;/p&gt;
&lt;p&gt;I included app_error, retarget.c, and other libraries.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169551?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 12:35:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af2fd063-4f81-4b26-8d31-9e9468bb1135</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;hmm, no, it doesn&amp;#39;t work either&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169550?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 12:05:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:775c8322-c786-4e04-80d9-0625e7a4cd4b</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Hmm, upon starting up my board, normally it would generate some signals on pin 22. Otherwise, it doesn&amp;#39;t generate any signal now.&lt;/p&gt;
&lt;p&gt;Alright, I will take a look on that example. I will update soon. And yes, I have made sure both of them are set correctly&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169549?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 10:19:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f9aecc2-0484-4af6-9ef8-8a9825ebf12b</guid><dc:creator>Simonr</dc:creator><description>[quote user="Winz"]freezing at startup[/quote]
&lt;p&gt;&amp;nbsp;What exactly do you mean by this? I suggest you take a look at our ble_app_uart example, and make sure that nrf_log_backend_uart_enabled is set to 1 while nrf_log_backend_rtt_enabled is set to 0&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169548?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 09:57:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28180a6b-0182-47cf-bc02-e4f05a072dcd</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;I referred to the LPCOMP example. Otherwise, since I am building my own project, I thought it would be better to try to build it by my own. (Honestly, I built it inside &amp;quot;ppi_change_int&amp;quot; example.&lt;/p&gt;
&lt;p&gt;I did not have either turned on. I have included them in, but there&amp;#39;s still no difference: freezing at startup&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169547?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 09:50:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5a41c63-e617-41b3-a0bc-acd35e4a47e8</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;What example project are you using?&lt;/p&gt;
&lt;p&gt;Can you check that you have set the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;#define NRFX_UART_ENABLED 1&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;#define UART_ENABLE 1&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;#define APP_UART_ENABLE 1&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169546?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 08:40:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98fdd2fd-c53a-41be-bc5a-eb7d1ac442f6</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;No error message comes up after building my code.&lt;/p&gt;
&lt;p&gt;Currently, my board does no longer work (halted?) after I ran this 3 lines of code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;	uint32_t err_code = NRF_LOG_INIT(NULL);
    APP_ERROR_CHECK(err_code);

    NRF_LOG_DEFAULT_BACKENDS_INIT();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If I commented them out, then there will be no problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169545?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 08:37:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8a54cd3-9101-4019-9751-dac80051f911</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Is the problem that you get an error when building your code? In that case, please post an error code for me to look into. Or is it just that your prints doesn&amp;#39;t output in PuTTY? In that case you might have to look at how you call the print functions in your main.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169544?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 15:29:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cdc9a57-c630-4974-ba89-da4ee1b5cc4f</guid><dc:creator>Winz</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Yes, it has been enabled.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/qwrrewq.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Yes, It was configured to use only UART, but still the same.&lt;/p&gt;
&lt;p&gt;I have now turned off RTT, made sure that baudrate in 115200 in both sdk_config.h and terminal, but still does not work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO and printf does not work</title><link>https://devzone.nordicsemi.com/thread/169543?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 15:14:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:486233fd-24fe-418b-9591-9a595ac64dcc</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Please make sure that you have&amp;nbsp;set NRF_LOG_ENABLED 1 in sdk_config.h, as I can&amp;#39;t see anywhere that you have. Also you shoud only use either RTT or UART, not both. And make sure that baudrate is 115200 in both sdk_config.h and in your terminal.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>