<?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 duplicate output in Debug Terminal</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40260/nrf_log_info-duplicate-output-in-debug-terminal</link><description>In trying to debug I2C usage of BNO055 device, I&amp;#39;ve sprinkled NRF_LOG_INFO around in my code. 
 This is Very simple stuff, yet I am seeing erratic behavior of the logging. In this code snippet: 
 result = imu_init(); nrf_delay_ms(1000); NRF_LOG_INFO(</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Nov 2018 10:13:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40260/nrf_log_info-duplicate-output-in-debug-terminal" /><item><title>RE: NRF_LOG_INFO duplicate output in Debug Terminal</title><link>https://devzone.nordicsemi.com/thread/158587?ContentTypeID=1</link><pubDate>Thu, 22 Nov 2018 10:13:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d781389-0db5-46d3-8a8c-e293642d71e6</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi Jim,&lt;/p&gt;
&lt;p&gt;Maybe the RTT buffer is full? Can you try to implement the solution in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/24597/sdk-14-rtt-logging-issue/96848#96848"&gt;this case&lt;/a&gt; and see if that helps with the missing outputs?&lt;/p&gt;
&lt;p&gt;As explained by Sigurd, try to change the SEGGER_RTT_CONFIG_DEFAULT_MODE&amp;nbsp; and to increase the SEGGER_RTT_CONFIG_BUFFER_SIZE_UP to 1024 in sdk_config.h&lt;/p&gt;
&lt;p&gt;If this does not work maybe you will need to sent me your i2c files so I can try to reproduce the issue...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO duplicate output in Debug Terminal</title><link>https://devzone.nordicsemi.com/thread/158503?ContentTypeID=1</link><pubDate>Wed, 21 Nov 2018 19:50:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e7b4925-c714-48d2-97f2-725062e3cb94</guid><dc:creator>jtell466</dc:creator><description>&lt;p&gt;I had a couple of lower-level logging calls in my I2C code (called by bno055_read_chip_id).&amp;nbsp; Removing them changed the behavior of the top-level logging in main:&amp;nbsp; no more duplicate &amp;quot;BBBBBB&amp;quot;, but no &amp;quot;CCCCCC&amp;quot; output after that.&amp;nbsp; Removing the call to&amp;nbsp;&lt;span&gt;bno055_read_chip_id (note there are no longer lower-level logging calls anywhere) causes all main.c logging to appear correctly.&amp;nbsp; BUT (this is where it gets more weird!) keeping the call to bno055_read_chip_id and removing the delay call between &amp;quot;BBBBB&amp;quot; and &amp;quot;CCCC&amp;quot; logging calls, results in duplicate &amp;quot;CCCCCC&amp;quot; output!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My suspicion is that there is something going goofy with logging buffering/flushing mechanism, but I don&amp;#39;t have deep familiarity with the underlying code there.&amp;nbsp; &amp;nbsp;If it was just a case of duplicate output showing up, I might be able to consider that &amp;quot;benign&amp;quot; and ignore it; but when output goes missing.... well, that&amp;#39;s not good.&amp;nbsp; &amp;nbsp;Is there any other info I can provide that might be helpful here?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks very much!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jim&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO duplicate output in Debug Terminal</title><link>https://devzone.nordicsemi.com/thread/158489?ContentTypeID=1</link><pubDate>Wed, 21 Nov 2018 16:12:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cf27c3e-26db-484c-a9f4-845dc0f6abfa</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi Jim,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know what can be causing this behaviour. I took your main and sdk file, made my own declarations for errval, chip_id_u8 and ctr and didn&amp;#39;t see any duplicates in the RTT debug viewer of SES. So my thoughts are that the problem must come from the function bno055_read_chip_id. Maybe you can test doing the same as well?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;//    u8 chip_id_u8;
//    s8 errval;
 
//   errval = bno055_read_chip_id(&amp;amp;chip_id_u8);

// NOTE: ADDING THE FOLLOWING CALL RESULTS IN no subsequent output!
//    nrf_delay_ms(100);

     int8_t errval=0;
     uint8_t chip_id_u8=0;
     uint8_t ctr=0;
    
   NRF_LOG_INFO(&amp;quot;errval = %d, chipid = %d, ctr=%d&amp;quot;, errval, chip_id_u8, ctr++);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Have you made any modifications to bno055_read_chip_id function? Are you sure you are not printing any logs inside this function?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO duplicate output in Debug Terminal</title><link>https://devzone.nordicsemi.com/thread/158247?ContentTypeID=1</link><pubDate>Tue, 20 Nov 2018 16:11:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffa94fa3-d21a-4178-a306-b9b36789a12b</guid><dc:creator>jtell466</dc:creator><description>&lt;p&gt;Hi!&amp;nbsp; Thanks for getting back!&amp;nbsp; I&amp;#39;m still baffled by this one!&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve attached sdk_config.h and my main.c.&amp;nbsp; Putting breakpoints on the logging calls&lt;/p&gt;
&lt;p&gt;shows me that they are only getting executed once; but the output disagrees!&lt;/p&gt;
&lt;p&gt;I really appreciate any insights you might have!&lt;/p&gt;
&lt;p&gt;Jim&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1616.sdk_5F00_config.h"&gt;devzone.nordicsemi.com/.../1616.sdk_5F00_config.h&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8713.main.c"&gt;devzone.nordicsemi.com/.../8713.main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_LOG_INFO duplicate output in Debug Terminal</title><link>https://devzone.nordicsemi.com/thread/158157?ContentTypeID=1</link><pubDate>Tue, 20 Nov 2018 12:07:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:477c1cca-c657-410d-912b-fda12617808a</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi Jim,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply, half the office here was busy with Electronica conference last week. I haven&amp;#39;t seen this error before, are you sure you are not printing the same log info from two different places in your code? Could you send me the sdk_config.h file so I can take a look at how the logging module is configured?&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>