<?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>SEGGER RTT printf blocking mode dynamically</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44230/segger-rtt-printf-blocking-mode-dynamically</link><description>Hi guys, 
 is it possible to print in blocking mode by request? 
 I tried to use a return value from SEGGER_RTT_printf(0, &amp;quot;some text\n&amp;quot;); but the value is always the same independent of if it is printed to the console or not. 
 i also tried to 
 #undef</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 Mar 2019 11:19:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44230/segger-rtt-printf-blocking-mode-dynamically" /><item><title>RE: SEGGER RTT printf blocking mode dynamically</title><link>https://devzone.nordicsemi.com/thread/173939?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 11:19:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0eeb1195-5dc7-465c-bdc2-24e70eb06260</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I recommend using the &lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-3-0/lib_nrf_log"&gt;nrf_log module&lt;/a&gt; if you are doing logging. If you are seeing logs being dropped, then increase the NRF_LOG_BUFSIZE parameter in sdk_config.h&lt;/p&gt;
[quote userid="15419" url="~/f/nordic-q-a/44230/segger-rtt-printf-blocking-mode-dynamically"]I tried to use a return value from &lt;code&gt;SEGGER_RTT_printf(0, &amp;quot;some text\n&amp;quot;);&lt;/code&gt; but the value is always the same &lt;span lang="en"&gt;independent of if it is printed to the console or not.&lt;/span&gt;[/quote]
&lt;p&gt;I also see the same&amp;nbsp;behavior with&amp;nbsp;&lt;em&gt;SEGGER_RTT_printf()&lt;/em&gt;. But with&amp;nbsp;SEGGER_RTT_WriteString(), it returns 0 if the log is not printed to console. So you could maybe use that function instead. RTT is developed by Segger, so if you ask in &lt;a href="https://forum.segger.com/"&gt;their forum&lt;/a&gt;, they might be able to explain why&amp;nbsp;&lt;em&gt;SEGGER_RTT_printf() does not return 0.&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>