<?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>Zigbee + FreeRTOS End Device power consumption</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66403/zigbee-freertos-end-device-power-consumption</link><description>Hi, 
 We have been working with an end device based on nRF52840 with nRF5_SDK_for_Thread_and_Zigbee_v4.0.0_dc7186b 
 By measuring with the power profiler kit, we got a system&amp;#39;s power consumption of about 50uA. But after we call zboss_start_no_autostart</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Oct 2020 09:37:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66403/zigbee-freertos-end-device-power-consumption" /><item><title>RE: Zigbee + FreeRTOS End Device power consumption</title><link>https://devzone.nordicsemi.com/thread/272917?ContentTypeID=1</link><pubDate>Mon, 05 Oct 2020 09:37:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61ffc936-5871-48cb-bc7d-1125ca48f9df</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Unfortunately, it doesn&amp;#39;t look like the FreeRTOS implementation of Zigbee is power optimized, and there are no plans to do so in the nRF5 SDK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Our zigbee team says:&lt;/p&gt;
&lt;p&gt;-----------------------------&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In order to suspend the task, while the timer is disabled, you have to implement&amp;nbsp;&lt;/span&gt;&lt;tt&gt;ZB_COMMON_SIGNAL_CAN_SLEEP&lt;/tt&gt;&lt;span&gt;&amp;nbsp;ZBOSS signal handler. Otherwise, you are simply leveraging only the ZBOSS IDLE state, not the ZBOSS SLEEP state (more information about those states can be found here:&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/zigbee_application_reference_component.html?cp=7_3_3_5_1#zarco_sleep" rel="nofollow noopener noreferrer" target="_blank"&gt;https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/zigbee_application_reference_component.html?cp=7_3_3_5_1#zarco_sleep&lt;/a&gt;&lt;span&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For some guidance and ideas how to implement this, it might be good to look at the OSIF implementation in NCS:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;- CAN_SLEEP handler:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/7a8861f03674ca0cf2f859de8ebbfebbfa0581ad/subsys/zigbee/common/zigbee_helpers.c#L455" rel="nofollow noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/blob/7a8861f03674ca0cf2f859de8ebbfebbfa0581ad/subsys/zigbee/common/zigbee_helpers.c#L455&lt;/a&gt;&lt;br /&gt;&amp;nbsp;- sleep routine (will be called by&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;tt&gt;zb_sleep_now()&lt;/tt&gt;):&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/7a8861f03674ca0cf2f859de8ebbfebbfa0581ad/subsys/zigbee/osif/zb_nrf_pwr_mgmt.c#L30" rel="nofollow noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/blob/7a8861f03674ca0cf2f859de8ebbfebbfa0581ad/subsys/zigbee/osif/zb_nrf_pwr_mgmt.c#L30&lt;/a&gt;&lt;br /&gt;&amp;nbsp;- Poll function:&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/7a8861f03674ca0cf2f859de8ebbfebbfa0581ad/subsys/zigbee/osif/zb_nrf_platform.c#L501" rel="nofollow noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/blob/7a8861f03674ca0cf2f859de8ebbfebbfa0581ad/subsys/zigbee/osif/zb_nrf_platform.c#L501&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Signal mechanism is used to wake up the ZBOSS task by other tasks that wants to send something over Zigbee, as well as to wake up the ZBOSS task earlier than the sleep period, passed to the sleep function as an argument.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-----------------------------&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I still mean you can do quite complex things without using FreeRTOS, but I don&amp;#39;t know what sort of device you are planning to develop.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee + FreeRTOS End Device power consumption</title><link>https://devzone.nordicsemi.com/thread/272088?ContentTypeID=1</link><pubDate>Tue, 29 Sep 2020 13:54:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22867e67-d149-4f6b-8edb-28280d6c5af6</guid><dc:creator>Edvin</dc:creator><description>[quote user="sjf"]No, there is no chance to remove FreeRTOS since it is not a demo or a simple project.[/quote]
&lt;p&gt;&amp;nbsp;You may of course have your reasons, but I am just saying that you can do quite complex things without FreeRTOS, and possibly more effective. It is worth noticing that you can do quite a lot based on events.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, Yes. It is the softdevice that has first priority on the radio. The Zigbee stack will ask the softdevice for timeslots in between the BLE events. The softdevice will grant timeslots to the zboss stack, so inside these the zboss stack controls the radio.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you are using the mesh technologies in combination with BLE, the mesh technologies will have control of the radio most of the time. BLE is only used in short bursts.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am still waiting for a reply from our Zigbee team. Stay tuned.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee + FreeRTOS End Device power consumption</title><link>https://devzone.nordicsemi.com/thread/272034?ContentTypeID=1</link><pubDate>Tue, 29 Sep 2020 11:40:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f114a9e3-112a-47a1-853f-684b5fec10e0</guid><dc:creator>sjf</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;No, there is no chance to remove FreeRTOS since it is not a demo or a simple project. Radio power&amp;nbsp;is automatically handled by SoftDevice?&lt;/p&gt;
&lt;p&gt;What about Zboss stack? Was there any remarkable change from 4.0 to 4.1 about power? Is there any extra tunning in this stack to implement?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee + FreeRTOS End Device power consumption</title><link>https://devzone.nordicsemi.com/thread/272018?ContentTypeID=1</link><pubDate>Tue, 29 Sep 2020 10:41:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9da3cb4c-31e4-452d-9426-39ced3cab548</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Can you please test either way?&lt;/p&gt;
&lt;p&gt;Can you also see whether the current consumption is the same if you try one of the non-freertos examples? As far as I can tell, there are no changes on the FreeRTOS front between SDK 4.0.0 and 4.1.0.&lt;/p&gt;
&lt;p&gt;Let me know if the current consumption differs a lot between the non-FreeRTOS and FreeRTOS examples. I will check with our Zigbee team if a higher current consumption is a known issue, and if there is a workaround for.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is there a particular reason for why you need to use FreeRTOS?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee + FreeRTOS End Device power consumption</title><link>https://devzone.nordicsemi.com/thread/271888?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 20:56:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d3da117-9598-4d85-a0e3-3e6ca214b337</guid><dc:creator>sjf</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;Thanks for your response.&amp;nbsp;But the increase on current consumption was ONLY after zigbee was initialized and&amp;nbsp;&amp;nbsp;when calling&amp;nbsp;&lt;span&gt;zboss_main_loop_iteration() function in the zigbee task,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Prior to that, the&amp;nbsp;calling to sd_app_evt_wait() was not generating any issue like your link mentions&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zigbee + FreeRTOS End Device power consumption</title><link>https://devzone.nordicsemi.com/thread/271821?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2020 13:54:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a3dac47-e5e2-40f5-8e63-3aaa05fae791</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Can you please see my colleague, Susheel&amp;#39;s, reply in this ticket:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/35073/high-power-consumption-of-softdevice"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/35073/high-power-consumption-of-softdevice&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I see that this is at least not &amp;quot;patched&amp;quot; in the 4.0.0 Thread and Zigbee SDK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>