<?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>Kconfig CONFIG_LOG_OVERRIDE_LEVEL=4 breaks logging system</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92820/kconfig-config_log_override_level-4-breaks-logging-system</link><description>Using the Zephyr logging system, setting Kconfig option in prj.conf to override logging to level 4 (output LOG_DBG messages) breaks the console and no output is sent at all. 
 
 
 
 Setting the override level to 1-3 works as expected. 
 
 We are using</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Oct 2022 13:48:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92820/kconfig-config_log_override_level-4-breaks-logging-system" /><item><title>RE: Kconfig CONFIG_LOG_OVERRIDE_LEVEL=4 breaks logging system</title><link>https://devzone.nordicsemi.com/thread/391218?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 13:48:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9a44f5a-71ff-4d00-95fb-cbc6bd5922dc</guid><dc:creator>wkpolara</dc:creator><description>&lt;p&gt;Alright, thanks&amp;nbsp;&lt;span&gt;H&amp;aring;kon&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Kconfig CONFIG_LOG_OVERRIDE_LEVEL=4 breaks logging system</title><link>https://devzone.nordicsemi.com/thread/391200?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 13:00:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:535fbbfe-ea6b-4bf4-9ddb-4e482b827290</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Walt,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can confirm that there&amp;#39;s an issue with this configuration and the deferred logging option:&lt;/p&gt;
[quote user="wkpolara"]CONFIG_LOG_OVERRIDE_LEVEL=4[/quote]
&lt;p&gt;The problem seems to be specific to the logging in the MPU initialization, more specifically these two LOG_DBG calls:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.1.99-ncs1/arch/arm/core/aarch32/mpu/arm_mpu_v8_internal.h#L174"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v3.1.99-ncs1/arch/arm/core/aarch32/mpu/arm_mpu_v8_internal.h#L174&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v3.1.99-ncs1/arch/arm/core/aarch32/mpu/arm_mpu.c#L341"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v3.1.99-ncs1/arch/arm/core/aarch32/mpu/arm_mpu.c#L341&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Disabling the MPU is not recommended.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One way to work around this is to change the logging method to for instance minimal footprint (CONFIG_LOG_MODE_MINIMAL).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll report this issue back to the team that works with the logger.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Kconfig CONFIG_LOG_OVERRIDE_LEVEL=4 breaks logging system</title><link>https://devzone.nordicsemi.com/thread/390842?ContentTypeID=1</link><pubDate>Fri, 14 Oct 2022 17:48:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73978b91-a6aa-4b78-9f46-84dac8d5f0d5</guid><dc:creator>wkpolara</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank&amp;nbsp; you for the reply.&amp;nbsp; I see your point about the gpio_pin_get_dt(), and your suggestion to just print directly the Info and Debug messages is good.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I understand that where the default log level is used, that can alternatively be used to change the log level in those modules.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;However, I would still expect&amp;nbsp;CONFIG_LOG_OVERRIDE_LEVEL=4 to work.&amp;nbsp; Why does it break it instead?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Walt&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Kconfig CONFIG_LOG_OVERRIDE_LEVEL=4 breaks logging system</title><link>https://devzone.nordicsemi.com/thread/390639?ContentTypeID=1</link><pubDate>Thu, 13 Oct 2022 12:15:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bdfd117-3e46-4354-acad-2d538de68fdf</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]Edit prj.conf to set&amp;nbsp;CONFIG_LOG_OVERRIDE_LEVEL=4&amp;nbsp;&amp;nbsp;[/quote]
&lt;p&gt;This will set all registered&amp;nbsp;log modules to debug mode, which will use alot of stack memory.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To enable a given level on your specified logging module, you do this in the definition itself.&lt;/p&gt;
&lt;p&gt;In your case, it is this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;LOG_MODULE_REGISTER(Blinky, CONFIG_LOG_DEFAULT_LEVEL);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So f you set CONFIG_LOG_DEFAULT_LEVEL=4 in prj.conf, you should get both info and debug prints.&lt;/p&gt;
&lt;p&gt;This function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ret = gpio_pin_get_dt(&amp;amp;led);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Is for a GPIO configured as input (ie. reads NRF_P0-&amp;gt;IN register), and will not return the state of a output. The problem is that the zephyr gpio driver does not have a API for reading the state of a output device, it just sets it directly.&lt;/p&gt;
&lt;p&gt;I would recommend that you instead just print directly:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;LOG_INF(&amp;quot;Info&amp;quot;);
LOG_DBG(&amp;quot;Debug&amp;quot;);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Kconfig CONFIG_LOG_OVERRIDE_LEVEL=4 breaks logging system</title><link>https://devzone.nordicsemi.com/thread/390522?ContentTypeID=1</link><pubDate>Wed, 12 Oct 2022 21:01:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61b4a45d-a4e2-41b2-bfa6-1beab4b47b07</guid><dc:creator>wkpolara</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1185.main.c"&gt;devzone.nordicsemi.com/.../1185.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The &amp;quot;prj.conf&amp;quot; file won&amp;#39;t upload as that file type is not allowed, but the full contents are shown above in the original post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>