<?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>Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75611/thermostat-cluster-enable-issue</link><description>Hi All, 
 I am developing product using nRF52840 and SDK nRF5_SDK_for_Thread_and_Zigbee_v3.0.0_d310e71. 
 This product is basically, using the Thermostat cluster and Zigbee protocol to communicate with the Zigbee gateway. 
 So, I referred light_bulb example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Jul 2021 13:35:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75611/thermostat-cluster-enable-issue" /><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/322684?ContentTypeID=1</link><pubDate>Fri, 30 Jul 2021 13:35:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d044cce9-a027-4e2e-8bfe-e673ee57d2c7</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Okay, I will post in new and if you get any suggestion let me know.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, as per your suggestion we ported our functions into SDK4.1 but still we are getting same result in current 1mA avg.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do not close this ticket, I need some points in new ticket as a reference. Once done I will only close.&lt;/p&gt;
&lt;p&gt;Thanks and Regards&lt;/p&gt;
&lt;p&gt;Rohit R&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/322671?ContentTypeID=1</link><pubDate>Fri, 30 Jul 2021 12:44:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:690e095c-4ec5-49c0-bc3a-ec64d3876baa</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Rohit,&lt;/p&gt;
&lt;p&gt;Thank you for providing detailed explanations of your project and set up. I have tried to look into it, but current consumption is not my field of expertise, so I have been unable to solve this so far. Most of the Zigbee team is out of office right now, so I have not been able to ask them more about expected current consumption in your scenario. I have asked some of our experts on current consumption to take a look. They have not been able to do so yet, but they will look into it next week.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I will be out of office the next few weeks, so someone else will take care of your case. Since this ticket has become rather long and the problem you have now is not directly related to the original topic of the ticket, can you please create a new ticket with your current problem? Please explain the problem you are having now in detail in the other ticket,&amp;nbsp;and provide the&amp;nbsp;information you shared in your last replies here.&amp;nbsp;This will make it easier for the engineer responsible for your case to help you.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/322136?ContentTypeID=1</link><pubDate>Wed, 28 Jul 2021 06:37:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fb8d6f5-2fe7-49e8-ac48-7f4614649ca3</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you so much for the response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please find my attached document and explanation for your question, setup images.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, I have attached code which I used to check the current.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Go through my comments and let me know your feedback on my comments as early as possible.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nRF52840-setup-and-comments.docx"&gt;devzone.nordicsemi.com/.../nRF52840-setup-and-comments.docx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;main. cfile.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/456428.main.c"&gt;devzone.nordicsemi.com/.../456428.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just now I tried with&amp;nbsp;zigbee_power_down_unused_ram() function. As suggested ported the function from SDK4.1 to SDK3.0. And as per your suggestion called the function after&amp;nbsp;zb_set_rx_on_when_idle(ZB_FALSE); in main file but still current remains same 1mA.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Along, with multi meter we used power profile kit to measure the current. In both tool we are getting avg current = 1mA.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One more update from my end. We tested our code using power profile Kit as said previously. And this is what we observed on power profile Kit.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Setup is same Radiator plus Nrf devkit as shown in document.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We see that there are spike in every 2.5sec. please find attached image of the same for reference. This might help us to narrow down the sleep issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;My observation -&amp;nbsp;&lt;span&gt;In idle state, the power profiler show the current consumption in ampere. Average we see is around 1mA. But after every 2.5msec we see a spike of around 19msecs. This means that controller is either waking up every 2.5msec or it is not sleeping at all from start.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Let me know your feedback on this.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/WhatsApp-Image-2021_2D00_07_2D00_28-at-8.54.22-PM.jpeg" /&gt;&lt;/p&gt;
&lt;p&gt;lasted main. c file with power down unused ram section as per SDK4.1. function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/520150.main.c"&gt;devzone.nordicsemi.com/.../520150.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks and Regards&lt;/p&gt;
&lt;p&gt;Rohit R&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/322079?ContentTypeID=1</link><pubDate>Tue, 27 Jul 2021 14:27:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d88ca576-9f73-4ff8-9e2c-fe855ee4e68e</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Rohit,&lt;/p&gt;
[quote userid="79402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321885#321885"]So, Till we get developer feedback on waking up device using Zigbee command. We tried SED config. And it gave us some better result around 1mA. But again this huge my target is 30uA.&amp;nbsp;[/quote]
&lt;p&gt;Can you please give some more information about what your project is doing when you are measuring the current and how you are measuring it? You say the device has joined the network, but is it performing any other actions while you are measuring the current consumption?&lt;/p&gt;
&lt;p&gt;You can also check out our guide&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/dk/hw_measure_current.html"&gt;Measuring current&lt;/a&gt;, and I recommend reading the note further down on that page.&amp;nbsp;Additionally, it is suggested to cut SB40 to put P22 in series with the load, as explained in&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/dk/prepare_board.html"&gt;Preparing the DK&lt;/a&gt;. You should also set SW6 to &amp;quot;nRF only&amp;quot;.&lt;/p&gt;
&lt;p&gt;When performing current consumption tests earlier, our developers have managed to get sleep current consumption down to 1.6-3.3&amp;nbsp;&lt;span&gt;&amp;micro;A, depending on the amount of&amp;nbsp;&lt;/span&gt;RAM retention. This was when the device had joined and was not performing additional actions, but being in sleep mode. However, it is difficult to compare with your results without knowing more about your test setup.&lt;/p&gt;
[quote userid="79402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321885#321885"]That&amp;#39;s why asked any update from Developer for this? If the waking up device using Zigbee command gives us better result in current consumption I will definitely use that not SED. On other hand after configuring SED if would resulted me in uA (micro Ampear) then I would go ahead with. I didn&amp;#39;t bother for waking up on Zigbee command.[/quote]
&lt;p&gt;Please read what I wrote in my previous reply about this. If you want to get the lowest possible current consumption, you should use SED. You will not get lower current consumption when not using SED. The difference between&amp;nbsp;SED and non sleepy devices is that with SED the radio is turned off and does not receive or send packets. This greatly reduces current consumption.&lt;/p&gt;
&lt;p&gt;If you are using SED but does not see a significant impact on the current consumption, then it is possible the device does not go to sleep as it should, or that it wakes up very often.&lt;/p&gt;
&lt;p&gt;Also, the current consumption in SED applications is further optimized in v4.1.0 of the SDK, so you it is very likely you would get a lower current consumption using that version.&lt;/p&gt;
[quote userid="79402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321885#321885"]Also, some points regarding System ON, no ram retention but how to do that no explanation.[/quote]
&lt;p&gt;Please read my previous replies. I explained clearly what the parts of this configuration means:&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321062#321062"]&lt;ul&gt;&lt;li&gt;System ON: This means that the chip is in system ON, and not in system OFF, which means that the chip is in a regular state ready to run, and that the CPU is in sleep mode. The CPU is in a WFE (waitinf for event) call, and will wake when there is an interrupt. This interrupt is typically the RTC clock, but with 1&amp;nbsp;&lt;span&gt;μA. the RTC is not in use.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;no RAM retention: this means that the RAM is not conserved, and will practically mean that there is no code running on the chip.&lt;/li&gt;&lt;/ul&gt;[/quote]
&lt;p&gt;You get System ON when the CPU is in sleep mode, so either when a SED goes to sleep, or when calling&amp;nbsp;zb_osif_wait_for_event(). You must have some RAM retention, as without it, your application cannot run, but you can power down unused parts of RAM, as I have explained previously.&lt;/p&gt;
[quote userid="79402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321721#321721"]And also, I would like to know can we use system off in sleepy end device and wake up on GPIO interrupt.[/quote]
&lt;p&gt;In both the case of SED and non-SED devices, the stack calls&amp;nbsp;zb_osif_wait_for_event(), which will behave like a single call of __WFE() instruction, from a functional point of view. So if an interrupt occurs between&amp;nbsp;zb_osif_wait_for_event() calls, the device will wake up. Thus, you can implement GPIO interrupts in the same way as you would with WFE (wait for event). You must enable GPIO, configure a pin for input, and configure it to give an interrupt on pin change. An example of how you can do this is to create a gpio_init functions as follows:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void gpio_init(void)
{
    ret_code_t err_code;
    
    err_code = nrf_drv_gpiote_init();
    APP_ERROR_CHECK(err_code);
    
    nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false);
    in_config.pull = NRF_GPIO_PIN_PULLUP;
    
    err_code = nrf_drv_gpiote_in_init(PIN_IN, &amp;amp;in_config, in_pin_handler);
    APP_ERROR_CHECK(err_code);
    
    nrf_drv_gpiote_in_event_enable(PIN_IN, true);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then you can call this function in main() during initialization. You must remember to define&amp;nbsp;PIN_IN as the pin you want to use for interrupts. You can also check out the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/hardware_driver_gpiote.html"&gt;GPIOTE driver&lt;/a&gt;&amp;nbsp;for more information.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/321885?ContentTypeID=1</link><pubDate>Mon, 26 Jul 2021 16:56:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12fc468c-9a37-4981-a913-2c3647713ebb</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the response.&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321875#321875"]&amp;nbsp;I have already answered this, and explained that this is not possible with SED. With devices that are not SED, this will happen by default if you are using&amp;nbsp;zb_osif_wait_for_event() to reduce power.[/quote]
&lt;p&gt;- My point here is, I want less current consumption for my device it should be 30uA. As per your suggestion we tried SED because zb_osif_wait_for_event(); Didn&amp;#39;t worked. It gave us current 3.9mA.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, Till we get developer feedback on waking up device using Zigbee command. We tried SED config. And it gave us some better result around 1mA. But again this huge my target is 30uA.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- That&amp;#39;s why asked any update from Developer for this? If the waking up device using Zigbee command gives us better result in current consumption I will definitely use that not SED. On other hand after configuring SED if would resulted me in uA (micro Ampear) then I would go ahead with. I didn&amp;#39;t bother for waking up on Zigbee command.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- Point is, using SED or zb_osif_wait_for_event() not gave me less current. In document typical value mentioned. Also, some points regarding System ON, no ram retention but how to do that no explanation.&amp;nbsp;System Off also same. Only wakeup on reset or GPIO interrupt that also not help me here.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then how to reduce current?? We trying different different ways but still same result. Current not reducing below mA.&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321875#321875"]&amp;nbsp;As this feature is only available in v4.1.0, you must implement it yourself in v3.0.0. As I stated before you should look at the function&amp;nbsp;&lt;span&gt;zigbee_power_down_unused_ram() in zigbee_helpers.c in v4.1.0 to see how this can be done. After implementing the function, you should call it&amp;nbsp;right after setting SED with&amp;nbsp;zb_set_rx_on_when_idle() in main().&lt;/span&gt;[/quote]
&lt;p&gt;- I saw some post and suggestion followed below to configure the same.&amp;nbsp;&lt;/p&gt;
&lt;div&gt;NRF_POWER-&amp;gt;RAM[0].POWERCLR = 0x3;&lt;/div&gt;
&lt;div&gt;NRF_POWER-&amp;gt;RAM[1].POWERCLR = 0x3;&lt;br /&gt;NRF_POWER-&amp;gt;RAM[2].POWERCLR = 0x3;&lt;br /&gt; NRF_POWER-&amp;gt;RAM[3].POWERCLR = 0x3;&lt;br /&gt; NRF_POWER-&amp;gt;RAM[4].POWERCLR = 0x3;&lt;br /&gt; NRF_POWER-&amp;gt;RAM[5].POWERCLR = 0x3;&lt;br /&gt; NRF_POWER-&amp;gt;RAM[6].POWERCLR = 0x3;&lt;br /&gt; NRF_POWER-&amp;gt;RAM[7].POWERCLR = 0x3;&lt;br /&gt; NRF_POWER-&amp;gt;RAM[8].POWERCLR = 0x3F;&lt;/div&gt;
&lt;div&gt;- As per our study I commented RAM[0], RAM[1] and RAM[2] and set RAM[8] = 0x3 then able to run my code.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;- And, if i just comment RAM[0] and RAM[8] = 0x3F as per one of nrf engineer post, I am not able to run code. IT enters into hardfault.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;- Okay, I will follows your steps. Use 4.1 to port in 3.0 SDK.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321875#321875"]I will come back to you regarding this.[/quote]
&lt;p&gt;- Yes, please I will wait.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks and Regards&lt;/p&gt;
&lt;p&gt;Rohit R&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/321875?ContentTypeID=1</link><pubDate>Mon, 26 Jul 2021 14:54:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2df14e18-94ab-43a7-bf0b-f8ee7c3cad70</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Rohit,&lt;/p&gt;
[quote user="Rohit Rajapure"]And is there any update from developer regarding system wakeup on zigbee command?[/quote]
&lt;p&gt;&amp;nbsp;I have already answered this, and explained that this is not possible with SED. With devices that are not SED, this will happen by default if you are using&amp;nbsp;zb_osif_wait_for_event() to reduce power.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SED: A Sleepy End Device will go into sleep mode, and not only low power mode. This will, among other things, turn off the radio. So the device cannot receive Zigbee packets, as the radio is not receiving anything. Sending a command to wake the device will do nothing, as it will only receive the command after it is already awake. This is part of the Zigbee specification, for RxOnWhenIdle = false devices (some places call it RxOnIdle =&amp;nbsp;false or RxOffWhenIdle = true).&lt;/li&gt;
&lt;li&gt;Non-SED: Calling&amp;nbsp;zb_osif_wait_for_event() makes the device go into low power mode. This is functionally the same as a single call of __WFE() instruction (wait for event). The CPU goes into a low-power state until an event occurs. Any interrupt occurring between&amp;nbsp;zb_osif_wait_for_event() calls will wake up the device, same as with __WFE(). The radio is not turned off, so the device will still receive Zigbee packets. Receiving Zigbee packets will be an event, so it will wake up.&lt;/li&gt;
&lt;/ul&gt;
[quote user="Rohit Rajapure"]let me know how I to power down unused ram section.&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;As this feature is only available in v4.1.0, you must implement it yourself in v3.0.0. As I stated before you should look at the function&amp;nbsp;&lt;span&gt;zigbee_power_down_unused_ram() in zigbee_helpers.c in v4.1.0 to see how this can be done. After implementing the function, you should call it&amp;nbsp;right after setting SED with&amp;nbsp;zb_set_rx_on_when_idle() in main().&lt;/span&gt;&lt;/p&gt;
[quote user="Rohit Rajapure"]Let me know whether I have followed correct API to execute this erase info and NVIC_SystemReset() is for software?&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;It should be enough to define&amp;nbsp;ERASE_PERSISTENT_CONFIG as ZB_TRUE and call&amp;nbsp;zigbee_erase_persistent_storage(ERASE_PERSISTENT_CONFIG). This should erase network data on a reset or power cycle of the device. This function calls&amp;nbsp;zb_set_nvram_erase_at_start(), which enables or disables NVRAM erasing on application startup. If using&amp;nbsp;&lt;span&gt;zigbee_erase_persistent_storage() does not work, you can try calling&amp;nbsp;zb_set_nvram_erase_at_start(ZB_TRUE) directly, but I would recommend using&amp;nbsp;zigbee_erase_persistent_storage() instead. You should call these functions during the initialization, and not when the application is running. The function zigbee_erase_persistent_storage() will not make the device leave the network.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Since you are using v3.0.0, you can make your device leave the network by creating a function that does the same as light_switch_leave_nwk() in the light switch example.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void light_switch_leave_nwk(zb_uint8_t param)
{
    zb_ret_t zb_err_code;

    /* We are going to leave */
    if (param)
    {
        zb_buf_t                  * p_buf = ZB_BUF_FROM_REF(param);
        zb_zdo_mgmt_leave_param_t * p_req_param;

        p_req_param = ZB_GET_BUF_PARAM(p_buf, zb_zdo_mgmt_leave_param_t);
        UNUSED_RETURN_VALUE(ZB_BZERO(p_req_param, sizeof(zb_zdo_mgmt_leave_param_t)));

        /* Set dst_addr == local address for local leave */
        p_req_param-&amp;gt;dst_addr = ZB_PIBCACHE_NETWORK_ADDRESS();
        p_req_param-&amp;gt;rejoin   = ZB_FALSE;
        UNUSED_RETURN_VALUE(zdo_mgmt_leave_req(param, NULL));
    }
    else
    {
        zb_err_code = ZB_GET_OUT_BUF_DELAYED(light_switch_leave_nwk);
        ZB_ERROR_CHECK(zb_err_code);
    }
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="Rohit Rajapure"]And also, I would like to know can we use system off in sleepy end device and wake up on GPIO interrupt[/quote]
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will come back to you regarding this.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/321721?ContentTypeID=1</link><pubDate>Mon, 26 Jul 2021 08:15:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4b918e9-c7a3-40f3-8a9d-6bcdcd4313a9</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Update from my end,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As per your suggestion, I made the code in SED configuration. I have shared my main file in previous post. - Let me know any changes.&lt;/p&gt;
&lt;p&gt;But with this SED, configuration what I observed is with Dev-kit and Radiator base (STM) board I am getting 1mA current. Which is comparatively less than what I was getting previously.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now I would like to do further reduction in current including nRF dev-kit and STM8 board I need almost 60uA and only nRF i need 30uA.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, I decided to add ram retention also here along with sleep. Please find the attached image of my memory usage and let me know how I to power down unused ram section.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I request you,&amp;nbsp;please give your feedback as early as possible on this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/memory-usage.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And also, I would like to know can we use system off in sleepy end device and wake up on GPIO interrupt. I mean device should work as sleepy end device as well as system off mode. It should wake up periodically like SED and wake up on system off mode? Let me know your feedback on this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And is there any update from developer regarding system wakeup on zigbee command? I am getting pressure from team to resolve sleep issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks and Regards&lt;/p&gt;
&lt;p&gt;Rohit R&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/321564?ContentTypeID=1</link><pubDate>Fri, 23 Jul 2021 12:18:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11ebd774-f3f0-4b78-aa91-290ec3df3f13</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As I said last post that I am getting 3.9mA current with this config as you explained me,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;zb_void_t zb_osif_go_idle(zb_void_t)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span&gt;//TODO: implement your own logic if needed&lt;/span&gt;&lt;br /&gt;&lt;span&gt;zb_osif_wait_for_event();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have tested multiple times and gave me 3.9mA. My last reading 0.03 mA was not correct. My mistake while taking readings. But I need help to reduce current.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you help me what could be the issue here?.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After battery life calculation we came to conclusion that we need at least 30/ 35uA only nRF part. My nrf52840 node should give me 30 to 35uA.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please find the attached code, as per your instruction I made the changes in my code regarding sleepy end device. Let me know I have followed your all steps so that I can test the current for this. As I am getting higher current in previous code so decide to test this sleepy end device also. main.c file&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/211224.main.c"&gt;devzone.nordicsemi.com/.../211224.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, below snippet is regarding erasing bonding info. The snippet present in attached&amp;nbsp; uart_statemachin.c file. Let me know if I followed anything wrong here to erase info.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;              //Master reset is executed
              if(ui8GetFlagBuffer[2] &amp;amp; FLAGS_BYTE_2_MASTER_RESET_REQUEST)
              {
//                boolReady = false; //set flag to execute communication state
//                boolIsMCURequest = true;
                zigbee_erase_persistent_storage(ZB_TRUE);  //erase bonding info or leave network
              }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/uart_5F00_statemachine.c"&gt;devzone.nordicsemi.com/.../uart_5F00_statemachine.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;- After bonding erase I would like to perform soft reset and I used NVIC_SystemReset() function here. What I observed is after reset my while(1) loop not executing and when i paused the code it show me in&amp;nbsp; nrf_log_frontend()&amp;nbsp; file&amp;#39;s&amp;nbsp;bool nrf_log_frontend_dequeue(void) function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Why reset not working correctly?Let me know your feedback on this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks and Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rohit R&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/321519?ContentTypeID=1</link><pubDate>Fri, 23 Jul 2021 09:18:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2447a092-def5-4e87-8956-47eab490fed8</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for the response,&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321364#321364"]&lt;p&gt;To configure the device as a SED you must call&amp;nbsp;zb_set_rx_on_when_idle(ZB_FALSE) in main, such as in the multi sensor example. This enables sleepy behavior and makes your device act as a Sleepy End Device.&lt;/p&gt;
&lt;p&gt;You are correct in that you must call zb_sleep_now() in &lt;span&gt;zboss_signal_handler(), when receiving the signal&amp;nbsp;ZB_COMMON_SIGNAL_CAN_SLEEP. Again, you should do as in the multi sensor example.&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;- Okay, Noted.&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321364#321364"]&amp;nbsp;Yes, with SED you will use&amp;nbsp;&lt;span&gt;zb_sleep_now() to put the device and radio to sleep, and you can remove&amp;nbsp;zb_osif_go_idle() from main.c. The function&amp;nbsp;zb_osif_go_idle() is not really necessary to have in main.c if you are not using SED either, as it is already implemented in&amp;nbsp;external/zboss/osif/zb_nrf52840_common.c. The only reason to use it in main.c is if you want to override the function to make it do something else than what it does in the implementation in&amp;nbsp;zb_nrf52840_common.c.&lt;/span&gt;[/quote]
&lt;p&gt;- Okay, Noted.&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321364#321364"]&lt;p&gt;You can read about the clock sources for the LFCLK controller here:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/clock.html?cp=4_0_0_4_3_1#concept_xkj_np1_2r"&gt;LFCLK controller&lt;/a&gt;. Further down on that page you will find&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/clock.html?cp=4_0_0_4_3_1_3#concept_pln_z5y_2q"&gt;32.768 kHz crystal oscillator (LFXO)&lt;/a&gt;, where you can read about LFXO.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;You can see more about typical current consumption for nRF52840 in the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/_tmp/nrf52840/autodita/CURRENT/parameters.frontpage.html?cp=4_0_0_4_1_0"&gt;electrical specification,&lt;/a&gt;&amp;nbsp;where you can find information such as&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/_tmp/nrf52840/autodita/CURRENT/parameters.i_sleep.html?cp=4_0_0_4_1_0_0"&gt;sleep current&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/_tmp/nrf52840/autodita/CURRENT/parameters.i_radio.html?cp=4_0_0_4_1_0_4"&gt;radio transmitting/receiving current&lt;/a&gt;. The nRF52840 specification does not show the typical current for using LFXO, only LFRC, but the electrical specification for some of the other SoCs does, to show a comparison between using LFRC and LFXO as clock source:&lt;/p&gt;[/quote]
&lt;p&gt;- Okay, I will check.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have noted down your points for configuring SED. And as per your previous post I have discussed your points about SED with my team. But&amp;nbsp; they are like we will test the current default code on custom hardware and check the current.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- After testing default code on custom it gave us 3.9mA. This is too high. We are testing again on Dev-kit as well as custom. I will get back to you on result early.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And they want device should wake up Zigbee commands( it must) as per client requirement. But since nordic developer are busy. I will wait for something can we do here. But need help as early as possible make system wake up on Zigbee command and sleep if no commands. - Need help for this.&lt;/p&gt;
&lt;p&gt;One more update from my end.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- There is one feature in my device, that is perform &amp;quot;network leave or erase the current connect coordinator info&amp;quot;&lt;/p&gt;
&lt;p&gt;- To this what I done is, used&amp;nbsp;zigbee_erase_persistent_storage() and set ZB_TRUE; this means by setting true it will erase the info.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- I did the same but it not erasing nor performing NVIC_SystemReset() correctly.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- My requirement is I have long button press which result in Reset of my STM8 board and that give me signal to nRF board (node) and I have perform erase info and softreset the device and start again.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Let me know whether I have followed correct API to execute this erase info and NVIC_SystemReset() is for software?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks and Regards&lt;/p&gt;
&lt;p&gt;Rohit R&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/321364?ContentTypeID=1</link><pubDate>Thu, 22 Jul 2021 13:07:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7050ff92-aaac-4e8f-bfca-4bd7c9fc81b2</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Rohit,&lt;/p&gt;
[quote user="Rohit Rajapure"]If I configure as SED. It will give comparatively less current than getting now correct?[/quote]
&lt;p&gt;&amp;nbsp;Yes, that is correct.&lt;/p&gt;
[quote user="Rohit Rajapure"]And, If I just call sleep now () in zigbee_signal_handler means it is configured as SED[/quote]
&lt;p&gt;This is not entirely correct.&lt;/p&gt;
&lt;p&gt;To configure the device as a SED you must call&amp;nbsp;zb_set_rx_on_when_idle(ZB_FALSE) in main, such as in the multi sensor example. This enables sleepy behavior and makes your device act as a Sleepy End Device.&lt;/p&gt;
&lt;p&gt;You are correct in that you must call zb_sleep_now() in &lt;span&gt;zboss_signal_handler(), when receiving the signal&amp;nbsp;ZB_COMMON_SIGNAL_CAN_SLEEP. Again, you should do as in the multi sensor example.&lt;/span&gt;&lt;/p&gt;
[quote user="Rohit Rajapure"]And I can comment this part from code to make SED? Correct?&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;Yes, with SED you will use&amp;nbsp;&lt;span&gt;zb_sleep_now() to put the device and radio to sleep, and you can remove&amp;nbsp;zb_osif_go_idle() from main.c. The function&amp;nbsp;zb_osif_go_idle() is not really necessary to have in main.c if you are not using SED either, as it is already implemented in&amp;nbsp;external/zboss/osif/zb_nrf52840_common.c. The only reason to use it in main.c is if you want to override the function to make it do something else than what it does in the implementation in&amp;nbsp;zb_nrf52840_common.c.&lt;/span&gt;&lt;/p&gt;
[quote user="Rohit Rajapure"]But LFRC give me better result then how to configure this? Is there any example for reference?&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;You can read about the clock sources for the LFCLK controller here:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/clock.html?cp=4_0_0_4_3_1#concept_xkj_np1_2r"&gt;LFCLK controller&lt;/a&gt;. Further down on that page you will find&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/clock.html?cp=4_0_0_4_3_1_3#concept_pln_z5y_2q"&gt;32.768 kHz crystal oscillator (LFXO)&lt;/a&gt;, where you can read about LFXO.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;You can see more about typical current consumption for nRF52840 in the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/_tmp/nrf52840/autodita/CURRENT/parameters.frontpage.html?cp=4_0_0_4_1_0"&gt;electrical specification,&lt;/a&gt;&amp;nbsp;where you can find information such as&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/_tmp/nrf52840/autodita/CURRENT/parameters.i_sleep.html?cp=4_0_0_4_1_0_0"&gt;sleep current&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/_tmp/nrf52840/autodita/CURRENT/parameters.i_radio.html?cp=4_0_0_4_1_0_4"&gt;radio transmitting/receiving current&lt;/a&gt;. The nRF52840 specification does not show the typical current for using LFXO, only LFRC, but the electrical specification for some of the other SoCs does, to show a comparison between using LFRC and LFXO as clock source:&lt;/p&gt;
&lt;table height="140" width="308"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;I&lt;/span&gt;&lt;sub&gt;ON_RAMON_RTC&lt;/sub&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;System ON, Full 24 kB RAM retention, Wake on RTC (running from LFRC clock)&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;1.5&amp;nbsp;µA&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;I&lt;/span&gt;&lt;sub&gt;&lt;span&gt;ON_RAMON_RTC_LFXO&lt;/span&gt;&lt;/sub&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;System ON, Full 24 kB RAM retention, Wake on RTC (running from LFXO clock)&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span&gt;1.1 µA&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Please note that the above numbers are from another SoC than the nRF52840 and has different typical current consumption than&amp;nbsp;&lt;span&gt;nRF52840.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Marte&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/321114?ContentTypeID=1</link><pubDate>Wed, 21 Jul 2021 12:06:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:885a7df6-b65b-44f7-a9f8-523539902fc4</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any update on above post?&lt;/p&gt;
&lt;p&gt;My understanding is correct to configure SED device?If yes, then will configure likewise and test for current. Let me know your feedback.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks and Regards&lt;/p&gt;
&lt;p&gt;Rohit R&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/321073?ContentTypeID=1</link><pubDate>Wed, 21 Jul 2021 10:07:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa59e310-33e3-43f9-aabd-13f023032fea</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you so much for response,&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321062#321062"]Due to summer vacation you might have to expect some increase in response time, also from our developers.[/quote]
&lt;p&gt;- Okay, i will wait but need help.&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321062#321062"]As for current consumption,&amp;nbsp;you will notice a significant increase in current consumption when not using Sleepy End Device (SED) compared to a device with SED enabled. This is because with other low power modes, the radio is still always on,&amp;nbsp;causing a much higher current consumption than if it is off. With SED&amp;nbsp;the other hand, the radio will be off when it sleeps. However, this will make it so that the device will not be able to receive messages at all times, and cannot wake up by a command from another device, as it will not receive the message when it is sleeping. So you will have to either use&amp;nbsp;SED and have the radio off at times, or you will have to have a higher current&amp;nbsp;consumption. A device implemented as a&amp;nbsp;SED will wake up periodically to check for messages, as I have explained earlier.[/quote]
&lt;p&gt;- Okay, If I configure as SED. It will give comparatively less current than getting now correct?&lt;/p&gt;
&lt;p&gt;- And, If I just call sleep now () in zigbee_signal_handler means it is configured as SED. And I can comment this part from code to make SED? Correct?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;zb_void_t zb_osif_go_idle(zb_void_t)&lt;br /&gt;{&lt;br /&gt; //TODO: implement your own logic if needed&lt;br /&gt; zb_osif_wait_for_event();&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;- And, in SED device wake up every 10sec correct? I read in one of the nordic link.&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321062#321062"]The best option would be to use SDK 4.1.0 instead, but since that is not an option, you can try to add the function&amp;nbsp;zigbee_power_down_unused_ram to your project yourself, as the implementation of the function is available in v4.1.0, and not an internal stack function. To do this, you must add the function to your SDK, as well as any dependencies of that function. I cannot guarantee that it will work, as there might be other changes between v3.0.0 and v4.1.0 affecting this, but it should be possible to power down the unused RAM in v3.0.0 as well.[/quote]
&lt;p&gt;- Okay, I will check.&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/321062#321062"]&amp;nbsp;However, since you are able to power down unused parts of RAM, you will not have full 256 RAM retention, which will reduce current compared to the above. Additionally, you can use LFXO as a clock source instead of LFRC, and use an external crystal, which&amp;nbsp;will have slightly lower current consumption than using LFRC.[/quote]
&lt;p&gt;- No, I have note configured yet. But would like to configure. But LFRC give me better result then how to configure this? Is there any example for reference?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks and Regards&lt;/p&gt;
&lt;p&gt;Rohit R&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/321062?ContentTypeID=1</link><pubDate>Wed, 21 Jul 2021 09:08:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ea3865c-6edb-45af-9d6a-44b026dd214a</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Rohit,&lt;/p&gt;
&lt;p&gt;Due to summer vacation you might have to expect some increase in response time, also from our developers.&lt;/p&gt;
&lt;p&gt;As for current consumption,&amp;nbsp;you will notice a significant increase in current consumption when not using Sleepy End Device (SED) compared to a device with SED enabled. This is because with other low power modes, the radio is still always on,&amp;nbsp;causing a much higher current consumption than if it is off. With SED&amp;nbsp;the other hand, the radio will be off when it sleeps. However, this will make it so that the device will not be able to receive messages at all times, and cannot wake up by a command from another device, as it will not receive the message when it is sleeping. So you will have to either use&amp;nbsp;SED and have the radio off at times, or you will have to have a higher current&amp;nbsp;consumption. A device implemented as a&amp;nbsp;SED will wake up periodically to check for messages, as I have explained earlier. It will do this by polling it&amp;#39;s parent and asking the parent if there are any messages for it, as the parent store the messages for some time so that the&amp;nbsp;SED&amp;nbsp;will receive them on wake up. You can change the poll interval with &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.thread_zigbee.v3.0.0/group__zdo__poll__control.html#ga3aae8929b30e71c872f937771b89c768"&gt;zb_zdo_pim_set_long_poll_interval&lt;/a&gt;, to make the sleepy end device poll it&amp;#39;s parent at a shorter interval than the default one.&lt;/p&gt;
[quote user="Rohit Rajapure"]Can we use in SDK 3.0 ? If yes the How to handle it in helper.c file or any other file.&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;The best option would be to use SDK 4.1.0 instead, but since that is not an option, you can try to add the function&amp;nbsp;zigbee_power_down_unused_ram to your project yourself, as the implementation of the function is available in v4.1.0, and not an internal stack function. To do this, you must add the function to your SDK, as well as any dependencies of that function. I cannot guarantee that it will work, as there might be other changes between v3.0.0 and v4.1.0 affecting this, but it should be possible to power down the unused RAM in v3.0.0 as well.&lt;/p&gt;
[quote user="Rohit Rajapure"]&amp;quot;ION_RAMOFF_EVENT System ON, no RAM retention, wake on any event 0.97 μA&amp;quot; typically.&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;This mode and current is for the base current consumption of the chip in ON idle mode.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;System ON: This means that the chip is in system ON, and not in system OFF, which means that the chip is in a regular state ready to run, and that the CPU is in sleep mode. The CPU is in a WFE (waitinf for event) call, and will wake when there is an interrupt. This interrupt is typically the RTC clock, but with 1&amp;nbsp;&lt;span&gt;μA. the RTC is not in use.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;no RAM retention: this means that the RAM is not conserved, and will practically mean that there is no code running on the chip.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So you will not be able to get this current consumption and still run your application on your device. You will minimally need RAM retention, RTC to wake up at intervals, and the LF clock, which is needed for RTC. Therefore, your current consumption will be above 1&amp;nbsp;&lt;span&gt;μA, even if you are using SED and powering down RAM sections. According to the specification, the expected current consumption with RAM retention and RTC is as follows:&lt;/span&gt;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;div&gt;I&lt;sub&gt;ON_RAMON_RTC&lt;/sub&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;div&gt;&lt;sub&gt;&lt;/sub&gt; System ON, full 256 kB RAM retention, wake on RTC (running from LFRC clock)&lt;/div&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;div&gt;3.16&amp;nbsp;
&lt;div&gt;µA&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;However, since you are able to power down unused parts of RAM, you will not have full 256 RAM retention, which will reduce current compared to the above. Additionally, you can use LFXO as a clock source instead of LFRC, and use an external crystal, which&amp;nbsp;will have slightly lower current consumption than using LFRC.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/321023?ContentTypeID=1</link><pubDate>Wed, 21 Jul 2021 05:27:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ee95c52-dcef-482c-8652-945232acea5c</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any update from developer? I need urgent help.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And, how to enable this below configuration&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;ION_RAMOFF_EVENT System ON, no RAM retention, wake on any event 0.97 &amp;mu;A&amp;quot; typically.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;can you explain me the configuration for same.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks and Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rohit R&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/320858?ContentTypeID=1</link><pubDate>Tue, 20 Jul 2021 10:01:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02d42069-8b6d-4ac1-917c-8f3f1b2c179b</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I went through the Power down RAM section. Here, It is mentioned that use&amp;nbsp;&lt;span&gt;zigbee_power_down_unused_ram() function from&amp;nbsp;&amp;nbsp;&lt;a class="el" href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/zigbee_application_reference_component.html"&gt;Zigbee application components&lt;/a&gt;. If I tried to search API/ function here it says zero result.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Similarly&lt;span&gt;, Checked the light_switch example as it was mentioned in link for reference but in example alsp it says zero result. Am I following anything wrong here?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;Hi, I got this.&amp;nbsp;&lt;span&gt;zigbee_power_down_unused_ram() this present in light_switch SDK4.1 example and helper.c file but not present in SDK3.0.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can we use in SDK 3.0 ? If yes the How to handle it in helper.c file or any other file.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks and Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rohit R&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/320837?ContentTypeID=1</link><pubDate>Tue, 20 Jul 2021 07:59:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07a419ae-6588-469e-9a6e-043416e44efe</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for the response.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry my mistake, I have made confusion while explaining.&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/320828#320828"]You should not call nrf_pwr_mgmt_run() in the main loop yourself.[/quote]
&lt;p&gt;- This example is peripheral code. I have made one of example copy and followed some online tutorial steps to run this API.&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/320828#320828"]When you call&amp;nbsp;&lt;span&gt;zboss_main_loop (or zboss_main_loop_iteration if you want to include custom features) in main you simply start the Zigbee stack, and the stack will interact with the application using stack signals (zboss_signal_handler) and ZCL callbacks (zcl_device_cb). So all of this is handled internally by the stack after you start the main loop. This includes the signal that it can go to sleep. The stack decides that it has nothing more to do, as there are no stack tasks or anything in the queue that needs to be handled, so the stack informs the device that it can go to sleep or power down. This will cause zb_osif_go_idle to be called automatically.&lt;/span&gt;[/quote]
&lt;p&gt;- Yes, This is present in my radiator code. Here I have not added anything in while loop(). I kept code same as present in light_bulb code. With this only I have tested the current and it gave me 0.03mA after discovery. Where my Radiators STM base board and nRF52 Dev-kit connected. I want battery to life 2 years so I need almost 1uA current that too only my RF board (nRF should consume 1uA current).&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/320828#320828"]While I wait for a response from the developers,[/quote]
&lt;p&gt;- ya , sure please let me know i will wait for positive response.&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/320828#320828"]you can also take a look at&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/zigbee_prog_principles.html?cp=8_3_3_3_2_0#zigbee_additional_power_optimization_tweaks"&gt;Powering down RAM sections&lt;/a&gt;&amp;nbsp;to further reduce current consumption by powering down sections of the RAM memory that are not used by the application.[/quote]
&lt;p&gt;- Okay, I will check this part too.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you so much.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Rohit R&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/320828?ContentTypeID=1</link><pubDate>Tue, 20 Jul 2021 07:48:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb3e2672-0eca-4dfe-9369-591a3a1456dc</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Rohit,&lt;/p&gt;
&lt;p&gt;You should not call nrf_pwr_mgmt_run() in the main loop yourself. When you call&amp;nbsp;&lt;span&gt;zboss_main_loop (or zboss_main_loop_iteration if you want to include custom features) in main you simply start the Zigbee stack, and the stack will interact with the application using stack signals (zboss_signal_handler) and ZCL callbacks (zcl_device_cb). So all of this is handled internally by the stack after you start the main loop. This includes the signal that it can go to sleep. The stack decides that it has nothing more to do, as there are no stack tasks or anything in the queue that needs to be handled, so the stack informs the device that it can go to sleep or power down. This will cause zb_osif_go_idle to be called automatically. This function checks if the logger has anything to process and calls the function zb_osif_wait_for_event, which in turn calls the&amp;nbsp;nrf_pwr_mgmt_run API. You can see part of this in the flowchart below, which is from the page about&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/zigbee_application_reference_component.html?cp=8_3_3_5_1#zarco_sleep"&gt;Zigbee stack sleep routines&lt;/a&gt;&amp;nbsp;in our documentation. Since your device is not a sleepy end device, the third step will result in no, since &amp;quot;rx_off_when_idle&amp;quot; is not true, and it will go to zb_osif_go_idle.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/500x500/__key/communityserver-discussions-components-files/4/signal_5F00_handler_5F00_07_5F00_idle.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;While I wait for a response from the developers, you can also take a look at&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/zigbee_prog_principles.html?cp=8_3_3_3_2_0#zigbee_additional_power_optimization_tweaks"&gt;Powering down RAM sections&lt;/a&gt;&amp;nbsp;to further reduce current consumption by powering down sections of the RAM memory that are not used by the application.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Marte&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/320817?ContentTypeID=1</link><pubDate>Tue, 20 Jul 2021 07:17:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df610750-2118-44d7-abae-9ac0834c1e81</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you I will wait for your response. Please let me know as early as possible.&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/320815#320815"]what the best way to do it when you want to wake up on received Zigbee commands and GPIO interrupt[/quote]
&lt;p&gt;- Yes, more focus on wake up on zigbee commands from gateway ( first priority) and then GPIO as (second priority).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-&amp;nbsp;But also, check my comments shared. Am I following correct steps or not? If I am doing anything wrong here then correct me. I will follow the steps and again check for current consumption.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks and Regards&lt;/p&gt;
&lt;p&gt;Rohit R&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/320815?ContentTypeID=1</link><pubDate>Tue, 20 Jul 2021 07:08:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b05d1955-5e0a-48ff-b469-e9c1341cda96</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Rohit,&lt;/p&gt;
&lt;p&gt;I have asked our developers&amp;nbsp;about this, about how to further reduce current consumption and what the best way to do it when you want to wake up on received Zigbee commands and GPIO interrupt, in addition to the alarm and timer that is already a part of the sleep routine.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/320791?ContentTypeID=1</link><pubDate>Tue, 20 Jul 2021 03:52:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7120e19-6227-4a2f-befa-00cd7d60c6da</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any update on this?&lt;/p&gt;
&lt;p&gt;Yesterday, I ran my code which contains below snippet in code, as per your explanation it handled by stack so tested current consumption with setup.&lt;/p&gt;
&lt;p&gt;Here, I got 0.03mA after discovery/ network connect. But this is too high. I want battery life should be 2 years so I need almost 1uA.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;/**@brief Function which tries to sleep down the MCU&lt;/span&gt;&lt;br /&gt;&lt;span&gt;*&lt;/span&gt;&lt;br /&gt;&lt;span&gt;* Function which sleeps the MCU on the non-sleepy End Devices to optimize the power saving.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;* The weak definition inside the OSIF layer provides some minimal working template&lt;/span&gt;&lt;br /&gt;&lt;span&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;span&gt;zb_void_t zb_osif_go_idle(zb_void_t)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span&gt;//TODO: implement your own logic if needed&lt;/span&gt;&lt;br /&gt;&lt;span&gt;zb_osif_wait_for_event();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also, I went through product specific document I found below measurement&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;ION_RAMOFF_EVENT System ON, no RAM retention, wake on any event 0.97 &amp;mu;A&amp;quot; typically.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- I want similar should happen in my code means, It should wake up on any event either Zigbee or gpio. But I am not understanding how to enable this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- By calling &lt;span&gt;&amp;quot;nrf_pwr_mgmt_run();&amp;quot; only this function in main infinite&amp;nbsp;loop() it will give me above configuration or do I need to have any other configuration? Can you please help here the configuration. Please urgent !!.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks and Regards&lt;/p&gt;
&lt;p&gt;Rohit R&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/320597?ContentTypeID=1</link><pubDate>Mon, 19 Jul 2021 03:55:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87c93530-1f6f-43b7-9040-4abea6dfdbba</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for the response.&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/320467#320467"]Since you want your device to be able to receive Zigbee commands during low power mode, you cannot use sleepy end device.[/quote]
&lt;p&gt;- Okay , I will not configure this.&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/320467#320467"]On devices that are not sleepy end devices the stack calls the nrf_pwr_mgmt_run API if the Zigbee scheduler queue is empty. This happens through the function&amp;nbsp;zb_osif_wait_for_event(), and it happens by the stack already, as part of the internal handling of the stack inside zboss_main_loop_iteration()[/quote]
&lt;p&gt;- Okay, so since it is already declared in my code. It is minimal possible sleep config. As it is already called by stack function. I do not need to call this again and with I can check default current? correct?.&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/320467#320467"]The way you can do this is by simply creating a new definition of the function in your main.c file, as this is a weak function. This is already done in the light bulb example, so you can look there for an example of how to do this.[/quote]
&lt;p&gt;- I am using light_bulb code only. I can see they have only called below snippet. Not handled any extra things to refer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;/**@brief Function which tries to sleep down the MCU &lt;br /&gt; *&lt;br /&gt; * Function which sleeps the MCU on the non-sleepy End Devices to optimize the power saving.&lt;br /&gt; * The weak definition inside the OSIF layer provides some minimal working template&lt;br /&gt; */&lt;br /&gt;zb_void_t zb_osif_go_idle(zb_void_t)&lt;br /&gt;{&lt;br /&gt; //TODO: implement your own logic if needed&lt;br /&gt; zb_osif_wait_for_event();&lt;br /&gt;}&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/320467#320467"]as well as implementing GPIO interrupts and wake up timer.[/quote]
&lt;p&gt;- Okay, I will refer the power management code from peripheral example.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- In &lt;span&gt;nrf_pwr_mgmt_shutdown() system enters into deep sleep mode and wake up on 4 ways.&amp;quot; &lt;strong&gt;First is The DETECT signal. optionally generated by GPIO peripheral&lt;/strong&gt;&amp;quot;. This means I can use my ULP pin (GPIO pin as mentioned previous&amp;nbsp;post) to wake up device correct? Let me know if i am wrong here.?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- Let me know your feedback as soon as possible. Because I have started this file including process and I would like to complete this today. Urgent for me.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Hi, Update from me,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- I had gone through the peripheral example and some link online. I tried to execute the system off mode configuration in simple code. Here, I want to wake up device using my ULP (GPIO pin ) interrupt. But I am not finding wake up function. I have put device in sleep in while (1) loop by calling &amp;quot;nrf_pwr_mgmt_run();&amp;quot; function.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- To make system OFF enabled I have used &amp;quot;NRF_PWR_MGMT_CONFIG_STANDBY_TIMEOUT_ENABLED 1&amp;quot;. Followed the steps but it is waking up only after &amp;quot;RESET&amp;quot; is pressed but it doesn&amp;#39;t work for me.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- As stated it should work on GPIO interrupt too correct? Then why it is not working on GPIO.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- And which function/API I have to call for wake up ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Urgent. Please let me know your feedback.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks and Regards&lt;/p&gt;
&lt;p&gt;Rohit R&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/320467?ContentTypeID=1</link><pubDate>Fri, 16 Jul 2021 13:59:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bb34b44-c180-4411-92f1-c8f57f51bce5</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Rohit,&lt;/p&gt;
&lt;p&gt;Since you want your device to be able to receive Zigbee commands during low power mode, you cannot use sleepy end device. On devices that are not sleepy end devices the stack calls the nrf_pwr_mgmt_run API if the Zigbee scheduler queue is empty. This happens through the function&amp;nbsp;zb_osif_wait_for_event(), and it happens by the stack already, as part of the internal handling of the stack inside zboss_main_loop_iteration()&lt;/p&gt;
&lt;p&gt;As you want to change the default behavior of the stack sleep routines, you should overwrite the function&amp;nbsp;zb_osif_go_idle() to handle it the way you want. The way you can do this is by simply creating a new definition of the function in your main.c file, as this is a weak function. This is already done in the light bulb example, so you can look there for an example of how to do this.&amp;nbsp;You can then implement functionality for putting the device to sleep/low power mode inside this function, as well as implementing GPIO interrupts and wake up timer.&lt;/p&gt;
&lt;p&gt;I also recommend actually measuring the power consumption of the device during development, to make sure that it satisfies your specifications. You can read the part about&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/examples_zigbee.html?cp=8_3_3_8_3#example_zigbee_power_consumption_measurements"&gt;power consumption measurements&lt;/a&gt;&amp;nbsp;on our Zigbee examples page in the documentation for more information about this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/320353?ContentTypeID=1</link><pubDate>Fri, 16 Jul 2021 05:54:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6c64151-c085-450d-a965-2e744f466bef</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I had gone through the link that you have shared regarding Zigbee stack sleep.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But for me points are unclear. Means I am not getting how to handle go to sleep and wake up from sleep in this,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;/**@brief Function which tries to sleep down the MCU &lt;br /&gt; *&lt;br /&gt; * Function which sleeps the MCU on the non-sleepy End Devices to optimize the power saving.&lt;br /&gt; * The weak definition inside the OSIF layer provides some minimal working template&lt;br /&gt; */&lt;br /&gt;zb_void_t zb_osif_go_idle(zb_void_t)&lt;br /&gt;{&lt;br /&gt; //TODO: implement your own logic if needed&lt;br /&gt; zb_osif_wait_for_event();&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;can you please guide me here,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have one GPIO pins which toggles as input and output pin during command sharing between nRF and STM8 board over UART. Means this gpio pins first configured as input and if interrupt it switch to output pin and stay for 5msec high to send commands over UART.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, my plan is to use this gpio for waking up device from sleep mode. Is it possible?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And also wake up using wake up timer?&lt;/p&gt;
&lt;p&gt;I have referred ble_peripheral examples here for GPIO interrupt. Can I use same method in Zigbee code ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As per your suggestion, I have referred multi sensor example to enable sleep_now() function in my code. I have included it my code zigbee_signal_handler().&lt;/p&gt;
&lt;p&gt;Attached is my main.c file. Let me know your feed back on this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/0486.main.c"&gt;devzone.nordicsemi.com/.../0486.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;- With initialization will my sleep work and can I test the current consumption for the same?&lt;/p&gt;
&lt;p&gt;Please guide me how to implement GPIO wake up mechanism here and go to sleep()?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks and Regards&lt;/p&gt;
&lt;p&gt;Rohit R&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/320077?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 14:34:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1127f24-3bab-4340-8761-cd160a146b07</guid><dc:creator>Rohit Rajapure</dc:creator><description>&lt;p&gt;Hi Marte,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for the response.&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/320062#320062"]The button does not&amp;nbsp;make the device go into sleep mode or wake up from sleep when it is pressed. What it does is to enable sleepy end device behavior. This is there so that the user can decide, when resetting the device, whether they want the behavior enabled or not. In the multi sensor example it is enabled from start, as&amp;nbsp;zb_set_rx_on_when_idle(ZB_FALSE) is called in main() before the Zigbee stack is started. Light switch instead calls&amp;nbsp;sleepy_device_setup(), which checks whether the button for enabling sleepy end device is pressed or not, and will enable the behavior if the button is pressed. Additionally, the button must be pressed while resetting the board. Pressing the button while the device is on will not affect the sleepy end device behavior.[/quote]
&lt;p&gt;- Okay, my understanding is wrong.&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/320062#320062"]above,&amp;nbsp;zb_set_rx_on_when_idle(ZB_FALSE) will not make it go to sleep, it will enable sleepy end device behavior. It will go to sleep when there is nothing to do and the signal&amp;nbsp;ZB_COMMON_SIGNAL_CAN_SLEEP is generated. This happens when there is no immediate callback for execution and there is no outgoing packet on the MAC level. If there are any alarms in the queue, then the device will wake up when the first alarm is called. If there are no alarms in the queue, then the sleep duration is set to 10 seconds.[/quote]
&lt;p&gt;-Okay, as per your suggestion I have referred the multi sensor example and made the respected changes in zigbee_signal_handler() as&amp;nbsp;done in&amp;nbsp;multi sensor done.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- as per explanation it in sleep mode is configured and it will enter into sleep if there is no signal. Correct? Correct me if I am wrong.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And wake up from sleep every 10sec default time. Correct?&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/320062#320062"]You will not be able to use sleepy end device if you want your device to wake up if there is a Zigbee command. [/quote]
&lt;p&gt;- Okay, then How to configure it then?&amp;nbsp;&lt;/p&gt;
[quote userid="92402" url="~/f/nordic-q-a/75611/thermostat-cluster-enable-issue/320062#320062"]You can also change the sleep functionality if you do not want to use the default behavior by using the weak functions zb_osif_go_idle or zb_nrf52840_sleep. [/quote]
&lt;p&gt;- Sorry, It is unclear.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- And, we can not use this &amp;quot;&lt;span&gt;ZB_COMMON_SIGNAL_CAN_SLEEP &amp;quot;. If we are waking up device using Zigbee command and GPIO interrupt. Correct? If yes, then let me know which example explain this 2 waking mechanism. I will refer the that example for my implementation.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks and Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rohit R&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Thermostat cluster enable issue</title><link>https://devzone.nordicsemi.com/thread/320062?ContentTypeID=1</link><pubDate>Wed, 14 Jul 2021 14:04:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3de4434-fdd8-495d-b64c-d63fda488b81</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Rohit,&lt;/p&gt;
[quote user="Rohit Rajapure"]this means If button is pressed device will not go into sleep correct? or is it wake up from sleep when button pressed?[/quote]
&lt;p&gt;&amp;nbsp;The button does not&amp;nbsp;make the device go into sleep mode or wake up from sleep when it is pressed. What it does is to enable sleepy end device behavior. This is there so that the user can decide, when resetting the device, whether they want the behavior enabled or not. In the multi sensor example it is enabled from start, as&amp;nbsp;zb_set_rx_on_when_idle(ZB_FALSE) is called in main() before the Zigbee stack is started. Light switch instead calls&amp;nbsp;sleepy_device_setup(), which checks whether the button for enabling sleepy end device is pressed or not, and will enable the behavior if the button is pressed. Additionally, the button must be pressed while resetting the board. Pressing the button while the device is on will not affect the sleepy end device behavior.&lt;/p&gt;
[quote user="Rohit Rajapure"]Means, only calling this function device will go to sleep correct? But when it wake up ? Is it wake up periodically or any other way?&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;No, it will not go to sleep. As I explained in my previous reply and above,&amp;nbsp;zb_set_rx_on_when_idle(ZB_FALSE) will not make it go to sleep, it will enable sleepy end device behavior. It will go to sleep when there is nothing to do and the signal&amp;nbsp;ZB_COMMON_SIGNAL_CAN_SLEEP is generated. This happens when there is no immediate callback for execution and there is no outgoing packet on the MAC level. If there are any alarms in the queue, then the device will wake up when the first alarm is called. If there are no alarms in the queue, then the sleep duration is set to 10 seconds.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You will not be able to use sleepy end device if you want your device to wake up if there is a Zigbee command. When using sleepy end device, the device will not receive messages while it is asleep, but will poll it&amp;#39;s parent at intervals to see if there are any messages waiting for it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can also change the sleep functionality if you do not want to use the default behavior by using the weak functions zb_osif_go_idle or zb_nrf52840_sleep. See&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/zigbee_application_reference_component.html?cp=8_3_3_5_1#zarco_sleep"&gt;Zigbee stack sleep routines&lt;/a&gt;&amp;nbsp;for more information. This documentation is for v4.1.0, as the &amp;quot;Zigbee application helper functions&amp;quot; is not in the documentation for v3.0.0, but the weak functions exist in both versions.&lt;/p&gt;
&lt;p&gt;Please also see&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.thread_zigbee.v3.0.0/using_zigbee__z_c_l.html?cp=8_7_3_3_2_4#power_saving_zed"&gt;Power saving for ZED&lt;/a&gt;&amp;nbsp;to get a clearer understanding of the power saving mechanisms for end devices in the SDK.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>