Skip to content

Conversation

@jepenven-silabs
Copy link
Contributor

Summary

Add deep sleep support that shutdown the chip completely for the duration of the Long Idle Time ICD. This reduces the power consumption down to 0.6uA at the cost of RAM retention.

This is a PoC as an SDK issue is actually preventing extra long sleep time.

Related issues

None

Testing

Locally at Silicon Labs.

  • Compiles, function is reached but because of previously stated issue the EM4Trigger function is never actually called. When called manually device enter EM4 sleep and wakes up at the end of the timer.

Copilot AI review requested due to automatic review settings October 16, 2025 18:27
@jepenven-silabs jepenven-silabs requested a review from a team as a code owner October 16, 2025 18:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds optional deep sleep (EM4) support for Silicon Labs sample apps to reduce power consumption during Long Idle Time ICD by fully shutting down the chip.

  • Introduces build-time flag sl_em4_sleep and associated preprocessor logic.
  • Adds EM4 trigger implementation using BURTC and EMU along with idle hook logic gated by ICD mode.
  • Includes new em_burtc source and conditional sleep behavior with threshold checking.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
third_party/silabs/efr32_sdk.gni Adds sl_em4_sleep arg, propagate define, and include BURTC source to enable EM4 functionality.
examples/platform/silabs/MatterConfig.cpp Implements EM4 entry routine and integrates it into FreeRTOS idle hook under ICD LIT mode with threshold logic.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds deep sleep (EM4) support for Silabs sample applications to reduce power consumption during long idle periods. The changes introduce a new build flag sl_em4_sleep and associated logic in MatterConfig.cpp to trigger EM4 sleep via vApplicationIdleHook when the device is in LIT ICD mode.

My review identified a critical bug in the sleep duration calculation where time units were mismatched, which would cause incorrect sleep times. I've also pointed out a minor redundancy in the EM4 trigger function for code cleanup. Overall, the approach is good, but the unit conversion issue needs to be addressed.

@github-actions
Copy link

PR #41487: Size comparison from e147761 to 49ff1ae

Full report (5 builds for cc32xx, realtek, stm32)
platform target config section e147761 49ff1ae change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554066 554066 0 0.0
RAM 205504 205504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 586942 587318 376 0.1
RAM 205752 205768 16 0.0
realtek light-switch-app rtl8777g FLASH 706008 706224 216 0.0
RAM 106792 106800 8 0.0
lighting-app rtl8777g FLASH 757120 757320 200 0.0
RAM 127164 127164 0 0.0
stm32 light STM32WB5MM-DK FLASH 469612 469812 200 0.0
RAM 141248 141248 0 0.0

@github-actions
Copy link

PR #41487: Size comparison from e147761 to 0f79208

Full report (4 builds for nrfconnect, realtek, stm32)
platform target config section e147761 0f79208 change % change
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 932836 932776 -60 -0.0
RAM 161033 161069 36 0.0
realtek light-switch-app rtl8777g FLASH 706008 706208 200 0.0
RAM 106792 106800 8 0.0
lighting-app rtl8777g FLASH 757120 757304 184 0.0
RAM 127164 127164 0 0.0
stm32 light STM32WB5MM-DK FLASH 469612 469772 160 0.0
RAM 141248 141248 0 0.0

@jepenven-silabs jepenven-silabs marked this pull request as draft October 27, 2025 14:38
@jepenven-silabs jepenven-silabs marked this pull request as ready for review October 28, 2025 14:23
Copilot AI review requested due to automatic review settings October 28, 2025 14:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

@github-actions
Copy link

PR #41487: Size comparison from c19accc to 7d2dab7

Full report (1 build for stm32)
platform target config section c19accc 7d2dab7 change % change
stm32 light STM32WB5MM-DK FLASH 469892 469892 0 0.0
RAM 141312 141312 0 0.0

@jepenven-silabs jepenven-silabs added the changing-git-submodules-on-purpose This PR is changing git submodules on intentionally (and it is not a "commit all" typo/mistake) label Oct 28, 2025
@github-actions
Copy link

github-actions bot commented Oct 28, 2025

PR #41487: Size comparison from c19accc to a966c0e

Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section c19accc a966c0e change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1106076 1106076 0 0.0
RAM 178882 178882 0 0.0
bl702 lighting-app bl702+eth FLASH 661228 661228 0 0.0
RAM 134969 134969 0 0.0
bl702+wifi FLASH 836764 836764 0 0.0
RAM 124405 124405 0 0.0
bl706+mfd+rpc+littlefs FLASH 1070308 1070308 0 0.0
RAM 117277 117277 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 899760 899760 0 0.0
RAM 105540 105540 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 983070 983070 0 0.0
RAM 109756 109756 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770436 770436 0 0.0
RAM 103304 103304 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 782184 782184 0 0.0
RAM 108472 108472 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 728244 728244 0 0.0
RAM 97364 97364 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 712704 712704 0 0.0
RAM 97580 97580 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554578 554578 0 0.0
RAM 205744 205744 0 0.0
lock CC3235SF_LAUNCHXL FLASH 587234 587234 0 0.0
RAM 205840 205840 0 0.0
efr32 lock-app BRD4187C FLASH 962976 962976 0 0.0
RAM 123512 123512 0 0.0
BRD4338a FLASH 756424 756424 0 0.0
RAM 254144 254144 0 0.0
window-app BRD4187C FLASH 1058172 1058172 0 0.0
RAM 119740 119740 0 0.0
esp32 all-clusters-app c3devkit DRAM 102524 102524 0 0.0
FLASH 1836410 1836410 0 0.0
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 933180 933180 0 0.0
RAM 161317 161317 0 0.0
nxp contact mcxw71+release FLASH 691936 691936 0 0.0
RAM 61496 61496 0 0.0
lighting mcxw71+release FLASH 723440 723440 0 0.0
RAM 68148 68148 0 0.0
lock mcxw71+release FLASH 773704 773704 0 0.0
RAM 61932 61932 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1676836 1676836 0 0.0
RAM 213908 213908 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1593276 1593276 0 0.0
RAM 211116 211116 0 0.0
light cy8ckit_062s2_43012 FLASH 1459388 1459388 0 0.0
RAM 197736 197736 0 0.0
lock cy8ckit_062s2_43012 FLASH 1491940 1491940 0 0.0
RAM 225448 225448 0 0.0
qpg lighting-app qpg6200+debug FLASH 837216 837216 0 0.0
RAM 127716 127716 0 0.0
lock-app qpg6200+debug FLASH 773996 773996 0 0.0
RAM 118692 118692 0 0.0
realtek light-switch-app rtl8777g FLASH 706416 706416 0 0.0
RAM 106904 106904 0 0.0
lighting-app rtl8777g FLASH 757512 757512 0 0.0
RAM 127236 127236 0 0.0
stm32 light STM32WB5MM-DK FLASH 469892 469892 0 0.0
RAM 141312 141312 0 0.0
telink bridge-app tl7218x FLASH 710534 710534 0 0.0
RAM 90544 90544 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 796888 796888 0 0.0
RAM 41008 41008 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 788088 788088 0 0.0
RAM 93644 93644 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 714966 714966 0 0.0
RAM 51852 51852 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 748262 748262 0 0.0
RAM 70892 70892 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725118 725118 0 0.0
RAM 34600 34600 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602362 602362 0 0.0
RAM 108912 108912 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 820692 820696 4 0.0
RAM 92040 92040 0 0.0

@jepenven-silabs jepenven-silabs added sdk-maintainer-approved PR marked by `matter-sdk-maintainers` as suitable for MERGE - meets guideline & sufficient reviews. and removed sdk-maintainer-approved PR marked by `matter-sdk-maintainers` as suitable for MERGE - meets guideline & sufficient reviews. labels Oct 29, 2025
@jmartinez-silabs jmartinez-silabs added the sdk-maintainer-approved PR marked by `matter-sdk-maintainers` as suitable for MERGE - meets guideline & sufficient reviews. label Oct 29, 2025
@mergify mergify bot merged commit 36d6fc0 into project-chip:master Oct 29, 2025
82 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changing-git-submodules-on-purpose This PR is changing git submodules on intentionally (and it is not a "commit all" typo/mistake) examples platform review - pending sdk-maintainer-approved PR marked by `matter-sdk-maintainers` as suitable for MERGE - meets guideline & sufficient reviews. silabs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants