<?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 print RTT Viewer is too slow</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49363/nrf_log_info-print-rtt-viewer-is-too-slow</link><description>HI. i use SEGGER Studio and SDK 15.3.0. 
 I usally use printf func for debug. however as use SDK func, I need to use NRF_LOG_INFO casue SDK file use NRF_LOG_INFO for debuing. 
 and I search how enable and it work. but the speed of print is slow. 
 i compare</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 Jul 2019 00:54:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49363/nrf_log_info-print-rtt-viewer-is-too-slow" /><item><title>RE: NRF_LOG_INFO print RTT Viewer is too slow</title><link>https://devzone.nordicsemi.com/thread/197244?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2019 00:54:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6aba2ea-0de9-41af-bfca-4b1ef0de05b5</guid><dc:creator>BEN_HB</dc:creator><description>&lt;p&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO print RTT Viewer is too slow</title><link>https://devzone.nordicsemi.com/thread/197106?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2019 11:43:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61f2def8-cbf2-4815-8777-07b2f35f2060</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Thank you for reporting back the solution. I&amp;#39;m not sure why this would slow down the logging, but you can see an explanation of what happens in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/45985/nrf_log-not-working-on-segger-embedded-studio/182742#182742"&gt;this post&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO print RTT Viewer is too slow</title><link>https://devzone.nordicsemi.com/thread/197070?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2019 09:51:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43b26dba-e312-4d29-a9da-c27b6c1fe6e0</guid><dc:creator>BEN_HB</dc:creator><description>&lt;p&gt;now I found what is problem.&lt;/p&gt;
&lt;p&gt;15.3.0 in sdK_config.h&amp;nbsp;&lt;/p&gt;
&lt;p&gt;NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED 1&amp;nbsp;&lt;/p&gt;
&lt;p&gt;this one is problem. maybe&lt;/p&gt;
&lt;p&gt;I compare totally 15.3.0 and 15.2.0.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I check and chagne one by one config line.&lt;/p&gt;
&lt;p&gt;and then&amp;nbsp;NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED 0&lt;/p&gt;
&lt;p&gt;print speed is normal.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know why.&lt;/p&gt;
&lt;p&gt;anyway if you know why it happend&amp;nbsp;&lt;/p&gt;
&lt;p&gt;please more explain to me.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO print RTT Viewer is too slow</title><link>https://devzone.nordicsemi.com/thread/196981?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2019 02:40:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bf64f37-36bd-4a0f-81a7-16cc980d0967</guid><dc:creator>BEN_HB</dc:creator><description>&lt;p&gt;Thank you your reply.&lt;/p&gt;
&lt;p&gt;First now I test ANT+ Communication using S332. I forgot telling you what I did.&lt;/p&gt;
&lt;p&gt;I changed log option UART disabled and only RTT enable. but result is not change.&lt;/p&gt;
&lt;p&gt;I download totally new SDK 15.2.0 and 15.3.0 on nordic ofiicial website. I used ant+ ant_bsc example.&lt;/p&gt;
&lt;p&gt;first i did not chagne any option on sdk_config.h. on sdk_config.h log RTT is disable and uart is enable.&lt;/p&gt;
&lt;p&gt;on this state, i build on 52832 PCA10040 1.2.1, nrf_log_info is not working. and when i enable log rtt, log_info is working regardless log_uart enable or not.&lt;/p&gt;
&lt;p&gt;I disable log uart and enable log rtt. and same softdevice and same option.&lt;/p&gt;
&lt;p&gt;15.2.0 is normal. it is almost real time print and that is what i wanted&amp;nbsp;&lt;/p&gt;
&lt;p&gt;however 15.3.0 is still slow print. I don&amp;#39;t know what is problem. thanks your kindly answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO print RTT Viewer is too slow</title><link>https://devzone.nordicsemi.com/thread/196834?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 12:08:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7643167-3bb1-40a6-bece-a899d5c12718</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;If you have bot UART and RTT backends enabled, this will be much slower than if you call the SEGGER_RTT functions directly. UART backend will transfer logs over UART peripheral, which by default runs at 115200 baudrate. RTT send logs over the debugger, which is typically running at 1-4 MHz. See&amp;nbsp;&lt;a title="Performance" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/lib_nrf_log.html?cp=5_1_3_26_4#nrf_log_performance"&gt;Performance&lt;/a&gt;&amp;nbsp;in the logger documentation for details about what you could expect with only RTT enabled and deferred vs. non-deferred.&lt;/p&gt;
&lt;p&gt;Ideally, you should use deferred mode and process the logs when the chip is idle, unless you have timing-critical logs, then you can process the logs immediately by calling NRF_LOG_PROCESS/NRF_LOG_FLUSH.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO print RTT Viewer is too slow</title><link>https://devzone.nordicsemi.com/thread/196683?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 01:40:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a38c34b-d417-47c8-82c4-3c8d7abd623b</guid><dc:creator>BEN_HB</dc:creator><description>&lt;p&gt;HI.&lt;/p&gt;
&lt;p&gt;1. I enabled&lt;/p&gt;
&lt;p&gt;NRF_LOG_BACKEND_RTT_ENABLE,&amp;nbsp; NRF_LOG_BACKEND_UART_ENABLE, NRF_LOG_ENABLE using CMSIS&lt;/p&gt;
&lt;p&gt;Config file is too huge. which option do you need ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I Test SEGGER_RTT_WriteString or SEGGER_RTT_PRINTF. it work very well.&lt;/p&gt;
&lt;p&gt;I confused printf to UART or RTT? Could you recommand post to learn what difference and which config option need to enable or not.&lt;/p&gt;
&lt;p&gt;In my opinion printf and segger_rtt_printf works well. maybe some option is conflicted.&lt;/p&gt;
&lt;p&gt;Could you know only print NRF_LOG option? except other rtt or anything.&lt;/p&gt;
&lt;p&gt;Thank you kind reply.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO print RTT Viewer is too slow</title><link>https://devzone.nordicsemi.com/thread/196610?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2019 14:15:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83860904-48e3-4b15-b027-7f799532378e</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Can you post the configs you are using for NRF_LOG?&lt;/li&gt;
&lt;li&gt;Do you have multiple backends enabled?&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Do you print to RTT Terminal using printf also, or did you use this to print to UART?&lt;/li&gt;
&lt;li&gt;Are you sure that the configs are identical for SDK 15.2.0 and SDK 15.3.0? I do not think that there should be any major changes in the logger module.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/45825/nrf_log-max-number-of-arguments/181524#181524"&gt;NRF_LOG_info is written using macros&lt;/a&gt;, so it should be faster than printf, which use variable argument list (&lt;code&gt;&lt;span&gt;__VA_ARGS__&lt;/span&gt;&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>