nRF5340 Sleep power consumption in Matter over Thread light switch example with SED

Hello,

I am currently doing my end of career project about the performance of Matter over Thread. I have a working scenario which implies a nRF52840 DK working as a light bulb and a nRF5340 as a light switch. I am measuring the consumption of the devices with an Agilent Power Analyzer and the results of the SED mode that the light switch matter example provides are not what I was expecting.

The current consumption in 3v is about 8.3 mA

I would like to know if it is possible to have a lower consumption for this specific case and if I could change or add some values to the Kconfig file in order to get lower values. I attach my current Kconfig file

#
# Copyright (c) 2022 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
mainmenu "Matter nRF Connect Light Switch Example Application"

config STATE_LEDS
bool "Use LEDs to indicate the device state"
default y
help
Use LEDs to render the current state of the device such as the progress of commissioning of
the device into a network or the factory reset initiation. Note that setting this option to
'n' does not disable the LED indicating the state of the simulated bolt.

# Sample configuration used for Thread networking
if NET_L2_OPENTHREAD

choice OPENTHREAD_NORDIC_LIBRARY_CONFIGURATION
default OPENTHREAD_NORDIC_LIBRARY_MTD
endchoice

choice OPENTHREAD_DEVICE_TYPE
default OPENTHREAD_MTD
endchoice

config CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
bool
default y

endif # NET_L2_OPENTHREAD

if MPSL_FEM

config OPENTHREAD_DEFAULT_TX_POWER
int "Set the default 802.15.4 output power (dBm) for device with FEM"
range -40 20
default -40
help
Use this setting to set the default Thread (802.15.4) output power for device that
uses FEM. This value has a unit in dBm and represents the Tx power at Antenna port of FEM device.

# override FEM GAIN to 20 dB as a default
# see subsys/mpsl/fem/Kconfig
# Leave MPSL_FEM_NRF21540_TX_GAIN_DB unchanged when OPENTHREAD_DEFAULT_TX_POWER=0
# to set the output power to a similar value as for nRF52840DK.
config MPSL_FEM_NRF21540_TX_GAIN_DB
default 20 if OPENTHREAD_DEFAULT_TX_POWER != 0

endif # MPSL_FEM

source "${ZEPHYR_BASE}/../modules/lib/matter/config/nrfconnect/chip-module/Kconfig.features"
source "${ZEPHYR_BASE}/../modules/lib/matter/config/nrfconnect/chip-module/Kconfig.defaults"
source "Kconfig.zephyr"
Finally this is my first post so please if any further information is required do not hesitate to ask me.
I am hopefully waiting for your recomendations.
Thanks in advance,
Pau
Parents
  • Hi Pau,

    Did you build with prj_release.conf? It has some configurations to disable RTT, log system and so on to save power for formal release products.

    Best regards,

    Charlie

  • Hi Charlie,

    I am running Toolchain Manager to execute nRF Connect SDK v2.1.1 with Visual Studio Code.

    There is a prj_release.conf file indeed that I believe it is used when I build the project configuration with the nRF Connect extension from VSC.

    I will try to apply the changes in the configuration file you are mentioning and hopefully this week I will go to the place where I can measure the current and tell you about the results.

    May I ask what disabling the RTT does to the build, if it makes the scenario of light-bulb light-switch stop working or simply it reduces the response from the bulb. It may have nothing to do with what I just said so I would like to know surely.

    I can also attach my current prj_release.conf without applying the changes just to have the logs.

    • #
      # Copyright (c) 2022 Nordic Semiconductor ASA
      #
      # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
      #

      # Enable CHIP
      CONFIG_CHIP=y
      CONFIG_CHIP_PROJECT_CONFIG="src/chip_project_config.h"
      # 32773 == 0x8005 (example lighting-app)
      CONFIG_CHIP_DEVICE_PRODUCT_ID=32773
      CONFIG_STD_CPP14=y

      # Enable CHIP pairing automatically on application start.
      CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y

      # Add support for LEDs and buttons on Nordic development kits
      CONFIG_DK_LIBRARY=y
      CONFIG_PWM=y

      # General networking settings
      CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=14

      # OpenThread configs
      CONFIG_OPENTHREAD_NORDIC_LIBRARY_FTD=y

      # Bluetooth Low Energy configuration
      CONFIG_BT_DEVICE_NAME="MatterLight"

      # Enable system reset on fatal error
      CONFIG_RESET_ON_FATAL_ERROR=y

      # Stack size settings
      CONFIG_IEEE802154_NRF5_RX_STACK_SIZE=1024

      # Disable all debug features
      CONFIG_SHELL=n
      CONFIG_OPENTHREAD_SHELL=n
      CONFIG_CONSOLE=n
      CONFIG_UART_CONSOLE=n
      CONFIG_SERIAL=n
      CONFIG_LOG=n
      CONFIG_LOG_MODE_MINIMAL=n
      CONFIG_ASSERT_VERBOSE=n
      CONFIG_ASSERT_NO_FILE_INFO=y
      CONFIG_PRINTK=n
      CONFIG_PRINTK_SYNC=n
      CONFIG_THREAD_NAME=n

    Thank you for your time,

    Pau

Reply
  • Hi Charlie,

    I am running Toolchain Manager to execute nRF Connect SDK v2.1.1 with Visual Studio Code.

    There is a prj_release.conf file indeed that I believe it is used when I build the project configuration with the nRF Connect extension from VSC.

    I will try to apply the changes in the configuration file you are mentioning and hopefully this week I will go to the place where I can measure the current and tell you about the results.

    May I ask what disabling the RTT does to the build, if it makes the scenario of light-bulb light-switch stop working or simply it reduces the response from the bulb. It may have nothing to do with what I just said so I would like to know surely.

    I can also attach my current prj_release.conf without applying the changes just to have the logs.

    • #
      # Copyright (c) 2022 Nordic Semiconductor ASA
      #
      # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
      #

      # Enable CHIP
      CONFIG_CHIP=y
      CONFIG_CHIP_PROJECT_CONFIG="src/chip_project_config.h"
      # 32773 == 0x8005 (example lighting-app)
      CONFIG_CHIP_DEVICE_PRODUCT_ID=32773
      CONFIG_STD_CPP14=y

      # Enable CHIP pairing automatically on application start.
      CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART=y

      # Add support for LEDs and buttons on Nordic development kits
      CONFIG_DK_LIBRARY=y
      CONFIG_PWM=y

      # General networking settings
      CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=14

      # OpenThread configs
      CONFIG_OPENTHREAD_NORDIC_LIBRARY_FTD=y

      # Bluetooth Low Energy configuration
      CONFIG_BT_DEVICE_NAME="MatterLight"

      # Enable system reset on fatal error
      CONFIG_RESET_ON_FATAL_ERROR=y

      # Stack size settings
      CONFIG_IEEE802154_NRF5_RX_STACK_SIZE=1024

      # Disable all debug features
      CONFIG_SHELL=n
      CONFIG_OPENTHREAD_SHELL=n
      CONFIG_CONSOLE=n
      CONFIG_UART_CONSOLE=n
      CONFIG_SERIAL=n
      CONFIG_LOG=n
      CONFIG_LOG_MODE_MINIMAL=n
      CONFIG_ASSERT_VERBOSE=n
      CONFIG_ASSERT_NO_FILE_INFO=y
      CONFIG_PRINTK=n
      CONFIG_PRINTK_SYNC=n
      CONFIG_THREAD_NAME=n

    Thank you for your time,

    Pau

Children
    • The actual light switch prj_release.conf, I copied the ligth bulb above by error

      #
      # Copyright (c) 2021 Nordic Semiconductor ASA
      #
      # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
      #

      # Enable CHIP
      CONFIG_CHIP=y
      CONFIG_CHIP_PROJECT_CONFIG="src/chip_project_config.h"
      # 32772 == 0x8004 (example light-switch-app)
      CONFIG_CHIP_DEVICE_PRODUCT_ID=32772
      CONFIG_STD_CPP14=y

      # Add support for LEDs and buttons on Nordic development kits
      CONFIG_DK_LIBRARY=y

      # General networking settings
      CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=14

      # Bluetooth Low Energy configuration
      CONFIG_BT_DEVICE_NAME="MatterSwitch"

      # Enable system reset on fatal error
      CONFIG_RESET_ON_FATAL_ERROR=y

      # Suspend devices when the CPU goes into sleep
      CONFIG_PM_DEVICE=y

      # Disable all debug features
      CONFIG_SHELL=n
      CONFIG_OPENTHREAD_SHELL=n
      CONFIG_CONSOLE=n
      CONFIG_UART_CONSOLE=n
      CONFIG_SERIAL=n
      CONFIG_LOG=n
      CONFIG_LOG_MODE_MINIMAL=n
      CONFIG_ASSERT_VERBOSE=n
      CONFIG_ASSERT_NO_FILE_INFO=y
      CONFIG_PRINTK=n
      CONFIG_PRINTK_SYNC=n
      CONFIG_THREAD_NAME=n
Related