Help with Sleep Mode on nRF54L15 in Zigbee Light Switch

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(true);).

I purchased the Power Profiler Kit 2 to verify its operation. However, I did not see the microcontroller enter sleep mode at all. I even tried forcing it into sleep mode (zb_set_rx_on_when_idle(ZB_FALSE); zb_sleep_now();), but the microcontroller just reset with an error.

It seems that certain conditions need to be met before going to sleep, which may be indicated by a specific event. However, I first wanted to practice transitioning the microcontroller into different sleep modes while measuring current consumption.

By the end of the day, I was only able to achieve the deepest sleep mode, but I could not get the other modes to work. I also couldn't find clear examples—most attempts ended in failure. I’m concerned that solving this might take several days, so I’m reaching out here as a potential way to find a solution more quickly.

Is it possible to put the device into sleep mode when not in use in the Zigbee Light Switch example? What is the simplest way to transition the microcontroller into sleep mode? I believe I need System ON with GRTC.

Thank you!

Parents
  • Hi,

    However, I did not see the microcontroller enter sleep mode at all. I even tried forcing it into sleep mode (zb_set_rx_on_when_idle(ZB_FALSE); zb_sleep_now();), but the microcontroller just reset with an error.

    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.

    Is it possible to put the device into sleep mode when not in use in the Zigbee Light Switch example?

    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.

    Best regards,
    Marte

  • Good afternoon, Marte. Thank you for your response.

    In the Zigbee event handler, I log the number of each event that triggers it:


    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, &sig_hndler);
        zb_ret_t status = ZB_GET_APP_SIGNAL_STATUS(bufid);
        LOG_INF("------zboss_signal_handler: signal = %u", sig);
    

    And then, I process the event accordingly.

    However, I am not currently reacting to the signal #define ZB_COMMON_SIGNAL_CAN_SLEEP 22U inside the handler, even though it appears frequently.

    I assume that within this handler, I could implement the transition to sleep mode for the Zigbee device using zb_sleep_now();.

    When the microcontroller starts up, I use the command:
    zigbee_configure_sleepy_behavior(true);

    I am not sure what exactly I changed, but power consumption has decreased 10 times and is now 370 μA. I really hope that this is not the limit.

    Could the fact that I am using PWM on three pins for indication or other peripherals be affecting the power consumption?
    Additionally, could there be extra power consumption due to the fact that I am measuring current on the development board, which might have some additional components drawing power?

    Otherwise, the network connection is successful:

    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
    


    Best regards, Andris M.
  • Thank you. I have achieved the desired result. The minimum power consumption in sleep mode is 4 µ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).

    I measured the average power consumption in sleep mode over five minutes, which turned out to be 13 µA. This is approximately four times more efficient than the MG22 from Silicon Labs.

    I still don’t fully understand how exactly I achieved this result. I disabled everything possible in the devicetree, but the power consumption did not decrease. What helped was adding the following lines to the config file:

    CONFIG_ADC=n CONFIG_SERIAL=n CONFIG_I2C=n CONFIG_SPI=n

    I haven't yet tested which specific setting had the most impact, but I am now confident that the product is more than competitive.

Reply
  • Thank you. I have achieved the desired result. The minimum power consumption in sleep mode is 4 µ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).

    I measured the average power consumption in sleep mode over five minutes, which turned out to be 13 µA. This is approximately four times more efficient than the MG22 from Silicon Labs.

    I still don’t fully understand how exactly I achieved this result. I disabled everything possible in the devicetree, but the power consumption did not decrease. What helped was adding the following lines to the config file:

    CONFIG_ADC=n CONFIG_SERIAL=n CONFIG_I2C=n CONFIG_SPI=n

    I haven't yet tested which specific setting had the most impact, but I am now confident that the product is more than competitive.

Children
Related