<?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>defconfig takes precedent over prj_release.conf</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107735/defconfig-takes-precedent-over-prj_release-conf</link><description>I am using an NRF52DK with NCS 2.5.1. 
 I was struggling to measure system shutoff power, noting that even the systemoff examples were giving static currents around 200uA. 
 I eventually found that CONFIG_SERIAL was being set to &amp;#39;y&amp;#39;, even though it was</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 08 Mar 2024 12:24:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107735/defconfig-takes-precedent-over-prj_release-conf" /><item><title>RE: defconfig takes precedent over prj_release.conf</title><link>https://devzone.nordicsemi.com/thread/472935?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2024 12:24:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0699477-1c3b-415b-a228-c6eead88bae1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;This depends on how the project is set up. I assume the prj_[buildtype].conf files only contain debug-related Kconfig settings in your case. That would explain why you need to merge the configuration with prj.conf. Normally, when you use &amp;#39;Release&amp;#39; and &amp;#39;Debug&amp;#39; build configurations, you should have one prj_debug.conf file that defines all the symbols needed for the debug build, and another prj_release.conf to build the release build.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/configuring_app/advanced_building.html#configuring-build-types"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/configuring_app/advanced_building.html#configuring-build-types&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: defconfig takes precedent over prj_release.conf</title><link>https://devzone.nordicsemi.com/thread/472833?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2024 22:03:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9be91a75-60f7-49aa-924b-f216f7dd62c3</guid><dc:creator>underpickled</dc:creator><description>&lt;p&gt;I think what I didn&amp;#39;t realize is that you need both prj.conf in addition to prj_[buildtype].conf. Thanks for clearing that up!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: defconfig takes precedent over prj_release.conf</title><link>https://devzone.nordicsemi.com/thread/466112?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2024 19:58:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec648071-464e-4927-9640-d0894f025ef6</guid><dc:creator>Vidar Berg</dc:creator><description>[quote userid="103271" url="~/f/nordic-q-a/107735/defconfig-takes-precedent-over-prj_release-conf/466110"]Do I still need to disable that GPIO specifically if I have &amp;#39;CONFIG_SERIAL=n&amp;#39; set?[/quote]
&lt;p&gt;No, following a reset, all GPIOs are configured as inputs with the input buffer disconnected, meaning that the pin must be re-configured as an input with the input buffer connected by a driver or similar for leakage to become an issue. So, I think we need to figure out why the default &amp;#39;CONFIG_SERIAL&amp;#39; setting from &amp;#39;nrf52dk_nrf52832_defconfig&amp;#39; is being applied instead of the configuration specified in your &amp;#39;prj.conf/prj_release.conf&amp;#39; file.&lt;/p&gt;
[quote userid="103271" url="~/f/nordic-q-a/107735/defconfig-takes-precedent-over-prj_release-conf/466110"]Sorry if this wasn&amp;#39;t clear in the original post, but I did have that set in prj.conf, but it wasn&amp;#39;t until I set it to that in the defconfig also that the current went away. Depending on your answer to the bit about the UART GPIO, maybe that could be what&amp;#39;s going on, but it&amp;#39;s very strange that the settings in prj.conf don&amp;#39;t handle it.[/quote]
&lt;p&gt;Thank you for the clarification. I understood that you needed to change the default value in defconfig to disable &amp;#39;CONFIG_SERIAL.&amp;#39; However, I assumed that you had two Kconfig fragments in your project source directory: &amp;#39;prj.conf&amp;#39; and &amp;#39;prj_release.conf.&amp;#39; And my initial suspicion was that perhaps you added &amp;#39;CONFIG_SERIAL=n&amp;#39; to the latter, but that this configuration file was not the one actually used in your build.&amp;nbsp;&lt;span style="font-family:inherit;"&gt;This is why I was asking earlier&amp;nbsp;if you could verify whether the other settings in &amp;#39;prj_release.conf&amp;#39; was being applied or not.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Below are some screenshots showing how I would disable &amp;#39;CONFIG_SERIAL&amp;#39; in a fresh project. Please let me know if you notice any differences in our approaches.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span style="font-family:inherit;"&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1706212171902v1.png" alt=" " /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1706212229599v2.png" alt=" " /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1706212288732v3.png" alt=" " /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span style="font-family:inherit;"&gt;Note: The extension&amp;nbsp;may warn you that &amp;#39;CONFIG_SERIAL&amp;#39; is already set to &amp;#39;y&amp;#39; in defconfig. However, the symbol value from &amp;#39;prj.conf&amp;#39;&amp;nbsp;should take precedence, as confirmed by&amp;nbsp;my&amp;nbsp;.config output above.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span style="font-family:inherit;"&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1706212676022v4.png" alt=" " /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: defconfig takes precedent over prj_release.conf</title><link>https://devzone.nordicsemi.com/thread/466110?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2024 19:24:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1071685c-f33f-472f-912e-ce7453a90324</guid><dc:creator>underpickled</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/107735/defconfig-takes-precedent-over-prj_release-conf/466108"]This applies to GPIOs assigned to peripherals as well, such as the UART RX pin in this case (it is configured as an input by the serial driver).&amp;nbsp;[/quote]
&lt;p&gt;Do I still need to disable that GPIO specifically if I have &amp;#39;CONFIG_SERIAL=n&amp;#39; set?&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/107735/defconfig-takes-precedent-over-prj_release-conf/466108"]Alternatively, you could try adding &amp;#39;CONFIG_SERIAL=n&amp;#39; to the prj.conf file to see if that makes any difference.&amp;nbsp;[/quote]
&lt;p&gt;Sorry if this wasn&amp;#39;t clear in the original post, but I did have that set in prj.conf, but it wasn&amp;#39;t until I set it to that in the defconfig also that the current went away. Depending on your answer to the bit about the UART GPIO, maybe that could be what&amp;#39;s going on, but it&amp;#39;s very strange that the settings in prj.conf don&amp;#39;t handle it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: defconfig takes precedent over prj_release.conf</title><link>https://devzone.nordicsemi.com/thread/466108?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2024 19:04:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b021195-44fb-4df5-9432-933202829ebb</guid><dc:creator>Vidar Berg</dc:creator><description>[quote userid="103271" url="~/f/nordic-q-a/107735/defconfig-takes-precedent-over-prj_release-conf/466107"]I did see this mentioned in another ticket, but I&amp;#39;m not using any GPIO in my code (other than ADC and NFC functionality). [/quote]
&lt;p&gt;This applies to GPIOs assigned to peripherals as well, such as the UART RX pin in this case (it is configured as an input by the serial driver).&amp;nbsp;&lt;/p&gt;
[quote userid="103271" url="~/f/nordic-q-a/107735/defconfig-takes-precedent-over-prj_release-conf/466107"]I still tried disabling GPIO altogether in the .conf file and marking all the GPIO/SPI/I2C disabled in my devicetree overlay. I even flashed the NFC-system-off sample project and found the same behavior. The current only went away when I disabled serial in the defconfig.[/quote]
&lt;p&gt;This is strange. It is not something I have encountered before.&amp;nbsp;&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/107735/defconfig-takes-precedent-over-prj_release-conf/465991"]Could you please check the .config output in build/zephyr to verify if the other configurations from prj_release.conf were applied successfully? Is it possible that prj_release.conf was not being used?[/quote]
&lt;p&gt;Alternatively, you could try adding &amp;#39;CONFIG_SERIAL=n&amp;#39; to the prj.conf file to see if that makes any difference.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: defconfig takes precedent over prj_release.conf</title><link>https://devzone.nordicsemi.com/thread/466107?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2024 18:52:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd933f84-e31b-48fe-82c6-24636493e5fd</guid><dc:creator>underpickled</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/107735/defconfig-takes-precedent-over-prj_release-conf/465991"]~200 uA is the typical leakage current if you have a floating input (GPIO states are&amp;nbsp;retained in System OFF).&amp;nbsp;[/quote]
&lt;p&gt;I did see this mentioned in another ticket, but I&amp;#39;m not using any GPIO in my code (other than ADC and NFC functionality). I still tried disabling GPIO altogether in the .conf file and marking all the GPIO/SPI/I2C disabled in my devicetree overlay. I even flashed the NFC-system-off sample project and found the same behavior. The current only went away when I disabled serial in the defconfig. I actually did check the build/zephyr/.config file and found that serial did not seem to be enabled there, which was also very strange.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: defconfig takes precedent over prj_release.conf</title><link>https://devzone.nordicsemi.com/thread/465991?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2024 12:30:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de3d497e-57d4-4c1a-91db-49b926fb84b9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;~200 uA is the typical leakage current if you have a floating input (GPIO states are&amp;nbsp;retained in System OFF).&amp;nbsp;&lt;/p&gt;
[quote user=""]my understanding was that the defconfig file was supposed to set some baseline default settings and that the prj_release.conf file should take precedent. [/quote]
&lt;p&gt;Your understanding is correct, and I&amp;#39;m not sure why this&amp;nbsp;happened in your build. The default settings from the board file should not take precedence over the Kconfig settings applied by the application.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0312.pastedimage1706185722492v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.1/zephyr/build/kconfig/setting.html#the-initial-configuration"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.1/zephyr/build/kconfig/setting.html#the-initial-configuration&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you please check the .config output in build/zephyr to verify if the other configurations from prj_release.conf were applied successfully? Is it possible that prj_release.conf was not being used?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>