<?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>NRF52 and zephyr power modes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73391/nrf52-and-zephyr-power-modes</link><description>Hi all. I hope you are well! I posted this in the backstage forum but I realize that is not where it should go ;) so I repost here. I hope that is ok. 
 
 page 56 in this document: https://infocenter.nordicsemi.com/pdf/nRF52840_PS_v1.1.pdf seems, to me</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Apr 2021 12:00:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73391/nrf52-and-zephyr-power-modes" /><item><title>RE: NRF52 and zephyr power modes</title><link>https://devzone.nordicsemi.com/thread/303755?ContentTypeID=1</link><pubDate>Thu, 08 Apr 2021 12:00:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f6f6e06-4fca-4201-a4fb-03cc30f4ea86</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again, Joel!&lt;br /&gt;&lt;br /&gt;Good to hear. Recovering from System Off requires some kind of physical input, for example through a reset. There are less drastic means as well, like a GPIO trigger or NFC sense. All of these are listed in the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/pmu/doc/pmu.html?cp=3_0_0_3_1#unique_305565860"&gt;product specification&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I agree with you here of course and I can ensure you that we strive towards making low power operation easy for our devices. On that note all the relevant registers are available in the Nordic HAL, and can be easily reached from a Zephyr/NCS applications. Here is the &lt;a href="https://github.com/nrfconnect/sdk-hal_nordic/blob/8f013ea950f41bf69b18bf688bfb0dd80a3fdc44/nrfx/mdk/nrf52840.h"&gt;definitions for nRF52840&lt;/a&gt; for example. I also want to add that the Zephyr RTOS is open source and accepts both external input and contributions, so I suggest reaching out through &lt;a href="https://www.zephyrproject.org/community/#connect"&gt;their community channels&lt;/a&gt; about this as well.&lt;br /&gt;&lt;br /&gt;Have made sure to do the current measurement as described for the &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/dk/hw_measure_current.html"&gt;nRF52840DK documentation&lt;/a&gt;? That should ensure that you only see the power consumption of the nRF52x SoC.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;It&amp;#39;s my pleasure to help! And I&amp;#39;m very glad to hear that the help is appreciated.&lt;br /&gt;&lt;br /&gt;Have a good one!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 and zephyr power modes</title><link>https://devzone.nordicsemi.com/thread/302804?ContentTypeID=1</link><pubDate>Wed, 31 Mar 2021 17:44:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ea63a38-2524-4e7f-aa77-9ce03df9a9ff</guid><dc:creator>svenssonjoel</dc:creator><description>&lt;p&gt;Thanks a lot Carl Richard,&lt;/p&gt;
&lt;p&gt;Those are some interesting pointers that I will take a look at.&amp;nbsp; I was under the impression that the only way to recover from the System Off mode was a reset, which felt a bit drastic. So, reading those links will be interesting.&lt;/p&gt;
&lt;p&gt;I understand that it is probably tedious to support all the power states of all different SOCs. But it also feels like a very important thing given the IoT angle.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have measured my boards current consumption some, and of course there is a bit of other electronics on there that makes it hard to say exactly what of that the nrf52 module is responsible for. Ah, I should make one test-board with only the module and none of the &amp;quot;extras&amp;quot; and check. However, so far the current consumption during zephyr k_sleep sessions seems much higher than what any of the low-power modes listed in the PS indicates as possible. So I feel like it should be possible to get improved battery life by adding some of those modes. I will try to do that of course ;) .I was just very curious to see if maybe it was something that was right around the corner of being implemented by someone far more suited for the task than I.&lt;/p&gt;
&lt;p&gt;Thanks a lot, very grateful for the answer. Nordic seem to take this interaction with the &amp;quot;community&amp;quot; part very seriously. I am just a tiny costumer for you guys ;) I have about 20 nrf52840 modules (Rigado and uBlox branded) that I use for hobby and, at work for research (in the area of programming languages).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks, stay safe and have a good day!&lt;/p&gt;
&lt;p&gt;/Joel Svensson&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 and zephyr power modes</title><link>https://devzone.nordicsemi.com/thread/302792?ContentTypeID=1</link><pubDate>Wed, 31 Mar 2021 15:51:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:810ccd5c-172a-451d-829b-2060acd64342</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hello!&lt;br /&gt;&lt;br /&gt;Thanks for reaching out! And don&amp;#39;t worry about the repost, that&amp;#39;s no problem. You are correct that Zephyr RTOS (and the nRF Connect SDK) lack support for the individual power states defined in the Product Specification. This is likely a conscious choice based on how Zephyr handles power management. The RTOS&amp;nbsp;&lt;span&gt;has it&amp;#39;s own&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.0/zephyr/reference/power_management/index.html"&gt;power management module&lt;/a&gt;&lt;span&gt;&amp;nbsp;that handles transitions between the different power modes/states of an application.&amp;nbsp;In general, when no threads are active (for example in k_sleep) the system enters a low power idle thread that waits for CPU events(i.e. the SystemOn as defined in the PS).&amp;nbsp;&lt;/span&gt;&lt;span&gt;In the same power management module&amp;nbsp;&lt;strong&gt;SYS_POWER_STATE_DEEP_SLEEP_1&amp;nbsp;&lt;/strong&gt;&amp;nbsp;corresponds to the SystemOff mode in the PS.&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;There are examples on entering low power modes in both NCS and Zephyr. For System OFF I can recommend&amp;nbsp;&lt;/span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.0/nrf/samples/nfc/system_off/README.html"&gt;NFC: System OFF&lt;/a&gt;&lt;span&gt;, which demonstrates entering and waking up from System OFF mode using Zephyr. How BLE advertising can be done during sleep is shown in&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/61383/low-power-ble-advertising-with-zephyr-on-nrf52840-is-it-supported"&gt;this thread&lt;/a&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Accounting for all possible power states on all the different products supported&amp;nbsp; by Zephyr is arguably quite tedious, which I guess is why they have limited it to some states. If you do want more control of the power states this can be done on register level, as you can see in the product specification. From what I know there isn&amp;#39;t support in the HAL for controlling this currently, but I&amp;#39;ll ask internally.&lt;br /&gt;&lt;br /&gt;We do contribute to the development on Zephyr, but for roadmap questions I must ask you to send an inquiry to your Regional Sales manager. If you don&amp;#39;t know who that is please send me a PM with your location/region for further follow up.&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Best regards,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Carl Richard&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>