<?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>Power saving.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96673/power-saving</link><description>Hello, 
 
 I am currently working on a project where i have to sample with sensors a few times per day. But it is battery powered and I have limited capacity. 
 Now my question is if anyone has got any power saving tips for me. 
 
 Does anyone know how</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Feb 2023 11:36:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96673/power-saving" /><item><title>RE: Power saving.</title><link>https://devzone.nordicsemi.com/thread/411079?ContentTypeID=1</link><pubDate>Tue, 21 Feb 2023 11:36:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:493f1ec7-b726-46d6-966e-f809ddcb4731</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;The DK has some other leakages, so you typically will not be able to measure 2 uA on the DK in system ON sleep, which is the number for the SoC itself. (These are so low numbers anyway though, so if it is for power optimizing your application I would not think about it, as the DK itself contributes, and also there will be some variations from chip to chip.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power saving.</title><link>https://devzone.nordicsemi.com/thread/411059?ContentTypeID=1</link><pubDate>Tue, 21 Feb 2023 10:00:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:082653d5-6855-4a1b-86e6-e7cd2dc411b6</guid><dc:creator>Chriis</dc:creator><description>&lt;p&gt;Thanks!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Right now I am measuring the NRF52 DK board. I measure 4,2 uA with System ON sleep. I got lfclk xtal, rtc and full ram retention running. The spec sheet said that it would be about 2 uA. What do you think would&amp;nbsp;you suggest can be an issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power saving.</title><link>https://devzone.nordicsemi.com/thread/410876?ContentTypeID=1</link><pubDate>Mon, 20 Feb 2023 12:44:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9e6835c-2828-4ebd-b78a-70684a15bdf6</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Chriis"] Is there anything I need to look out for in terms of putting the chip into SYSTEM ON sleep?[/quote]
&lt;p&gt;As long as you don&amp;#39;t use the SoftDevice (which it does not seem like from this snippet), then the way you enter system on mode is good.&lt;/p&gt;
[quote user="Chriis"]Also, what is necessary to meassure the current being used by the nRF52832 on the PCA10040?[/quote]
&lt;p&gt;See &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52832_dk/UG/dk/hw_measure_current.html"&gt;Measuring current&lt;/a&gt;.&lt;/p&gt;
[quote user="Chriis"]If I put something before the WFE function, like a GPIO function that will toggle a led. Will it toggle the led, go to sleep until the systeem gets an interupt, toggle led, go to sleep until interupt, and loop like that?[/quote]
&lt;p&gt;Yes, that is correct. When you call WFE in the main loop like this, the CPU will enter idle every time the main loops runs, and it will run every time after an interrupt has been processed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power saving.</title><link>https://devzone.nordicsemi.com/thread/410844?ContentTypeID=1</link><pubDate>Mon, 20 Feb 2023 10:21:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75942679-51ee-48e5-9bdc-fcf028f59e4e</guid><dc:creator>Chriis</dc:creator><description>&lt;p&gt;Yeah currently I am using SEGGER embedded. Is there anything I need to look out for in terms of putting the chip into SYSTEM ON sleep?&lt;/p&gt;
&lt;p&gt;Also, what is necessary to meassure the current being used by the nRF52832 on the PCA10040?&lt;br /&gt;&lt;br /&gt;And lastly something about the __WFE() function.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Right know I got&amp;nbsp;this in my main loop:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int main(void)
{

power_off_peripherals();

leds_config();

lfclk_config(); //start the internal Xtal clock.

rtc_config(); //config of the RTC.

while (1)
{
__WFE();
__SEV();
__WFE();
}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If I put something before the WFE function, like a GPIO function that will toggle a led. Will it toggle the led, go to sleep until the systeem gets an interupt, toggle led, go to sleep until interupt, and loop like that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power saving.</title><link>https://devzone.nordicsemi.com/thread/410368?ContentTypeID=1</link><pubDate>Thu, 16 Feb 2023 13:31:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de55dae6-160d-4f62-967c-ace35c0b035b</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Chriis"]I don&amp;#39;t really understand how System ON low power works, like how do you enable it? And how can you see it is enabled?[/quote]
&lt;p&gt;This is the mode where the CPU is in idle, so effectively __WFE(). If you are using the nRF Connect SDK, the idle thread enters idle automatically, so you don&amp;#39;t need to to it explicitly. The only thing you need to do, is stop doing things that consume power, and when there is no work to be done, the device will stay in system ON idle mode until woken up by an interrupt (typically from the RTC). If you use the nRF5 SDK, you can see that all&amp;nbsp;example has a main loop and at one point in the main loop it will enter idle mode (either by a direct call to sd_app_evt_wait, WFE/WFI or via some other library like a call to&amp;nbsp;nrf_pwr_mgmt_run() or similar).&lt;/p&gt;
[quote user="Chriis"]&lt;p&gt;I got the LFCLK running and a RTC to keep track of time but how do I send an interupt (I suppose) to wake the device when it counts to 7000 ticks lets say.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;That depends on the SDK you are using, and how you prefer to do things. If you are using the nRF Connect SDK, Zephyr use a RTC to keep track of time, so simply use the Zephyr timer APIs (like k_slee()). If using the nRF5 SDK, I would recommend using the app timer library. This is used extensively in the SDK. Or if you are making a very simple thing and want to do things as low level as possible, you can use the RTC directly (either via a driver or HAL, or direct registers access). The latter typically does not make much sense for a bigger&amp;nbsp;project though as you will spend a lot of time duplicating work that we have already done for you. Which SDK are you using? Both the nRF5 DSK and nRF Connect SDK includes examples demonstrating this, and you should also keep in mind that most of the prodocts we are in are low power, so low power is a fundamental part of what we deliver. So generally, you don&amp;#39;t need to think much about it.&lt;/p&gt;
[quote user="Chriis"]And populate two optional inductors? What do you mean?[/quote]
&lt;p&gt;In order to use the DC/DC converter, your board must contain two inductors which are optional. If using only LDO mode, you can skip them. But if you have a high supply voltage using LDO means wasting a lot of power (you can think of the LDO as a simple voltage divider). If you use HW someone else made, this is not relevant. But if you are designing your own HW and need it to be as low power as possible, make sure to include the inductors. Refer to the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/ref_circuitry.html?cp=5_2_0_52#concept_aqp_fd1_fq"&gt;Reference circuitry&lt;/a&gt; for details, where you can see different schematics for LDO and DC/DC mode (where the DC/DC has the two mentioned inductors).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power saving.</title><link>https://devzone.nordicsemi.com/thread/410287?ContentTypeID=1</link><pubDate>Thu, 16 Feb 2023 10:00:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5654f4c-5d1f-4a48-a038-3fd6f8552a7b</guid><dc:creator>Chriis</dc:creator><description>&lt;p&gt;I don&amp;#39;t really understand how System ON low power works, like how do you enable it? And how can you see it is enabled?&lt;/p&gt;
&lt;p&gt;I got the LFCLK running and a RTC to keep track of time but how do I send an interupt (I suppose) to wake the device when it counts to 7000 ticks lets say.&lt;/p&gt;
&lt;p&gt;And populate two optional inductors? What do you mean?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power saving.</title><link>https://devzone.nordicsemi.com/thread/410053?ContentTypeID=1</link><pubDate>Wed, 15 Feb 2023 11:52:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcfe1563-727f-4b6f-8000-0e6feef132b3</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The general trick to achieve a low average power consumption is to &amp;quot;race to idle&amp;quot;. In other words, try to get the device to idle mode as quickly as possible and stay in idle mode for as much of the time as possible. Idle mode for most nRF devices means system ON low power mode with the LFCLK and a couple of RTC instances running, in order to keep track of time and wake up the device at specific times.&lt;/p&gt;
&lt;p&gt;You can see typical current consumption in different states under &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/pmu.html?cp=5_2_0_16_0#unique_1667566419"&gt;Current consumption scenarios&lt;/a&gt;. Also, if you are using nRF Connect SDK, you should refer to &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_dev/optimizing/power.html"&gt;Power optimization&lt;/a&gt;, which has a lot of information about this, including links to the&amp;nbsp; &lt;a href="https://devzone.nordicsemi.com/power/w/opp/2/online-power-profiler-for-bluetooth-le"&gt;Online Power Profiler&lt;/a&gt; that you may find useful in order to see what you can achieve for Bluetooth designs.&lt;/p&gt;
[quote user=""]Does anyone know how to let the nrf calculate some code, when it is done the nrf will just wait/sleep for lets say 15 minutes with minimal power consumption, and after that the nrf will calculate the same code again. etc, etc.[/quote]
&lt;p&gt;It is difficult to calculate all factors, so what I would suggest is to make a test where you do the calculation you need, and check with a PPK2 or other power measurement tool, or look at the current consumption scenarios if you have an idea of for how long the CPU will need to do the task(s) you need. A typical idle current consumption for the nRF is a few micro amps.&lt;/p&gt;
&lt;p&gt;Lastly, if you supply the device with a fairly high voltage (say 3V), then make sure you populate the two optional inductors on your HW, and ensure you enable the DC/DC.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>