<?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>Using nrf_regulators_system_off in newer Connect SDKs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80552/using-nrf_regulators_system_off-in-newer-connect-sdks</link><description>I am having difficulty getting the nrf_regulators_system_off function to work correctly on newer versions of the Connect SDK. 
 In earlier versions v1.3 and such, the call would power down the 9160 to a very low current draw. Now, when I use it, i see</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Sep 2024 08:12:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80552/using-nrf_regulators_system_off-in-newer-connect-sdks" /><item><title>RE: Using nrf_regulators_system_off in newer Connect SDKs</title><link>https://devzone.nordicsemi.com/thread/502440?ContentTypeID=1</link><pubDate>Fri, 13 Sep 2024 08:12:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd7d92f7-d004-4144-b874-993a9957a1e9</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Glad to hear that you found help in this thread. If you run into any issues or have questions, please feel free to contact us. I hope you have a wonderful weekend when that time comes!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nrf_regulators_system_off in newer Connect SDKs</title><link>https://devzone.nordicsemi.com/thread/502403?ContentTypeID=1</link><pubDate>Fri, 13 Sep 2024 00:00:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e810a824-40f1-4194-b873-3b1ad8eea988</guid><dc:creator>ben</dc:creator><description>&lt;p&gt;Just wanted to say thanks for this thread, it helped me a bunch&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nrf_regulators_system_off in newer Connect SDKs</title><link>https://devzone.nordicsemi.com/thread/334281?ContentTypeID=1</link><pubDate>Fri, 15 Oct 2021 08:43:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb5f4395-65f5-4358-a07f-4816a91b57d9</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Doug,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m glad to hear that you found a solution to the issue.&lt;/p&gt;
[quote user="dboling"]Once the call to nrf_modem_lib_init was made, I was able to get the power levels expected. The interesting thing is that the init call is required even if the device goes immediately into power down after a reset. My code detects a power down request, set a flag in the flash, resets the 9160 and powers down upon return. The change in behavior in the v1.3.0 modem firmware caught me unaware.[/quote]
&lt;p&gt;My apologies for the inconvenience this caused! the modem is awaiting commands from the application, ie. a&amp;nbsp;initialization, which accounts for this added consumption.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nrf_regulators_system_off in newer Connect SDKs</title><link>https://devzone.nordicsemi.com/thread/334235?ContentTypeID=1</link><pubDate>Thu, 14 Oct 2021 18:03:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a32bd51-0ab3-4317-a954-f737e17b626c</guid><dc:creator>dboling</dc:creator><description>&lt;p&gt;H&amp;aring;kon,&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve discovered my issue has nothing to do with power down call.&lt;/p&gt;
&lt;p&gt;The problem was a failure to initialize the NRF Modem library. The old modem firmware (1.2.3 and before) responded well to a non-init of the modem/bsd library if I was only powering down. The new modem firmware, not so much.&lt;/p&gt;
&lt;p&gt;Once the call to nrf_modem_lib_init was made, I was able to get the power levels expected. The interesting thing is that the init call is required even if the device goes immediately into power down after a reset. My code detects a power down request, set a flag in the flash, resets the 9160 and powers down upon return. The change in behavior in the v1.3.0 modem firmware caught me unaware.&lt;/p&gt;
&lt;p&gt;Thanks for your help.&lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nrf_regulators_system_off in newer Connect SDKs</title><link>https://devzone.nordicsemi.com/thread/334098?ContentTypeID=1</link><pubDate>Thu, 14 Oct 2021 10:20:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d72ad5a5-7e4a-42d8-a95a-98f50e14a666</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="dboling"]OK, I&amp;#39;ll continue to work on it. One point, the initial code you pointed me was for the nrf52, not the 91. Is there an equivalent sample for the 91? Thanks.[/quote]
&lt;p&gt;The sequence is similar for all nRF devices. You&amp;#39;ll need to disable CONFIG_SERIAL in prj.conf, and in spm in order to use the sample.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="dboling"]&lt;p&gt;One other point. Calling &lt;span style="color:rgba(0, 0, 0, 1);font-family:inherit;font-size:inherit;"&gt;nrf_regulators_system_off &lt;/span&gt;results in exactly the same current as calling k_sleep with a Forever flag. Seems like I&amp;#39;m missing something.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;This isn&amp;#39;t that strange, as there&amp;#39;s&amp;nbsp;a very small difference between the two:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf9160/_tmp/alta.nRF9160/autodita/CURRENT/parameters.id_current_sleep.html?cp=2_0_0_4_5_0_1"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf9160/_tmp/alta.nRF9160/autodita/CURRENT/parameters.id_current_sleep.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nrf_regulators_system_off in newer Connect SDKs</title><link>https://devzone.nordicsemi.com/thread/334013?ContentTypeID=1</link><pubDate>Wed, 13 Oct 2021 21:33:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f2dd885-a195-4588-8644-119cac32d154</guid><dc:creator>dboling</dc:creator><description>&lt;p&gt;One other point. Calling &lt;span style="color:rgba(0, 0, 0, 1);font-family:inherit;font-size:inherit;"&gt;nrf_regulators_system_off &lt;/span&gt;results in exactly the same current as calling k_sleep with a Forever flag. Seems like I&amp;#39;m missing something.&lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nrf_regulators_system_off in newer Connect SDKs</title><link>https://devzone.nordicsemi.com/thread/333965?ContentTypeID=1</link><pubDate>Wed, 13 Oct 2021 13:36:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a5c25c7-2dc3-4983-a9f7-b6a6e6c611da</guid><dc:creator>dboling</dc:creator><description>&lt;p&gt;OK, I&amp;#39;ll continue to work on it. One point, the initial code you pointed me was for the nrf52, not the 91. Is there an equivalent sample for the 91? Thanks.&lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nrf_regulators_system_off in newer Connect SDKs</title><link>https://devzone.nordicsemi.com/thread/333928?ContentTypeID=1</link><pubDate>Wed, 13 Oct 2021 12:12:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:109aca4f-6d1b-4713-ac61-3e27d4ef122b</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Doug,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is hard to say what happens here, because the external devices are affecting the sleep current. This means that you have to ensure that any GPIOs going to external devices must be set to &amp;quot;idle&amp;quot; state before entering systemoff mode.&lt;/p&gt;
[quote user="dboling"]Thanks for the response. Perhaps I wasn&amp;#39;t clear, the problem is controlling power from a non-secure app. [/quote]
&lt;p&gt;The NRF_REGULATORS register is by default set to non-secure:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/master/subsys/spm/Kconfig#L289"&gt;https://github.com/nrfconnect/sdk-nrf/blob/master/subsys/spm/Kconfig#L289&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I do not think this is the issue. If it were permissions problem, you will have seen a fault occurring.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nrf_regulators_system_off in newer Connect SDKs</title><link>https://devzone.nordicsemi.com/thread/333799?ContentTypeID=1</link><pubDate>Tue, 12 Oct 2021 21:31:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9891f319-0149-42de-ad66-1fada23d433d</guid><dc:creator>dboling</dc:creator><description>&lt;p&gt;For another data point, I ported my app to a Thingy91. In the &amp;quot;power down mode&amp;quot; it&amp;#39;s still drawing 170uA. I suspect that&amp;#39;s far too high.&lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nrf_regulators_system_off in newer Connect SDKs</title><link>https://devzone.nordicsemi.com/thread/333788?ContentTypeID=1</link><pubDate>Tue, 12 Oct 2021 16:55:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5a4cb15-a027-46da-9a4c-6c75548d8ed2</guid><dc:creator>dboling</dc:creator><description>&lt;p&gt;Thanks for the response. Perhaps I wasn&amp;#39;t clear, the problem is controlling power from a non-secure app. The examples you reference seem to be compiled for secure mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As far as power differences, my board has some extra stuff on it so I can&amp;#39;t give absolute numbers. However, the difference between what used to work and the current builds is around 240 uA.&lt;/p&gt;
&lt;p&gt;Doug&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using nrf_regulators_system_off in newer Connect SDKs</title><link>https://devzone.nordicsemi.com/thread/333726?ContentTypeID=1</link><pubDate>Tue, 12 Oct 2021 12:06:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40517b9d-d66b-405b-872d-53d95730227c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Doug,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]&lt;p&gt;I am having difficulty getting the &lt;span style="color:rgba(0, 0, 0, 1);font-family:inherit;font-size:inherit;"&gt;nrf_regulators_system_off function to work correctly on newer versions of the Connect SDK. &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:rgba(0, 0, 0, 1);font-family:inherit;font-size:inherit;"&gt;In earlier versions v1.3 and such, the call would power down the 9160 to a very low current draw. Now, when I use it, i see a power draw compatible to all threads idle.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:rgba(0, 0, 0, 1);font-family:inherit;font-size:inherit;"&gt;I suspect this has something to do with the rearchitecting of the SPM configuration file and that I&amp;#39;m not successfully granting non-secure rights to the power regulators but I&amp;#39;m not sure. All the posts on this topic (that I&amp;#39;ve found) are relatively old and reference older SDK versions. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:rgba(0, 0, 0, 1);font-family:inherit;font-size:inherit;"&gt;It would be quite helpful to have a simple modern, example that compiled for the latest SDKs (I&amp;#39;m on v1.6.1 but v1.7 is fine) that powered off the 9160 and restarted it with a button press.&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;This example shows the usage of systemoff using the pm library:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/master/samples/boards/nrf/system_off/src/main.c#L93"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/master/samples/boards/nrf/system_off/src/main.c#L93&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which effectively calls nrf_regulators_system_off here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.6.99-ncs1/soc/arm/nordic_nrf/nrf91/power.c#L19"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.6.99-ncs1/soc/arm/nordic_nrf/nrf91/power.c#L19&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]In earlier versions v1.3 and such, the call would power down the 9160 to a very low current draw. Now, when I use it, i see a power draw compatible to all threads idle.[/quote]
&lt;p&gt;How much do you see now?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>