Skip to content

Commit

Permalink
snippets: Added snippet for Matter power consumption measurements
Browse files Browse the repository at this point in the history
Matter requires some extra configuration for the power consumption
measurements that are automatized. This change introduces snippet
that simplifies it and adds dedicated variant in the sample.ymls.

Signed-off-by: Kamil Kasperczyk <[email protected]>
  • Loading branch information
kkasperczyk-no committed Jan 24, 2025
1 parent a14efda commit 6b4c40f
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 14 deletions.
13 changes: 8 additions & 5 deletions samples/matter/lock/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,20 @@ tests:
tags:
- sysbuild
- ci_samples_matter
sample.matter.lock.release.nrf54l15.power_consumption:
sample.matter.lock.release.power_consumption:
sysbuild: true
build_only: true
extra_args:
- FILE_SUFFIX=release
- CONFIG_NCS_SAMPLE_MATTER_LEDS=n
- CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y
- CONFIG_NCS_SAMPLE_MATTER_WATCHDOG=n
- lock_SNIPPET=power-consumption-tests
integration_platforms:
- nrf52840dk/nrf52840
- nrf5340dk/nrf5340/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
platform_allow:
- nrf52840dk/nrf52840
- nrf5340dk/nrf5340/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
platform_allow: nrf54l15dk/nrf54l15/cpuapp
tags:
- sysbuild
- ci_samples_matter
11 changes: 6 additions & 5 deletions samples/matter/smoke_co_alarm/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,20 @@ tests:
tags:
- sysbuild
- ci_samples_matter
sample.matter.smoke_co_alarm.release.nrf54l15.power_consumption:
sample.matter.smoke_co_alarm.release.power_consumption:
sysbuild: true
build_only: true
extra_args:
- FILE_SUFFIX=release
- CONFIG_NCS_SAMPLE_MATTER_LEDS=n
- CONFIG_NCS_SAMPLE_MATTER_WATCHDOG=n
- smoke_co_alarm_SNIPPET=power-consumption-tests
integration_platforms:
- nrf52840dk/nrf52840
- nrf5340dk/nrf5340/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
platform_allow:
- nrf52840dk/nrf52840
- nrf5340dk/nrf5340/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
tags:
- sysbuild
- ci_samples_matter
Expand Down
12 changes: 8 additions & 4 deletions samples/matter/window_covering/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,20 @@ tests:
tags:
- sysbuild
- ci_samples_matter
sample.matter.window_cover.release.nrf54l15.power_consumption:
sample.matter.window_cover.release.power_consumption:
sysbuild: true
build_only: true
extra_args:
- FILE_SUFFIX=release
- CONFIG_NCS_SAMPLE_MATTER_LEDS=n
- CONFIG_NCS_SAMPLE_MATTER_WATCHDOG=n
- window_covering_SNIPPET=power-consumption-tests
integration_platforms:
- nrf52840dk/nrf52840
- nrf5340dk/nrf5340/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
platform_allow:
- nrf52840dk/nrf52840
- nrf5340dk/nrf5340/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
platform_allow: nrf54l15dk/nrf54l15/cpuapp
tags:
- sysbuild
- ci_samples_matter
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Disable LEDs that lead to the current leakages
CONFIG_NCS_SAMPLE_MATTER_LEDS=n

# Disable watchdog that increases the sleep current
CONFIG_NCS_SAMPLE_MATTER_WATCHDOG=n

# Increase MPSL calibration period to prevent too often CPU wake-ups.
CONFIG_MPSL_CALIBRATION_PERIOD=60000
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Disable LEDs that lead to the current leakages
CONFIG_NCS_SAMPLE_MATTER_LEDS=n

# Disable watchdog that increases the sleep current
CONFIG_NCS_SAMPLE_MATTER_WATCHDOG=n

# Increase MPSL calibration period to prevent too often CPU wake-ups.
CONFIG_MPSL_CALIBRATION_PERIOD=60000
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# This is the configuration file used only for the purpose of Matter power consumption tests.

# Enable pairing autostart to avoid issues with IO adapter
CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y

# Enable persistent subscriptions to automatically recover connection after reboot.
CONFIG_CHIP_PERSISTENT_SUBSCRIPTIONS=y
11 changes: 11 additions & 0 deletions snippets/matter-power-consumption-tests/snippet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: power-consumption-tests
append:
EXTRA_CONF_FILE: power_consumption_tests.conf

boards:
nrf54l15dk/nrf54l15/cpuapp:
append:
EXTRA_CONF_FILE: boards/nrf54l15dk_nrf54l15_cpuapp.conf
nrf54l15dk/nrf54l10/cpuapp:
append:
EXTRA_CONF_FILE: boards/nrf54l15dk_nrf54l10_cpuapp.conf

0 comments on commit 6b4c40f

Please sign in to comment.