cancel
Showing results for 
Search instead for 
Did you mean: 

How to put Matter Device into Sleep Mode

AkihiroN
Associate III

We are developing a Matter device using X-CUBE-MATTER.
When we set CFG_FULL_LOW_POWER to 1 to enable sleep mode, pressing B1 for 10 seconds does not enter Factory Reset and BLE advertising is not executed.
When we checked the current consumption, it seems to be in sleep mode, but because BLE advertising is not executed, commissioning is not possible.
Please tell me the solution or the specification.
The development environment is described below.
Hardware: STM32WB5MMG-DK
Firmware: Window-App-SBSFU
X-CUBE-MATTER Version: 1.1
Implementation CFG_FULL_LOW_POWER is set to 1

12 REPLIES 12

Thank you for your help.
Is it necessary to comment out (not enable) UTIL_LPM_SetStopMode(1 << CFG_LPM_APP_THREAD, UTIL_LPM_ENABLE); in app_thread.c (not enable here) and add (enable) UTIL_LPM_SetStopMode(1 << CFG_LPM_APP_THREAD, UTIL_LPM_ENABLE); in AppTask .cpp, is it necessary to add (enable) UTIL_LPM_SetStopMode(1 << CFG_LPM_APP_THREAD, UTIL_LPM_ENABLE); when kCommissioningComplete is executed?

EPASZ.1
ST Employee

In app_thread.c, you shouldn't modify anything. This handles the LP modes for the stack point of view.

In AppTask, yes you need to enable it under kCommissioningComplete - it is part of my previous post.

Thank you for your help.

I have implemented the changes you shared.

I tried commissioning on the Apple platform, but it failed. It seems that the network is participating (up to kCommissioningComplete), but if you put CFG_LPM_APP in stop mode or sleep mode when setting the HomeApp side afterwards, the connection will fail.

As a test, you can comment out UTIL_LPM_SetOffMode(1U << CFG_LPM_APP, UTIL_LPM_ENABLE) and UTIL_LPM_SetStopMode(1U << CFG_LPM_APP, UTIL_LPM_ENABLE) in case DeviceEventType::kCommissioningComplete: to successfully complete the commissioning process.

You may also need to enable Sleep Mode or Stop Mode at a later time. Please tell me how to do this.

 

Also, I have one question. In the Generic Switch App, Sleep Mode is enabled simply by enabling CFG_FULL_LOW_POWER without implementing anything like this, and commissioning is successful. Is there any connection to the fact that SBSFU is implemented?