Skip to content

Commit d289842

Browse files
kkasperczyk-nonordicjm
authored andcommitted
samples: matter: Created configuration with LEDs disabled
Added Kconfig that allows to disable LEDs initialization and created a configuration that uses it for nRF54L15. This is required for the power measurement purposes. Signed-off-by: Kamil Kasperczyk <[email protected]>
1 parent b6fb328 commit d289842

File tree

7 files changed

+49
-0
lines changed

7 files changed

+49
-0
lines changed

doc/nrf/protocols/matter/getting_started/low_power_configuration.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,18 @@ Disable unused pins and peripherals
202202
:start-after: disable_unused_pins_start
203203
:end-before: disable_unused_pins_end
204204

205+
Disable LEDs module
206+
===================
207+
208+
When performing the power measurements on various development kits, the LEDs can either be included in the measurement circuit or not:
209+
210+
* For the nRF52840 DK and nRF5340 DK, the LEDs are excluded from the measurement circuit, so they can be enabled for the low power configuration and it is not going to impact the measurement results.
211+
* For the nRF54L15 DK, the MOSFET transistors controlling the LEDs are included in the measurement circuit.
212+
This results in measurement results being increased by an additional, small leakage current that appears if an LED is turned on.
213+
To measure the current consumption of the nRF54L15 SoC without including development kit components, such as LEDs, it is recommended to disable them.
214+
215+
To disable LEDs in the Matter samples and applications, set the :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_LEDS` Kconfig option to ``n``.
216+
205217
.. _ug_matter_enable_pm_module:
206218

207219
Enable Device Power Management module

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ Matter samples
588588
* Support for the nRF54L15 DK.
589589
* Support for :ref:`Trusted Firmware-M <ug_tfm>` on the nRF54L15 SoC.
590590
* The :ref:`matter_smoke_co_alarm_sample` sample that demonstrates implementation of Matter Smoke CO alarm device type.
591+
* The :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_LEDS` Kconfig option, which can be used to disable the LEDs in the Matter sample or application.
591592

592593
* :ref:`matter_lock_sample` sample:
593594

samples/matter/common/src/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ config NCS_SAMPLE_MATTER_FACTORY_RESET_ON_KEY_MIGRATION_FAILURE
4040
Allow device to perform factory reset if the operational key for Fabric has not been migrated
4141
properly to PSA ITS storage.
4242

43+
config NCS_SAMPLE_MATTER_LEDS
44+
bool "Enable LEDs usage"
45+
default y
46+
depends on DK_LIBRARY
47+
help
48+
Enables LEDs module to be used in the application.
49+
4350
config NCS_SAMPLE_MATTER_SETTINGS_SHELL
4451
bool "Settings shell for Matter purposes"
4552
default y if CHIP_MEMORY_PROFILING

samples/matter/common/src/board/board.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Board Board::sInstance;
2929
bool Board::Init(button_handler_t buttonHandler, LedStateHandler ledStateHandler)
3030
{
3131
#ifdef CONFIG_DK_LIBRARY
32+
#ifdef CONFIG_NCS_SAMPLE_MATTER_LEDS
3233
/* Initialize LEDs */
3334
LEDWidget::InitGpio();
3435
LEDWidget::SetStateUpdateCallback(LEDStateUpdateHandler);
@@ -40,6 +41,7 @@ bool Board::Init(button_handler_t buttonHandler, LedStateHandler ledStateHandler
4041
mLED3.Init(DK_LED3);
4142
mLED4.Init(DK_LED4);
4243
#endif
44+
#endif /* CONFIG_NCS_SAMPLE_MATTER_LEDS */
4345

4446
/* Initialize buttons */
4547
int ret = dk_buttons_init(ButtonEventHandler);

samples/matter/lock/sample.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,12 @@ tests:
8686
- nrf5340dk/nrf5340/cpuapp
8787
platform_allow: nrf52840dk/nrf52840 nrf5340dk/nrf5340/cpuapp nrf54l15dk/nrf54l15/cpuapp
8888
tags: sysbuild ci_samples_matter
89+
sample.matter.lock.release.nrf54l15.power_consumption:
90+
sysbuild: true
91+
build_only: true
92+
extra_args: FILE_SUFFIX=release CONFIG_NCS_SAMPLE_MATTER_LEDS=n
93+
CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y CONFIG_NCS_SAMPLE_MATTER_WATCHDOG=n
94+
integration_platforms:
95+
- nrf54l15dk/nrf54l15/cpuapp
96+
platform_allow: nrf54l15dk/nrf54l15/cpuapp
97+
tags: sysbuild ci_samples_matter

samples/matter/smoke_co_alarm/sample.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,12 @@ tests:
3232
- nrf54l15dk/nrf54l15/cpuapp
3333
platform_allow: nrf52840dk/nrf52840 nrf5340dk/nrf5340/cpuapp nrf54l15dk/nrf54l15/cpuapp
3434
tags: sysbuild ci_samples_matter
35+
sample.matter.smoke_co_alarm.release.nrf54l15.power_consumption:
36+
sysbuild: true
37+
build_only: true
38+
extra_args: FILE_SUFFIX=release CONFIG_NCS_SAMPLE_MATTER_LEDS=n
39+
CONFIG_NCS_SAMPLE_MATTER_WATCHDOG=n
40+
integration_platforms:
41+
- nrf54l15dk/nrf54l15/cpuapp
42+
platform_allow: nrf54l15dk/nrf54l15/cpuapp
43+
tags: sysbuild ci_samples_matter

samples/matter/window_covering/sample.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,12 @@ tests:
3636
platform_allow: nrf52840dk/nrf52840 nrf5340dk/nrf5340/cpuapp
3737
nrf54l15dk/nrf54l15/cpuapp
3838
tags: sysbuild ci_samples_matter
39+
sample.matter.window_cover.release.nrf54l15.power_consumption:
40+
sysbuild: true
41+
build_only: true
42+
extra_args: FILE_SUFFIX=release CONFIG_NCS_SAMPLE_MATTER_LEDS=n
43+
CONFIG_NCS_SAMPLE_MATTER_WATCHDOG=n
44+
integration_platforms:
45+
- nrf54l15dk/nrf54l15/cpuapp
46+
platform_allow: nrf54l15dk/nrf54l15/cpuapp
47+
tags: sysbuild ci_samples_matter

0 commit comments

Comments
 (0)