<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://test-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>Help with sleeping/low power mode on nRF5340</title><link>https://test-devzone.nordicsemi.com/f/nordic-q-a/87061/help-with-sleeping-low-power-mode-on-nrf5340</link><description>Hi, 
 I have been trying to follow the guidance here: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/optimizing-power-on-nrf53-designs 
 I&amp;#39;m using a custom board with NCS version 1.7.1 and VS Code. 
 I&amp;#39;ve been able to get my device to</description><dc:language>en-US</dc:language><generator>Telligent Community 13 Non-Production</generator><lastBuildDate>Thu, 21 Apr 2022 10:59:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://test-devzone.nordicsemi.com/f/nordic-q-a/87061/help-with-sleeping-low-power-mode-on-nrf5340" /><item><title>RE: Help with sleeping/low power mode on nRF5340</title><link>https://test-devzone.nordicsemi.com/thread/364189?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 10:59:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69677eda-b03b-4174-a909-486389172ae6</guid><dc:creator>user75734</dc:creator><description>&lt;p&gt;Hi again Glen&lt;/p&gt;
&lt;p&gt;You have just downloaded the project from the nRF53 power optimization blog post, right? You will need to edit the pm_power_state_set() function to allow I.E. the SUSPEND_TO_RAM state instead of just the SOFT_OFF state.&lt;/p&gt;
&lt;p&gt;In the latest nRFConnect SDK releases (1.9.1) there is a test project doing that&amp;nbsp;&lt;strong&gt;\NCS_FOLDER\v1.9.1\zephyr\tests\subsys\pm\device_wakeup_api\src\main.c&amp;nbsp;&lt;/strong&gt;here. Please give it a look.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with sleeping/low power mode on nRF5340</title><link>https://test-devzone.nordicsemi.com/thread/364025?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 16:32:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9c2bc5f-3542-429c-bc6e-096786603419</guid><dc:creator>user73356</dc:creator><description>&lt;p&gt;It&amp;#39;s not going to sleep at all.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Oh - I found the problem, but I don&amp;#39;t know the solution:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;pm_power_state_force calls&amp;nbsp;pm_state_set which calls&amp;nbsp;pm_power_state_set, and that function ONLY supports&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;PM_STATE_SOFT_OFF.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;__weak void pm_power_state_set(struct pm_state_info info)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; switch (info.state) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; case PM_STATE_SOFT_OFF:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nrf_regulators_system_off(NRF_REGULATORS);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; default:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LOG_DBG(&amp;quot;Unsupported power state %u&amp;quot;, info.state);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So how are you supposed to go to the various sleep states? I was hoping to use&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;PM_STATE_SUSPEND_TO_RAM.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;What I really need is to go to the lowest power state possible without losing my place in the code while waiting for a GPIO interrupt to wake me up (When you wake up from SOFT_OFF it&amp;#39;s like a system reset where you&amp;#39;ve lost everything - I want to continue from where I went to sleep).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;The spm.conf file is the configuration file for the Secure Partition Manager - I was just testing adding the power management configuration options to there in case that was required for going to low power mode when using a project with SPM.... turns out that wasn&amp;#39;t the issue. My main prj.conf does have the&amp;nbsp;CONFIG_PM_DEVICE setting and it&amp;#39;s fine.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with sleeping/low power mode on nRF5340</title><link>https://test-devzone.nordicsemi.com/thread/363862?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 10:44:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ac98eeb-33fb-488e-9cf9-e342d5a0bfbf</guid><dc:creator>user75734</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Can you describe how you see the immediate wake up when calling the STANDBY? Does the device go to sleep/idle mode at all? Can you also let me know what build error(s) you&amp;#39;re seeing if you set CONFIG_PM_DEVICE=y, because this should be enabled to let you do necessary power management operations like turning off device clocks and peripherals. Please also note that it should be set in the prj.conf file, what&amp;#39;s this spm.conf file you are using?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with sleeping/low power mode on nRF5340</title><link>https://test-devzone.nordicsemi.com/thread/363401?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2022 00:39:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b2338ea-f010-4218-9be4-a9eb9448ef7c</guid><dc:creator>user73356</dc:creator><description>&lt;p&gt;A bit more info: I tried adding these to my spm.conf file:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_PM&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_PM_DEVICE&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;With&amp;nbsp;CONFIG_PM_DEVICE in there it fails to build. With just&amp;nbsp;CONFIG_PM, it works - but it does not change anything about the behavior I described above.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>