2024-10-08 05:49 PM
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
2024-11-06 01:34 AM
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?
2024-11-06 04:52 AM
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.
2024-11-06 05:25 PM
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?
2024-12-01 07:57 PM
How should I implement it so that it can go into sleep mode after reset?
I turned the power off and then on again, but it didn't go into Sleep Mode.