Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SL-TEMP] Changes 917 SoC/NCP sleep config to connected sleep #339

Open
wants to merge 13 commits into
base: release_2.5-1.4
Choose a base branch
from

Conversation

bhmanda-silabs
Copy link
Contributor

@bhmanda-silabs bhmanda-silabs commented Mar 12, 2025

Description

  • In the ConfigureDeepSleep function of the SiWx platform, setting to BLE sleep config to RSI_SLEEP_MODE_8 which is deep sleep when DUT is not provisioned. So this prevents the initial BLE connection to work since DUT can't advertise in this mode.
  • This PR changes the default for all sleep configs to connected sleep which is RSI_SLEEP_MODE_2 till commissioning completed so that ble advertising and connection are working.

Testing

Verified commissioning on 917 SoC and NCP boards and commands.

@bhmanda-silabs bhmanda-silabs requested review from a team as code owners March 12, 2025 12:04
@bhmanda-silabs bhmanda-silabs changed the base branch from main to release_2.5-1.4 March 12, 2025 12:06
@mkardous-silabs
Copy link
Contributor

@bhmanda-silabs I'm not sure i understand the way the issue is being fixed here. We can fix the issue by always configuring BLE in the associated sleep mode which simplifies our logic.

This would also mean that all the ifdef in the ApplicationSleepManager can be removed.

@mkardous-silabs mkardous-silabs removed the request for review from a team March 12, 2025 12:45
@@ -53,17 +53,17 @@ CHIP_ERROR ApplicationSleepManager::Init()
void ApplicationSleepManager::OnCommissioningWindowOpened()
{
mIsCommissionningWindowOpen = true;
#if (defined(SLI_SI91X_MCU_INTERFACE) && SLI_SI91X_MCU_INTERFACE == 1)
#if (defined(SLI_SI917) && SLI_SI917 == 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This "SLI_SI917" need to be replaced with "SLI_SI91X_MCU_INTERFACE" in other places also?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"SLI_SI917" : this macro is enabled for 917 NCP and SoC boards.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any other places where we need to replace this macro (common code for NCP and SoC)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bhmanda-silabs
Copy link
Contributor Author

@bhmanda-silabs I'm not sure i understand the way the issue is being fixed here. We can fix the issue by always configuring BLE in the associated sleep mode which simplifies our logic.

Here, DUT can go deep sleep(BLE + WiFi sleep) when it is provisioned and commissioning window is closed. DUT will be active whenever requested for high performance.

This would also mean that all the ifdef in the ApplicationSleepManager can be removed.
Modified ifdef condition to SLI_SI917 as these checked should not be enabled for RS9116 boards.

@bhmanda-silabs
Copy link
Contributor Author

@bhmanda-silabs I'm not sure i understand the way the issue is being fixed here. We can fix the issue by always configuring BLE in the associated sleep mode which simplifies our logic.

Here, DUT can go deep sleep(BLE + WiFi sleep) when it is provisioned and commissioning window is closed. DUT will be active whenever requested for high performance.

This would also mean that all the ifdef in the ApplicationSleepManager can be removed.
Modified ifdef condition to SLI_SI917 as these checked should not be enabled for RS9116 boards.

@mkardous-silabs what are the sleep states required for our matter-wifi? or any design/info on the requirements?

@mkardous-silabs
Copy link
Contributor

@bhmanda-silabs I'm not sure i understand the way the issue is being fixed here. We can fix the issue by always configuring BLE in the associated sleep mode which simplifies our logic.

Here, DUT can go deep sleep(BLE + WiFi sleep) when it is provisioned and commissioning window is closed. DUT will be active whenever requested for high performance.

This would also mean that all the ifdef in the ApplicationSleepManager can be removed.
Modified ifdef condition to SLI_SI917 as these checked should not be enabled for RS9116 boards.

@mkardous-silabs what are the sleep states required for our matter-wifi? or any design/info on the requirements?

I don't have an exhaustive list of which peripherals work in each sleep state and how these peripherals behave in each sleep state. Some of this involves prototyping and testing to see how the peripherals behave and what the power consumption looks like based on the known baselines

@mkardous-silabs
Copy link
Contributor

@bhmanda-silabs I'm not sure i understand the way the issue is being fixed here. We can fix the issue by always configuring BLE in the associated sleep mode which simplifies our logic.

Here, DUT can go deep sleep(BLE + WiFi sleep) when it is provisioned and commissioning window is closed. DUT will be active whenever requested for high performance.

This would also mean that all the ifdef in the ApplicationSleepManager can be removed.
Modified ifdef condition to SLI_SI917 as these checked should not be enabled for RS9116 boards.

My point is this class exists specifically to add a new feature - Selective Listening. If a big fix is done in this class, it does not get translated to CSA which doesn't have this logic. The CanGoToDeepSleep should not go in a class whos responsibility is to determine if the device can got to LI or DTIM based sleep.

@bhmanda-silabs
Copy link
Contributor Author

@bhmanda-silabs I'm not sure i understand the way the issue is being fixed here. We can fix the issue by always configuring BLE in the associated sleep mode which simplifies our logic.

Here, DUT can go deep sleep(BLE + WiFi sleep) when it is provisioned and commissioning window is closed. DUT will be active whenever requested for high performance.

This would also mean that all the ifdef in the ApplicationSleepManager can be removed.
Modified ifdef condition to SLI_SI917 as these checked should not be enabled for RS9116 boards.

@mkardous-silabs what are the sleep states required for our matter-wifi? or any design/info on the requirements?

I don't have an exhaustive list of which peripherals work in each sleep state and how these peripherals behave in each sleep state. Some of this involves prototyping and testing to see how the peripherals behave and what the power consumption looks like based on the known baselines

@bhmanda-silabs I'm not sure i understand the way the issue is being fixed here. We can fix the issue by always configuring BLE in the associated sleep mode which simplifies our logic.

Here, DUT can go deep sleep(BLE + WiFi sleep) when it is provisioned and commissioning window is closed. DUT will be active whenever requested for high performance.

This would also mean that all the ifdef in the ApplicationSleepManager can be removed.
Modified ifdef condition to SLI_SI917 as these checked should not be enabled for RS9116 boards.

My point is this class exists specifically to add a new feature - Selective Listening. If a big fix is done in this class, it does not get translated to CSA which doesn't have this logic. The CanGoToDeepSleep should not go in a class whos responsibility is to determine if the device can got to LI or DTIM based sleep.

Ok got it. Validated by configuring BLE and WiFi to be connected state and TA is going deep sleep state after default discovery time when it closes the commissioning window and stop the BLE. Also post-commissioning, if AP is disconnected DUT switching to low power mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants