<?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>System OFF not entered automatically</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97334/system-off-not-entered-automatically</link><description>I see in examples like here: 
 https://github.com/nrfconnect/sdk-nrf/blob/f68bcdf5b3ea479268593459aa4770059058780e/samples/nfc/system_off/src/main.c#L228 
 System OFF is actually prevented explicitly so I assume that without such ` pm_policy_state_lock_get</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Mar 2023 21:08:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97334/system-off-not-entered-automatically" /><item><title>RE: System OFF not entered automatically</title><link>https://devzone.nordicsemi.com/thread/413642?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2023 21:08:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9ba618c-3e10-4612-a3d5-2dd23cdd803e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="113092" url="~/f/nordic-q-a/97334/system-off-not-entered-automatically"]System OFF is actually prevented explicitly so I assume that without such `&lt;span&gt;pm_policy_state_lock_get` call, system off would be entered automatically.&lt;/span&gt;[/quote]
&lt;p&gt;I agree, the implementation does suggest that the system will enter &amp;quot;System OFF&amp;quot; mode automatically unless you block the &amp;#39;PM_STATE_SOFT_OFF&amp;#39; state with&amp;nbsp;pm_policy_state_lock_get(). However,&amp;nbsp;because we do not define any &amp;#39;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/3659017be177de2902e361b7635575bb6a6125e5/dts/bindings/cpu/cpu.yaml#L12"&gt;cpu-power-states&amp;#39;&lt;/a&gt;&amp;nbsp;for our CPUs, the&amp;nbsp;pm_system_suspend() call in the idle thread will always end up returning false here:&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/3659017be177de2902e361b7635575bb6a6125e5/kernel/idle.c#L82"&gt;link&lt;/a&gt;&amp;nbsp;and cause the system to enter sleep with&amp;nbsp;&lt;span&gt;k_cpu_idle() instead. And&amp;nbsp;&lt;/span&gt;&lt;span&gt;k_cpu_idle() will make the system enter&amp;nbsp;&lt;a title="System ON mode" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/power.html?cp=5_0_0_4_2_3#unique_413229135"&gt;System ON mode&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I think the&amp;nbsp;&amp;#39;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/3659017be177de2902e361b7635575bb6a6125e5/dts/bindings/cpu/cpu.yaml#L12"&gt;cpu-power-states&lt;/a&gt;&amp;#39; property makes&amp;nbsp;more sense&amp;nbsp;for other CPU architectures where there are more than 2 sleep states available.&amp;nbsp;When the nRF is in system OFF, it can only be woken up through an external input,&amp;nbsp;and this will prevent the scheduler from scheduling the next wakeup.&amp;nbsp;&lt;/span&gt;&amp;nbsp;&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>