<?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>Help with Sleep Mode on nRF54L15 in Zigbee Light Switch</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119488/help-with-sleep-mode-on-nrf54l15-in-zigbee-light-switch</link><description>Hello, 
 I am developing a Zigbee switch based on the nRF54L15. One of the mandatory features is transitioning into sleep mode when the device is not in use. I thought I had implemented this using the same approach as in the example ( zigbee_configure_sleepy_behavior</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Mar 2025 08:44:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119488/help-with-sleep-mode-on-nrf54l15-in-zigbee-light-switch" /><item><title>RE: Help with Sleep Mode on nRF54L15 in Zigbee Light Switch</title><link>https://devzone.nordicsemi.com/thread/526301?ContentTypeID=1</link><pubDate>Fri, 07 Mar 2025 08:44:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:620c1ea5-a306-43a3-bf74-a140d75ce5ed</guid><dc:creator>MAndris</dc:creator><description>&lt;p&gt;&lt;span&gt;Thank you&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with Sleep Mode on nRF54L15 in Zigbee Light Switch</title><link>https://devzone.nordicsemi.com/thread/526173?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2025 12:57:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a31a839-9b61-4bbb-8977-2fae1841a642</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Great to hear that you figured it out!&lt;/p&gt;
[quote user="MAndris"]I believe these spikes occur because the device sends a data request every five seconds[/quote]
&lt;p&gt;Yes, the device will send these data requests as part of the keep-alive mechanism.&lt;/p&gt;
[quote user="MAndris"]I disabled everything possible in the &lt;strong&gt;devicetree&lt;/strong&gt;, but the power consumption did not decrease. What helped was adding the following lines to the &lt;strong&gt;config file&lt;/strong&gt;:[/quote]
&lt;p&gt;You should disable things both in devicetree and Kconfig to ensure that they are completely disabled and do not affect power consumption.&lt;/p&gt;
&lt;p&gt;We also have the guide &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.9.1/page/nrf/test_and_optimize/optimizing/power_general.html"&gt;Power optimization recommendations&lt;/a&gt;, but it seems like you are already doing what is mentioned there.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with Sleep Mode on nRF54L15 in Zigbee Light Switch</title><link>https://devzone.nordicsemi.com/thread/525995?ContentTypeID=1</link><pubDate>Wed, 05 Mar 2025 13:42:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c90bedc-f30f-40a7-b9f2-8a83c5aa03a7</guid><dc:creator>MAndris</dc:creator><description>&lt;p data-start="0" data-end="278"&gt;Thank you. I have achieved the desired result. The minimum power consumption in sleep mode is 4 &amp;micro;A, with periodic spikes. I believe these spikes occur because the device sends a data request every five seconds (as observed in the Zigbee sniffer, which shows data transmission).&lt;/p&gt;
&lt;p data-start="280" data-end="477"&gt;I measured the &lt;strong data-start="295" data-end="356"&gt;average power consumption in sleep mode over five minutes&lt;/strong&gt;, which turned out to be &lt;strong data-start="381" data-end="390"&gt;13 &amp;micro;A&lt;/strong&gt;. This is approximately &lt;strong data-start="414" data-end="475"&gt;four times more efficient than the MG22 from Silicon Labs&lt;/strong&gt;.&lt;/p&gt;
&lt;p data-start="479" data-end="710"&gt;I still don&amp;rsquo;t fully understand how exactly I achieved this result. I disabled everything possible in the &lt;strong data-start="584" data-end="598"&gt;devicetree&lt;/strong&gt;, but the power consumption did not decrease. What helped was adding the following lines to the &lt;strong data-start="694" data-end="709"&gt;config file&lt;/strong&gt;:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class="absolute bottom-0 right-2 flex h-9 items-center"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="overflow-y-auto p-4" dir="ltr"&gt;&lt;code class="!whitespace-pre"&gt;&lt;span&gt;&lt;span class="hljs-attr"&gt;CONFIG_ADC&lt;/span&gt;=n
&lt;span class="hljs-attr"&gt;CONFIG_SERIAL&lt;/span&gt;=n
&lt;span class="hljs-attr"&gt;CONFIG_I2C&lt;/span&gt;=n
&lt;span class="hljs-attr"&gt;CONFIG_SPI&lt;/span&gt;=n
&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p data-start="776" data-end="910" data-is-last-node="" data-is-only-node=""&gt;I haven&amp;#39;t yet tested which specific setting had the most impact, but I am now &lt;strong data-start="854" data-end="909"&gt;confident that the product is more than competitive&lt;/strong&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with Sleep Mode on nRF54L15 in Zigbee Light Switch</title><link>https://devzone.nordicsemi.com/thread/525778?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 15:37:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6f47a67-659d-4fd8-983f-5b6d3985e829</guid><dc:creator>MAndris</dc:creator><description>&lt;p data-start="31" data-end="77"&gt;Good afternoon, Marte. Thank you for your response.&lt;/p&gt;
&lt;p data-start="79" data-end="156"&gt;In the Zigbee event handler, I log the number of each event that triggers it:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void zboss_signal_handler(zb_bufid_t bufid)
{
    zb_zdo_app_signal_hdr_t *sig_hndler = NULL;
    zb_zdo_app_signal_type_t sig = zb_get_app_signal(bufid, &amp;amp;sig_hndler);
    zb_ret_t status = ZB_GET_APP_SIGNAL_STATUS(bufid);
    LOG_INF(&amp;quot;------zboss_signal_handler: signal = %u&amp;quot;, sig);
&lt;/pre&gt;&lt;code class="!whitespace-pre language-c"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p data-start="452" data-end="496"&gt;And then, I process the event accordingly.&lt;/p&gt;
&lt;p data-start="498" data-end="646"&gt;However, I am not currently reacting to the signal &lt;code data-start="549" data-end="589"&gt;#define ZB_COMMON_SIGNAL_CAN_SLEEP 22U&lt;/code&gt; inside the handler, even though it appears frequently.&lt;/p&gt;
&lt;p data-start="648" data-end="778"&gt;I assume that within this handler, I could implement the transition to sleep mode for the Zigbee device using &lt;code data-start="758" data-end="775"&gt;zb_sleep_now();&lt;/code&gt;.&lt;/p&gt;
&lt;p data-start="780" data-end="880"&gt;When the microcontroller starts up, I use the command:&lt;br data-start="834" data-end="837" /&gt;&lt;code data-start="837" data-end="878"&gt;zigbee_configure_sleepy_behavior(true);&lt;/code&gt;&lt;/p&gt;
&lt;p data-start="882" data-end="1035"&gt;I am not sure what exactly I changed, but power consumption has decreased &lt;strong data-start="956" data-end="968"&gt;10 times&lt;/strong&gt; and is now &lt;strong data-start="980" data-end="990"&gt;370 &amp;mu;A&lt;/strong&gt;. I really hope that this is not the limit.&lt;/p&gt;
&lt;p data-start="1037" data-end="1167"&gt;Could the fact that I am using &lt;strong data-start="1068" data-end="1104"&gt;PWM on three pins for indication&lt;/strong&gt; or &lt;strong data-start="1108" data-end="1129"&gt;other peripherals&lt;/strong&gt; be affecting the power consumption?&lt;br /&gt;Additionally, could there be &lt;strong data-start="1198" data-end="1225"&gt;extra power consumption&lt;/strong&gt; due to the fact that I am measuring current on the &lt;strong data-start="1277" data-end="1298"&gt;development board&lt;/strong&gt;, which might have some additional components drawing power?&lt;/p&gt;
&lt;p data-start="1169" data-end="1219"&gt;Otherwise, the network connection is successful:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;Joined network successfully (Extended PAN ID: 917b6a97525f25b3, PAN ID: 0xe3b1)
I: Network rejoin procedure stopped as NOT scheduled.
I: ------zboss_signal_handler: signal = 22
I: ------zboss_signal_handler: signal = 22
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Best regards, Andris M.&lt;code class="!whitespace-pre"&gt;&lt;span&gt;&lt;span class="hljs-number"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with Sleep Mode on nRF54L15 in Zigbee Light Switch</title><link>https://devzone.nordicsemi.com/thread/525730?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 13:20:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9435ae10-1b4b-4953-bbd6-0b2f9454f570</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]However, I did not see the microcontroller enter sleep mode at all. I even tried forcing it into sleep mode (&lt;code&gt;zb_set_rx_on_when_idle(ZB_FALSE); zb_sleep_now();&lt;/code&gt;), but the microcontroller just reset with an error.[/quote]
&lt;p&gt;Had the device joined a Zigbee network at this point? When you enable sleepy behavior with zigbee_configure_sleepy_behavior(true) or zb_set_rx_on_when_idle(ZB_FALSE), the device will enter sleep when there is nothing in the queue. This is done by the signal ZB_COMMON_SIGNAL_CAN_SLEEP being triggered. However, if the device has not joined a network, it will not go to sleep, as it will continue trying to join one.&lt;/p&gt;
[quote user=""]Is it possible to put the device into sleep mode when not in use in the &lt;strong&gt;Zigbee Light Switch&lt;/strong&gt; example?[/quote]
&lt;p&gt;You can enable sleepy behavior in the light switch sample by pressing button 2 while the device is booting. Make sure to do this when the device is booting before it has joined a network for the first time. &lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with Sleep Mode on nRF54L15 in Zigbee Light Switch</title><link>https://devzone.nordicsemi.com/thread/525728?ContentTypeID=1</link><pubDate>Tue, 04 Mar 2025 13:18:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b40c8412-6785-472f-b2fd-0f1ab3d81572</guid><dc:creator>MAndris</dc:creator><description>&lt;p data-start="119" data-end="133"&gt;Hello again,&lt;/p&gt;
&lt;p data-start="135" data-end="331"&gt;I am continuing to explore this topic. Based on the power consumption table:&lt;br data-start="211" data-end="214" /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/keyfeatures_html5.html#ariaid-title1" target="_new" data-start="214" data-end="329"&gt;Power Consumption Table&lt;/a&gt;&lt;/p&gt;
&lt;p data-start="333" data-end="566"&gt;The &lt;strong data-start="337" data-end="384"&gt;&amp;quot;POWER ON IDLE with GRTC 256 kB RAM (3 &amp;mu;A)&amp;quot;&lt;/strong&gt; mode is acceptable for my power consumption requirements, but I do not yet understand how to achieve it. I am reading the available documentation, and I have two concepts in mind:&lt;/p&gt;
&lt;ol data-start="568" data-end="854"&gt;
&lt;li data-start="568" data-end="705"&gt;The system automatically reduces power consumption depending on the active resources, and I need to manually disable device drivers.&lt;/li&gt;
&lt;li data-start="706" data-end="854"&gt;I manually issue a command to enter a low-power mode, with some function remaining active that can wake up the microcontroller from this state.&lt;/li&gt;
&lt;/ol&gt;
&lt;p data-start="856" data-end="1174"&gt;So far, &lt;strong data-start="864" data-end="878"&gt;deep sleep&lt;/strong&gt; is the only mode I have successfully implemented. From the documentation, I understand that wake-up from this state can occur via &lt;strong data-start="1009" data-end="1034"&gt;a signal on GPIO pins&lt;/strong&gt; (The DETECT signal generated by the GPIO peripheral).&lt;br data-start="1088" data-end="1091" /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf54L15/page/pmu.html" target="_new" data-start="1091" data-end="1172"&gt;PMU Documentation&lt;/a&gt;&lt;/p&gt;
&lt;p data-start="1176" data-end="1468"&gt;This means I can implement my intended functionality using this mode. The key question is &lt;strong data-start="1266" data-end="1398"&gt;how long after pressing a button in sleep mode the microcontroller will reboot and send a Zigbee signal based on the pressed key&lt;/strong&gt;. If this delay is too long, deep sleep mode may become impractical.&lt;/p&gt;
&lt;p data-start="1470" data-end="1647"&gt;Currently, I am trying to write a simple example program to train myself in entering &lt;strong data-start="1555" data-end="1606"&gt;deep sleep and waking up via one of two buttons&lt;/strong&gt;, using the nRF54L15 development board.&lt;/p&gt;
&lt;p data-start="1649" data-end="1838"&gt;I have defined the button pins using &lt;strong data-start="1686" data-end="1700"&gt;DT aliases&lt;/strong&gt; in the device tree and am using &lt;code data-start="1733" data-end="1738"&gt;sw1&lt;/code&gt; and &lt;code data-start="1743" data-end="1748"&gt;sw2&lt;/code&gt;. I believe the microcontroller successfully enters sleep mode, but it does not wake up.&lt;/p&gt;
&lt;h3 id="mcetoc_1ilgkoa4m0" data-start="1840" data-end="1863"&gt;&lt;strong data-start="1844" data-end="1861"&gt;Current Code:&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;strong data-start="1844" data-end="1861"&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/sys/poweroff.h&amp;gt;
#include &amp;lt;zephyr/drivers/gpio.h&amp;gt;
#include &amp;lt;zephyr/logging/log.h&amp;gt;

LOG_MODULE_REGISTER(sleep_test, LOG_LEVEL_DBG);

#define WAKEUP_PIN1_NODE DT_ALIAS(sw1)
#define WAKEUP_PIN2_NODE DT_ALIAS(sw2)

void configure_wakeup_pins(void)
{
    LOG_INF(&amp;quot;Configuring wakeup pins...&amp;quot;);
    const struct device *gpio_dev1 = DEVICE_DT_GET(DT_GPIO_CTLR(WAKEUP_PIN1_NODE, gpios));
    const struct device *gpio_dev2 = DEVICE_DT_GET(DT_GPIO_CTLR(WAKEUP_PIN2_NODE, gpios));

    gpio_pin_configure(gpio_dev1, DT_GPIO_PIN(WAKEUP_PIN1_NODE, gpios), GPIO_INPUT | GPIO_PULL_UP);
    gpio_pin_configure(gpio_dev2, DT_GPIO_PIN(WAKEUP_PIN2_NODE, gpios), GPIO_INPUT | GPIO_PULL_UP);
    
    gpio_pin_interrupt_configure(gpio_dev1, DT_GPIO_PIN(WAKEUP_PIN1_NODE, gpios), GPIO_INT_EDGE_TO_ACTIVE);
    gpio_pin_interrupt_configure(gpio_dev2, DT_GPIO_PIN(WAKEUP_PIN2_NODE, gpios), GPIO_INT_EDGE_TO_ACTIVE);
    LOG_INF(&amp;quot;Wakeup pins configured.&amp;quot;);
}

int main(void)
{
        LOG_INF(&amp;quot;Starting system...&amp;quot;);
        configure_wakeup_pins();
        LOG_INF(&amp;quot;Entering System OFF mode.&amp;quot;);
        k_msleep(2000);
        sys_poweroff();
        LOG_ERR(&amp;quot;This should never be printed! System OFF should not return.&amp;quot;);
	while (1) {
		k_msleep(2000);
                LOG_INF(&amp;quot;while 2000&amp;quot;);
	}
}&lt;/pre&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;code class="!whitespace-pre language-c"&gt;&lt;span&gt;&lt;span class="hljs-meta"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;code class="!whitespace-pre language-c"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h3 id="mcetoc_1ilgkoa4m1" data-start="3177" data-end="3219"&gt;&lt;strong data-start="3181" data-end="3217"&gt;Configuration File (&lt;code data-start="3203" data-end="3213"&gt;prj.conf&lt;/code&gt;):&lt;/strong&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;CONFIG_REBOOT=y
CONFIG_POWEROFF=y

CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_SERIAL=y
CONFIG_GPIO=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_LOG=y&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;code class="!whitespace-pre"&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p data-start="3378" data-end="3539"&gt;Additionally, I would also like to implement &lt;strong data-start="3423" data-end="3452"&gt;&amp;quot;POWER ON IDLE with GRTC&amp;quot;&lt;/strong&gt; mode in the future to better understand power management in Zephyr and the nRF54L15.&lt;/p&gt;
&lt;p data-start="3541" data-end="3700"&gt;I would appreciate any references to articles or documentation that can help me better understand &lt;strong data-start="3639" data-end="3665"&gt;power management modes&lt;/strong&gt; and their proper implementation.&lt;/p&gt;
&lt;p data-start="3702" data-end="3725"&gt;Thank you in advance!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>