<?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>`nrf_pwr_mgmt_run` returns immediately, and the return value is 0.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/127929/nrf_pwr_mgmt_run-returns-immediately-and-the-return-value-is-0</link><description>I used nRF52840 with nRF5 SDK 17.1.0 
 Also use freeRTOS from example &amp;quot;ble_app_hrs_freertos&amp;quot; 
 
 I need implement System-On mode deepsleep mode. So I use nrf_pwr_mgmt_run API in my main task. 
 bool System_Sleep(void) { Log(&amp;quot;%s: +&amp;quot;, __func__); 
 uint32_t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Apr 2026 18:24:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/127929/nrf_pwr_mgmt_run-returns-immediately-and-the-return-value-is-0" /><item><title>RE: `nrf_pwr_mgmt_run` returns immediately, and the return value is 0.</title><link>https://devzone.nordicsemi.com/thread/565561?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2026 18:24:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3045e13c-6b04-4fcf-910c-1578e8f3865d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;FreeRTOS provides&amp;nbsp;&lt;span&gt;vApplicationIdleHook to give you safe time to go to low power modes? You can call nrf_pwr_mgmt_run in that instead.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Or as mentioned in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/120802/nrf52810-will-not-enter-deep-sleep-system-level-power-management"&gt;this&lt;/a&gt;&amp;nbsp;just before calling nrf_pwr_mgmt_run, for debug reasons, print to see any pending IRQs keeping the system awake.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;for (int i = 0; i &amp;lt; 32; i++) {
    if (NVIC_GetPendingIRQ(i)) {
        printk(&amp;quot;IRQ %d is pending\n&amp;quot;, i);
    }
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: `nrf_pwr_mgmt_run` returns immediately, and the return value is 0.</title><link>https://devzone.nordicsemi.com/thread/565519?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2026 08:10:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc60be37-e2a0-47e9-8655-acab12b3590f</guid><dc:creator>Jack.Hong</dc:creator><description>&lt;p&gt;I hope you understand why I need to use the nRF5 SDK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I used UART for logging and other one, so I add unint UARTE and TWI before &lt;span&gt;nrf_pwr_mgmt_run&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;But still immediately return from&amp;nbsp;&lt;code&gt;nrf_pwr_mgmt_run&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: `nrf_pwr_mgmt_run` returns immediately, and the return value is 0.</title><link>https://devzone.nordicsemi.com/thread/565515?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2026 07:30:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d6412f0-e776-44c4-9842-90f283332a4e</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Note that support for this SDK stopped quite a while ago, you want to upgrade to NCS SDK.&lt;/p&gt;
&lt;p&gt;What logging method do you use? Logging UART may still be active and would keep the MCU core from sleeping.&lt;/p&gt;
&lt;p&gt;Also check if&amp;nbsp;&lt;code&gt;nrf_pwr_mgmt_run&lt;/code&gt; actually knows how to skip FPU exceptions (see other sample code how). Don&amp;#39;t remember the RTOS code well enough here, but pending FPU exceptions will keep the core running.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>