<?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>Issues with CONFIG settings not being enabled in NCS V2.6.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110086/issues-with-config-settings-not-being-enabled-in-ncs-v2-6-0</link><description>I&amp;#39;m in the process of upgrading from V2.2.0 to V2.6.0 of NCS. Not surpringly, I&amp;#39;m having issues with building firmware that used to &amp;quot;just work&amp;quot;. I&amp;#39;ve got another ticket open in regards to this, but have moved over to another set of my firmware that used</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Apr 2024 04:44:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110086/issues-with-config-settings-not-being-enabled-in-ncs-v2-6-0" /><item><title>RE: Issues with CONFIG settings not being enabled in NCS V2.6.0</title><link>https://devzone.nordicsemi.com/thread/478172?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2024 04:44:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdefa136-2cbf-4773-8b08-5d939c81fe0b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Excellent - glad to hear that it fixed it.&amp;nbsp;&lt;/p&gt;
[quote user="Mike Austin (LPI)"]I probably need to learn how to trawl through Zephyr and NCS commits to keep abreast of changes with each new release as I&amp;#39;d then be able to pre-empt a few of these issues next time I need to upgrade my SDK[/quote]
&lt;p&gt;I&amp;nbsp;often use the search function in VS Code. For instance, I&amp;nbsp;found usage examples of the sys_poweroff() function by searching for it across the *.c files&amp;nbsp;in the SDK tree.&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/pastedimage1712810231965v1.png" alt=" " /&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I also use the&amp;nbsp;&lt;a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens"&gt;GitLens&lt;/a&gt;&amp;nbsp;extension to help find relevant commits.&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><item><title>RE: Issues with CONFIG settings not being enabled in NCS V2.6.0</title><link>https://devzone.nordicsemi.com/thread/478151?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2024 22:07:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5dfef9dc-915b-4b3f-bf28-d749a5aa473f</guid><dc:creator>Mike Austin (LPI)</dc:creator><description>&lt;p&gt;Fantatic - that&amp;#39;s fixed my SYS_INIT issues.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I probably need to learn how to trawl through Zephyr and NCS commits to keep abreast of changes with each new release as I&amp;#39;d then be able to pre-empt a few of these issues next time I need to upgrade my SDK&lt;/p&gt;
&lt;p&gt;Thanks for your help Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with CONFIG settings not being enabled in NCS V2.6.0</title><link>https://devzone.nordicsemi.com/thread/478062?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2024 12:36:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd6a7689-ae91-4116-ab79-cd054121f5b2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Mike,&lt;/p&gt;
&lt;p&gt;Changing the function to declaration to &amp;#39;static int detect_wakeup_latch(&lt;strong&gt;void&lt;/strong&gt;)&amp;#39; and removing the&amp;nbsp;ARG_UNUSED(dev); line should remove the warning.&lt;/p&gt;
&lt;p&gt;Relevant commit:&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://github.com/nrfconnect/sdk-zephyr/commit/a5fd0d184a15d0af52599e0f5f5af880f353c6d4"&gt;https://github.com/nrfconnect/sdk-zephyr/commit/a5fd0d184a15d0af52599e0f5f5af880f353c6d4&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with CONFIG settings not being enabled in NCS V2.6.0</title><link>https://devzone.nordicsemi.com/thread/478056?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2024 12:21:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e942137-6661-4318-adfa-939dc16492ef</guid><dc:creator>Mike Austin (LPI)</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;OK, that&amp;nbsp;&lt;span&gt;#include &amp;lt;zephyr/sys/poweroff.h&amp;gt; was what I needed!&amp;nbsp; That seems to have sorted out the error around the sys_poweroff().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Those SYS_INIT() calls haven&amp;#39;t changed from the version that built OK under NCS V2.2.0.&amp;nbsp; This is what I have setup:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* Grabs contents of RESETREAS and LATCH registers  */
static int detect_wakeup_latch(const struct device *dev)
{
	ARG_UNUSED(dev);

	/* Check status of RESETREAS register to determine what caused exit from System OFF */
	/* 0x0001 = Reset pin 
	 * 0x0002 = Watchdog
	 * 0x0004 = Software
	 * 0x0008 = CPU Lockup
	 * 0x10000 = Wakeup from System Off via DETECT from GPIO
	 * 0x20000 = Wakeup from System Off via ANADETECT from LPCOMP
	 * 0x40000 = Wakeup from System Off via Debug mode
	 * 0x80000 = Wakeup from System Off via NFC
	*/
	reset_reason = NRF_POWER-&amp;gt;RESETREAS;
	(void)NRF_TIMER0-&amp;gt;EVENTS_COMPARE[0];

	/* Record status of LATCH register to check with GPIO triggered exit from System OFF (if applicable) */
	gpio_trigger = NRF_GPIO-&amp;gt;LATCH;
	
	/* Disable inputs from affecting the DETECT signal, which should preserve LATCH and prevent spurious interrupts */
	gpio_pin_trig_disable();

	return (0);
}

/* Prevent deep sleep (system off) from being entered on long timeouts
 * or `K_FOREVER` due to the default residency policy.
 *
 * This has to be done before anything tries to sleep, which means
 * before the threading system starts up between PRE_KERNEL_2 and
 * POST_KERNEL.  Do it at the start of PRE_KERNEL_2.
 */
static int disable_ds_1(const struct device *dev)
{
	ARG_UNUSED(dev);

	pm_policy_state_lock_get(PM_STATE_SOFT_OFF,PM_ALL_SUBSTATES);

	return 0;
}

SYS_INIT(detect_wakeup_latch, PRE_KERNEL_2, 0);
SYS_INIT(disable_ds_1, PRE_KERNEL_1, 0);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What I&amp;#39;m trying to do is grab details of which GPIO has triggered the device out of SYSTEM_OFF.&amp;nbsp; The disable_ds_1() function is something I think I blindly copied from somewhere when I was getting the SYSTEM_OFF stuff working 12 months or so ago.&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;Mike&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with CONFIG settings not being enabled in NCS V2.6.0</title><link>https://devzone.nordicsemi.com/thread/478036?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2024 11:45:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9c042d4-3158-4a4e-a932-c28042bd49d3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry to hear you have had this many challenges with the migration. Support for the PM subsystem was removed in SDK v2.5.0. The&amp;nbsp;reasoning&amp;nbsp;for this change was given in the commit message here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/commit/96b38273138f05dd06cf7a58fa361f401e773e5e"&gt;https://github.com/nrfconnect/sdk-zephyr/commit/96b38273138f05dd06cf7a58fa361f401e773e5e&lt;/a&gt;. Unfortunately, this change was not mentioned in the release notes or migration documentation.&lt;/p&gt;
[quote user=""]So, that looks like rather than needing to have CONFIG_PM=y in my proj.conf, I need to have CONFIG_POWEROFF=y.&amp;nbsp; And then, rather than call pm_state_force(), I have to call sys_poweroff().[/quote]
&lt;p&gt;In addition to enabling CONFIG_POWEROFF, did you include the poweroff.h header (#include &amp;lt;zephyr/sys/poweroff.h&amp;gt;) in the source file that calls the function?&lt;/p&gt;
[quote user=""]I&amp;#39;m also getting a bunch of build warnings around including the &amp;lt;zephyr/init.h&amp;gt; header file that I can&amp;#39;t make sense o[/quote]
&lt;p&gt;The warnings&amp;nbsp;seems to stem from your SYS_INIT() calls, indicating that the initialization functions are not declared with the expected type. Or is detect_wakeup_latch() declared like this: static int detect_wakeup_latch(void)?&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>