From 6b4c40f5e8d4dbf5441c68c63917968716348f88 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk Date: Fri, 24 Jan 2025 14:17:52 +0100 Subject: [PATCH] snippets: Added snippet for Matter power consumption measurements 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 --- samples/matter/lock/sample.yaml | 13 ++++++++----- samples/matter/smoke_co_alarm/sample.yaml | 11 ++++++----- samples/matter/window_covering/sample.yaml | 12 ++++++++---- .../boards/nrf54l15dk_nrf54l10_cpuapp.conf | 14 ++++++++++++++ .../boards/nrf54l15dk_nrf54l15_cpuapp.conf | 14 ++++++++++++++ .../power_consumption_tests.conf | 13 +++++++++++++ .../matter-power-consumption-tests/snippet.yml | 11 +++++++++++ 7 files changed, 74 insertions(+), 14 deletions(-) create mode 100644 snippets/matter-power-consumption-tests/boards/nrf54l15dk_nrf54l10_cpuapp.conf create mode 100644 snippets/matter-power-consumption-tests/boards/nrf54l15dk_nrf54l15_cpuapp.conf create mode 100644 snippets/matter-power-consumption-tests/power_consumption_tests.conf create mode 100644 snippets/matter-power-consumption-tests/snippet.yml diff --git a/samples/matter/lock/sample.yaml b/samples/matter/lock/sample.yaml index 20e67543939e..b3c8d4de4b31 100644 --- a/samples/matter/lock/sample.yaml +++ b/samples/matter/lock/sample.yaml @@ -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 diff --git a/samples/matter/smoke_co_alarm/sample.yaml b/samples/matter/smoke_co_alarm/sample.yaml index 5da30ee5fc03..2aad60eca67e 100644 --- a/samples/matter/smoke_co_alarm/sample.yaml +++ b/samples/matter/smoke_co_alarm/sample.yaml @@ -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 diff --git a/samples/matter/window_covering/sample.yaml b/samples/matter/window_covering/sample.yaml index ac810eb62398..bc07c00f064d 100644 --- a/samples/matter/window_covering/sample.yaml +++ b/samples/matter/window_covering/sample.yaml @@ -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 diff --git a/snippets/matter-power-consumption-tests/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/snippets/matter-power-consumption-tests/boards/nrf54l15dk_nrf54l10_cpuapp.conf new file mode 100644 index 000000000000..2f6b93c3409b --- /dev/null +++ b/snippets/matter-power-consumption-tests/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -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 diff --git a/snippets/matter-power-consumption-tests/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/snippets/matter-power-consumption-tests/boards/nrf54l15dk_nrf54l15_cpuapp.conf new file mode 100644 index 000000000000..2f6b93c3409b --- /dev/null +++ b/snippets/matter-power-consumption-tests/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -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 diff --git a/snippets/matter-power-consumption-tests/power_consumption_tests.conf b/snippets/matter-power-consumption-tests/power_consumption_tests.conf new file mode 100644 index 000000000000..c2384ff4aae3 --- /dev/null +++ b/snippets/matter-power-consumption-tests/power_consumption_tests.conf @@ -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 diff --git a/snippets/matter-power-consumption-tests/snippet.yml b/snippets/matter-power-consumption-tests/snippet.yml new file mode 100644 index 000000000000..8a735022d2b2 --- /dev/null +++ b/snippets/matter-power-consumption-tests/snippet.yml @@ -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