cancel
Showing results for 
Search instead for 
Did you mean: 

I found some functions in the zigbee.h file. How can I use them to reduce energy consumption?

Maxim Shylo
Associate II

/*---------------------------------------------------------

 * Shutdown

 *---------------------------------------------------------

 */

/* This API moves the stack to shutdown mode, used in case of a sleepy end device to conserve power. */

void ZbShutdown(struct ZigBeeT *zb);

/* The following APIs are to pause the stack and allow another service to use the

 * MAC layer. Upon resume, the MAC interface(s) are reconfigured to work with the

 * Zigbee stack again. */

enum ZbStatusCodeT ZbStatePause(struct ZigBeeT *zb, void (*callback)(void *arg), void *arg);

enum ZbStatusCodeT ZbStateResume(struct ZigBeeT *zb);

4 REPLIES 4
PPREN.1
ST Employee

Hi Maxim,

Those 3 functions (ZbShutdown,ZbStatePause,ZbStateResume) are not directly related to reducing energy consumption. They are targeting concurrent mode applications (static or dynamic BLE + Zigbee for example). Pause and Resume are then necessary to be used.

Best example to reduce energy consumption is the OnOff SED exemple (with a ZC, ZC having a much higher power consumption since always running).

Please, don't hesitate to add additional questions if this answer is not complete (or to open a new question, to be aaligned between the title and the question).

Cdlt, Pascal

Hi Pascal,

Thank you for your answer on this question and my previous question:

https://community.st.com/s/question/0D53W00001XvYTzSAN/hi-everyone-i-took-the-example-of-a-project-zigbeeonoffclientsed-on-a-module-stm32wb5mmgh6tr-and-got-a-supply-current-of-3-ma-instead-of-3-%CE%BCahow-can-i-fix-sleep-mode

I am having a problem with STOP2 mode on the STM32WB module.

Based on recommendation given in AN5506, I took the Zigbee_OnOff_Client_SED project and flashed it into the custom board hosting the STM32WB5MMGH6TR module (there is nothing else on the board, just the module). The board/module are powered from 3.3VDC.

My problem is too high current consumption. I expected to get few uAmps but I got hundreds uAmps.

When I connect the SED to the Zigbee_OnOff_Server_Coord I get 168uAmp, instead of 3uAmp (defined in AN5506) in a sleep mode.

At the same time if I connect the SED to another ZigBee hub (*****) as a general ZigBee device I get 3mAmp!!! So the SED never sleeps.

To make sure the measurements are done correctly I disconnected the ST-Link.

The symbol STM32WB55xx in the project is redefined to STM32WB5Mxx.

I also tried the example "PWR_STOP2_RTC" but it doesn't work.

So there two questions:

1) Is it really possible to get down to 3uAmp? What shall I do? Is there any instruction? I have tried everything I could.

2) Why there is a difference in the current consumption when connection to different ZigBee hubs (Zigbee_OnOff_Server_Coord vs *****)? Is there anything specific about SED in the hub? It looks like the SED never sleeps when connected to one hub and it sleeps when connected to the Zigbee_OnOff_Server_Coord.

Thank you for your support!

PPREN.1
ST Employee

Hi Maxim,

I would be very happy to help you but I am not sure I will with this answer: not reproducing the error since not exactly the same setup at my side, hence only "ideas" (that you certainly already had in this message.

It is very easy to have a leakage current in a pad not configured the right way. Even pull up or pull down are needed to be setup accordingly to WB part and schematic. It is also easy to "shift" from an application that has "low conso" to another "state" where the conso is higher (let's take an example, when you are re-using a timer that is trigged after 10 minutes, and it is "killing" your nicely "low conso" application.

Hence...

>1) Is it really possible to get down to 3uAmp? What shall I do? Is there any instruction? I have tried everything I could.

--> I would say yes, with the appropriate schematic, with the appropriate application similar to OnOff_SED + Coord, you will get 3 uA (and a bit more depending on the frequency of exiting the stop2 mode that are mainly done with those 2 lines in P-NUCLEO-WB55.Nucleo\Applications\Zigbee\Zigbee_OnOff_Client_SED\STM32_WPAN\Appapp_zigbee.c :

   UTIL_LPM_SetStopMode(1U << CFG_LPM_APP, UTIL_LPM_ENABLE);

   UTIL_LPM_SetOffMode(1U << CFG_LPM_APP, UTIL_LPM_DISABLE);

My advice is only to review step by step your code. To get a simplified code that is doing the STOP2 mode and with this basic "SED always sleepy like" application, investigate why you are not getting it.

I guess ST has provided the schematic of the nucleo board as well as the packaged used (being STM32WBRG = 64 pins)

and the module STM32WB55M-CSP100 or STM32WB55M-QFN68 : here, I am not sure... can you add the schematic in the ticket and WB exact package?

>2) Why there is a difference in the current consumption when connection to different ZigBee hubs (Zigbee_OnOff_Server_Coord vs *****)?

--> I don't know. My guess is that the commissioning was not done, hence, going to 3 uA is never happening. To simplify, the 4 steps of a SED: step1:network search, step2: network commissioning step3: sleepy SED STPO 2 mode step4: SED not sleepy, waking up with a low power timer and doing stuff before going back to STOP2 at the end.

Please, don't hesitate to add additional info / answer / or questions if this answer is not complete (or to open a new question, to be aligned between the title and the question).

Cdlt, Pascal

Hi Pascal,

Thank you for your replay.

As you asked, I provide a schematic of the device.

There is nothing there but the module STM32WB5MMGH6TR.

0693W00000NrR8FQAV.png 

Kind Regards, 

Maxim