<?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 802.15.4 lib power consumption in sleep</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106816/nrf-802-15-4-lib-power-consumption-in-sleep</link><description>Hi, 
 I&amp;#39;m using the 17.1 sdk 802.15.4 lib to send raw data on a zigbee like broadcast. 
 It works fine, but I have trouble getting the lib to sleep. 
 If I don&amp;#39;t enable the library I&amp;#39;m below 4 uA in sleep, but as soon as I enable the library and send</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Feb 2024 15:10:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106816/nrf-802-15-4-lib-power-consumption-in-sleep" /><item><title>RE: Nrf 802.15.4 lib power consumption in sleep</title><link>https://devzone.nordicsemi.com/thread/467956?ContentTypeID=1</link><pubDate>Wed, 07 Feb 2024 15:10:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ecfc27e-4d12-4962-a603-4cb07a5d65ff</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Hjalmar,&lt;/p&gt;
&lt;p&gt;The reason for the high ide current consumption is that the driver never stops the RNG. When I test on my end, I get the expected idle current consumption by stopping the RNG like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;NRF_RNG-&amp;gt;TASKS_STOP = 1;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The driver does not have any implementation for doing this after&amp;nbsp;&lt;code&gt;nrf_802154_sleep_if_idle()&lt;/code&gt; /&amp;nbsp;&lt;code&gt;nrf_802154_request_sleep()&lt;/code&gt;. Moreover, in the driver implemenation there is a&amp;nbsp;&lt;code&gt;nrf_802154_random_deinit()&lt;/code&gt; that is called from&amp;nbsp;&lt;code&gt;nrf_802154_deinit()&lt;/code&gt;, but this is empty. If you add the above line here, you&amp;nbsp;should get the expected sleep current after a call to&amp;nbsp;&lt;code&gt;nrf_802154_deinit()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I am still trying to find out why this is not handled properly in the driver, but this is quite old code. In any case, stopping the RNG and re-starting it should solv the issue.&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf 802.15.4 lib power consumption in sleep</title><link>https://devzone.nordicsemi.com/thread/467756?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2024 13:29:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd6b06ab-d27e-4f36-bd31-f320077a9f26</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Hjalmar,&lt;/p&gt;
&lt;p&gt;I will look into it and get back to you within a few days.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf 802.15.4 lib power consumption in sleep</title><link>https://devzone.nordicsemi.com/thread/467543?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2024 11:37:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edd0d6ec-f7b2-45d8-b76b-508f5c2cc976</guid><dc:creator>Hjalmar</dc:creator><description>&lt;p&gt;&lt;a href="https://www.dropbox.com/s/vjphzud3za4pa1r/sw_svea.zip?dl=0"&gt;https://www.dropbox.com/s/vjphzud3za4pa1r/sw_svea.zip?dl=0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have copied the entire project, note that I have changed the nrf_pwe_mgmt_run to include a nrfx_clock_hf_clk_stop();.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I also included everything, but I have stripped down main to a bare minimum, Here I get about 2-4 uA consumption if I don&amp;#39;t call&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;SendRadioTest();&lt;br /&gt;if I do, I get 400 uA.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;It&amp;#39;s messy but it should be very clear what functions I call. it&amp;#39;s 5 function calls in total.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;cheers&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Hjalmar&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf 802.15.4 lib power consumption in sleep</title><link>https://devzone.nordicsemi.com/thread/467533?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2024 10:27:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a82e9272-2747-4824-bf8c-d795cebb889e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Calling nrf_802154_sleep() should be enough to put the radio in a state where it does not consume significant power. 400 uA indicate that the HF clock is still running for some reason.&lt;/p&gt;
&lt;p&gt;Can you upload your test project here (includign the .c file, CMakeLists.txt and prj.conf) so that I get a full overview and can test the same setup on my end?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf 802.15.4 lib power consumption in sleep</title><link>https://devzone.nordicsemi.com/thread/467412?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2024 15:32:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9d0a39a-ad24-4eea-bff0-4954d4c08a1c</guid><dc:creator>Hjalmar</dc:creator><description>&lt;p&gt;OK; pinging up again:&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve moved over to the new SDK and using the below&amp;nbsp;lines to start pushing data.&lt;/p&gt;
&lt;p&gt;If I don&amp;#39;t call the SendRadioFrame() function it&amp;#39;s 4 uA power consumption, if I call it, it draws 400 uA after that call.&lt;/p&gt;
&lt;p&gt;How do I deep sleep this new library?&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&lt;/span&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;first&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;
&lt;div&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;SendRadioFrame&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;){&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;first&lt;/span&gt;&lt;span&gt;){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;nrf_802154_init&lt;/span&gt;&lt;span&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;nrf_802154_channel_set&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;15&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;first&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;nrf_802154_transmit_raw&lt;/span&gt;&lt;span&gt;((&lt;/span&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;refframe&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;for&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;i&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;i&lt;/span&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span&gt;100000&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;span&gt;i&lt;/span&gt;&lt;span&gt;++&lt;/span&gt;&lt;span&gt;){&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;asm&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;nop;&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;RadioTxFrame&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;sequence&lt;/span&gt;&lt;span&gt;++&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;security_frame_counter&lt;/span&gt;&lt;span&gt;++&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;nrf_802154_sleep&lt;/span&gt;&lt;span&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf 802.15.4 lib power consumption in sleep</title><link>https://devzone.nordicsemi.com/thread/466402?ContentTypeID=1</link><pubDate>Mon, 29 Jan 2024 08:22:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04d1bae2-6730-4440-ba09-95443b821588</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Hjalmar"]Is there really no documentation available on this lib and is there really no proper deep sleep feature? Seems very strange since the lib is pretty much useless without one.[/quote]
&lt;p&gt;That is correct. This library our very first SW support for 802.15.4&amp;nbsp;for prototyping etc, but it is not recomended for use. It has a limited feature set (like no support for sleep as you have found), and is only provided in binary form so you cannot modify it.&lt;/p&gt;
&lt;p&gt;You do not need to migrate to the nRF Connect SDK, but I would advice you to not use this library. Instead, you can take a look at the&amp;nbsp;nRF IEEE 802.15.4 radio driver. This is now only developed for the nRF Connect SDK (and &lt;a href="https://github.com/nrfconnect/sdk-nrfxlib/tree/main/nrf_802154"&gt;part of nrfxlib&lt;/a&gt;), but up to version 1.10 it was a &lt;a href="https://github.com/NordicSemiconductor/nRF-IEEE-802.15.4-radio-driver"&gt;separate repository&lt;/a&gt; that was included and used in the &lt;a href="https://www.nordicsemi.com/Products/Development-software/nrf5-sdk-for-thread-and-zigbee"&gt;nRF5 SDK for Thread and Zigbee&lt;/a&gt;. You can find the API documentation &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.2.0/group__api__802154__driver.html"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf 802.15.4 lib power consumption in sleep</title><link>https://devzone.nordicsemi.com/thread/466341?ContentTypeID=1</link><pubDate>Sat, 27 Jan 2024 20:37:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:101b2c59-1d20-4b47-b514-631e4ed0bf11</guid><dc:creator>Hjalmar</dc:creator><description>&lt;p&gt;Just for clarification, we have a lot of code already running in this project with all peripherals, bootloaders, fallback bootloaders etc going so moving away from sdk 17 is really not an option&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf 802.15.4 lib power consumption in sleep</title><link>https://devzone.nordicsemi.com/thread/466340?ContentTypeID=1</link><pubDate>Sat, 27 Jan 2024 20:36:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:716e8bf5-5fb9-43bd-a80d-e2256e3b0b79</guid><dc:creator>Hjalmar</dc:creator><description>&lt;p&gt;Hi, waking this thread again since Thomas Holmberg promised to push this a bit further. After I&amp;rsquo;ve done the reset ala above, I can&amp;rsquo;t for my life get any radio tx again. The only way is a nvic_reset or a POR.&lt;br /&gt;Is there really no documentation available on this lib and is there really no proper deep sleep feature? Seems very strange since the lib is pretty much useless without one.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf 802.15.4 lib power consumption in sleep</title><link>https://devzone.nordicsemi.com/thread/461400?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2023 09:55:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abf96507-a21f-44f0-aa4a-9bf79aa9a1ca</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Hjalmar"]Yes it will bring everything down to 4 uA, but then I can&amp;#39;t start transmitting again.[/quote]
&lt;p&gt;I see, that makes sense without doing re-initialization.&lt;/p&gt;
[quote user="Hjalmar"]Also, the question he asks in the very bottom is very interesting, where can I find information of the timer-&amp;gt;power register, (offset 0xffc) There is nothing in the PS about this reg at all?[/quote]
&lt;p&gt;This is an undocumented register (there are many registers that are undocumented for various reasons).&lt;/p&gt;
[quote user="Hjalmar"]Can I assume it&amp;#39;s as per other modules (ie it&amp;#39;s just 0 or 1, and after I&amp;#39;ve written 0 to it, I need to reinitiate it all again?[/quote]
&lt;p&gt;This specific register only take 1 or 0. It will effectively reset the readio peripheral, so everything needs to be re-initialized.&lt;/p&gt;
[quote user="Hjalmar"]Does that mean I need to call sys_init() and then set the entire thing up every time I want to send a message?&lt;br /&gt;is there really no sleep / wake in the library somewhere? Since I have no source code I have no idea of where to look.[/quote]
&lt;p&gt;That seems to be the case. This is an old library that was made externally and that is very rarely used, so there may be details there I am not aware of. Unless you have a particular strong reason for using this library and can live with the limitations, it may make more sense to use somethign else (like the &lt;a href="https://devzone.nordicsemi.com/support-private/support/319583/nRF%20IEEE%20802.15.4%20radio%20driver"&gt;nRF IEEE 802.15.4 radio driver&lt;/a&gt;&amp;nbsp;in the nRF5 SDK or probably better, the nRF Connect SDK, which is the SDK that is currently under active development).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf 802.15.4 lib power consumption in sleep</title><link>https://devzone.nordicsemi.com/thread/461393?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2023 09:32:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f59f7c02-fd8b-4ca2-aeae-00ba24675a4a</guid><dc:creator>Hjalmar</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;no, unfortunately that doesn&amp;#39;t help me.&lt;br /&gt;Yes it will bring everything down to 4 uA, but then I can&amp;#39;t start transmitting again.&lt;/p&gt;
&lt;p&gt;Also, the question he asks in the very bottom is very interesting, where can I find information of the timer-&amp;gt;power register, (offset 0xffc) There is nothing in the PS about this reg at all? (at least not under the timer section) Can I assume it&amp;#39;s as per other modules (ie it&amp;#39;s just 0 or 1, and after I&amp;#39;ve written 0 to it, I need to reinitiate it all again?&lt;br /&gt;Does that mean I need to call sys_init() and then set the entire thing up every time I want to send a message?&lt;br /&gt;is there really no sleep / wake in the library somewhere? Since I have no source code I have no idea of where to look.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf 802.15.4 lib power consumption in sleep</title><link>https://devzone.nordicsemi.com/thread/461368?ContentTypeID=1</link><pubDate>Thu, 21 Dec 2023 07:54:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1645127b-ed88-42c7-850c-1fde73d7d192</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Hjalmar,&lt;/p&gt;
&lt;p&gt;I see. It is not a much used library so I had not come across this before, but there is an old post about this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/71174/802-15-4-sys_sleep_request_ms-does-not-work/294195"&gt;here&lt;/a&gt;. Does that help?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf 802.15.4 lib power consumption in sleep</title><link>https://devzone.nordicsemi.com/thread/461320?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2023 15:49:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29a50e9a-4cd1-4c03-bab1-6f60cd7cf3f2</guid><dc:creator>Hjalmar</dc:creator><description>&lt;p&gt;Hi, yes I&amp;#39;t the MAC lib that needs the fsm to comunicate with (as far as I understand, the only sample I&amp;#39;ve found is the wireless uart, and I can&amp;#39;t find any more documentation on HOW to use it, only the normal very unhelpful this is the API, guess how to use it yourself docs).&lt;br /&gt;as I said, when I kill the hf clock, the power consumption drops, but then when I wake up again, the MAC lib won&amp;#39;t give me any error codes but just stops sending out anything on the radio.&lt;br /&gt;are there any other things I need to set in the mac/phy library to be able to pause the hclk and continue as soon as hclk comes along?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Nrf 802.15.4 lib power consumption in sleep</title><link>https://devzone.nordicsemi.com/thread/461274?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2023 12:27:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f965fe53-5296-45fe-8d57-3371bbf0207d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Hjalmar,&lt;/p&gt;
&lt;p&gt;Which 802.15.4 library is this? Is it the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_802_15_4.html"&gt;IEEE 802.15.4 MAC library&lt;/a&gt;&amp;nbsp;or some other? And how are you using it? The current consumption you see matches what I would expect with the HF clock running, so it seems you are missing some clean-up before entering sleep, that causes some resources active (coould in principle be anything that enables the HF clock).&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>