<?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>Enabling PM for blinky example on NRF9160 DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117915/enabling-pm-for-blinky-example-on-nrf9160-dk</link><description>Hi there, 
 
 I am new to the platform , we are working on a proof of concept to reduce idle power consumption as low as possible on an NRF9160, I want to put the system in system off mode using pm_power_state_force and then wake it up with an interrupt</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Jan 2025 11:34:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117915/enabling-pm-for-blinky-example-on-nrf9160-dk" /><item><title>RE: Enabling PM for blinky example on NRF9160 DK</title><link>https://devzone.nordicsemi.com/thread/518421?ContentTypeID=1</link><pubDate>Wed, 15 Jan 2025 11:34:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1317bec0-2510-4451-ac7d-5dc13433bbeb</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Unfortunately, it is not possible to have a timer running in System Off mode, and hence, it can not be used to wake up the device. The possible wake-up sources are listed here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf9160/page/chapters/pmu/doc/operationmodes/system_off_mode.html"&gt;https://docs.nordicsemi.com/bundle/ps_nrf9160/page/chapters/pmu/doc/operationmodes/system_off_mode.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So if you want to wake up on a timer, you need to use &lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf9160/page/chapters/pmu/doc/operationmodes/system_on_mode.html"&gt;System On mode&lt;/a&gt;, which is a lighter form of sleep. This is the default state when the CPU is not actually running. So if you e.g. calls: k_sleep(K_MSEC(1000)); then it will set up a timer interrupt 1 second ahead, and enter system on mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In reality, it is a bit more complex, since you can have several threads in Zephyr, but when all threads are done with their tasks for now, it will automatically enter sleep/system on mode automatically.&lt;/p&gt;
&lt;p&gt;From system on mode, any interrupt will wake the device, and the application is not reset on wakeup.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling PM for blinky example on NRF9160 DK</title><link>https://devzone.nordicsemi.com/thread/517976?ContentTypeID=1</link><pubDate>Fri, 10 Jan 2025 14:54:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef28002d-88a0-4f2b-a121-4945bdeaff11</guid><dc:creator>devMV</dc:creator><description>&lt;p&gt;Hi Edwin, you are correct , it was renamed, however from&amp;nbsp;SDK version 2.5.0 the PM subsystem was removed altogether. See:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/106057/ncs-2-5-0-nrf9160-pm"&gt;NCS 2.5.0 NRF9160 PM discussion&lt;/a&gt;&amp;nbsp;. I got an older version , added the PM call to go into system off mode and was successful, I can wake with button press but I can see that it is impossible to wake with a timer , which is&amp;nbsp; a requirement, do you have any suggestions to minimize power consumption?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling PM for blinky example on NRF9160 DK</title><link>https://devzone.nordicsemi.com/thread/517963?ContentTypeID=1</link><pubDate>Fri, 10 Jan 2025 14:20:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:574149d1-c499-4b53-a36f-00060131bcdc</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]The issue is that when i try to set&amp;nbsp;&lt;span&gt;CONFIG_PM=y, in the project config file, i see the warning&lt;/span&gt;[/quote]
&lt;p&gt;Try using CONFIG_PM_DEVICE=y instead of CONFIG_PM=y.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I see from zephyr&amp;#39;s release notes that:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  * The following functions were renamed:

    * :c:func:`pm_power_state_next_get()` is now :c:func:`pm_state_next_get()`
    * :c:func:`pm_power_state_force()` is now :c:func:`pm_state_force()`&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Sp perhaps you need to use pm_state_force() instead of pm_power_state_force().&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, you can also use&amp;nbsp;sys_poweroff(), as demonstrated in the sample you can find in:&lt;/p&gt;
&lt;p&gt;NCS\zephyr\samples\boards\nordic\system_off. It is a small sample that just writes a few lines to the UART console, before disabling the uart, setting a gpio/button for wakeup, and enters system off.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>