<?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>Get log from printf instead of NRF_LOG</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27407/get-log-from-printf-instead-of-nrf_log</link><description>Dears,
I am developing my application based on SDKv12.0.0. I would like to use &amp;quot;printf&amp;quot; &amp;amp; &amp;quot;app_uart_get&amp;quot;(interrupt routing) instead of &amp;quot;NRF_LOG&amp;quot;. Is possible to switch it? What should I do to replace it?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 Nov 2017 03:49:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27407/get-log-from-printf-instead-of-nrf_log" /><item><title>RE: Get log from printf instead of NRF_LOG</title><link>https://devzone.nordicsemi.com/thread/108231?ContentTypeID=1</link><pubDate>Fri, 24 Nov 2017 03:49:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4dbbb98-e01a-4ea9-b80e-921f9b849064</guid><dc:creator>Stanley</dc:creator><description>&lt;p&gt;NRF_LOG_GETCHAR()  is not suitable for our application. There are some routine processes in the main loop. However, we decided to implement App_Uart process to handle uart function at Rx / Tx. Thanks for everyone who advised.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get log from printf instead of NRF_LOG</title><link>https://devzone.nordicsemi.com/thread/108230?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 12:59:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:008b5921-e814-4f5c-b8ee-b65a34b2f622</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;code&gt;NRF_LOG_GETCHAR()&lt;/code&gt; is blocking, and returns when single byte is received. So it could be better to use app_uart_get() instead. Take a look at e.g. the ble_app_uart example and see how its done there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get log from printf instead of NRF_LOG</title><link>https://devzone.nordicsemi.com/thread/108229?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2017 16:23:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4dd2e4d2-631b-4992-a3b6-09aeefcb5714</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;But isn&amp;#39;t NRF_LOG actually printf?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get log from printf instead of NRF_LOG</title><link>https://devzone.nordicsemi.com/thread/108227?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2017 13:59:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ac12e68-71d4-45da-ab03-c9fb9173a5cd</guid><dc:creator>Stanley</dc:creator><description>&lt;p&gt;Can someone tell me that how to get a string using NRF_LOG_GETCHAR()? The following is my process, is it correct?
c = NRF_LOG_GETCHAR();
NRF_LOG_INFO(&amp;quot;%c&amp;quot;, c);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get log from printf instead of NRF_LOG</title><link>https://devzone.nordicsemi.com/thread/108228?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2017 13:36:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9cf88f6-e5a3-4385-864e-447e2aecf94d</guid><dc:creator>Stanley</dc:creator><description>&lt;p&gt;I have found the way to get logs by interrupt at NRF_LOG setting. The configuration of &amp;quot;NRF_LOG_DEFERRED&amp;quot; should be clear to &amp;quot;0&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>