From 219a85ab56a5cfdae6d741b210460f3c633e7e49 Mon Sep 17 00:00:00 2001 From: Arkadiusz Balys Date: Wed, 28 Jun 2023 09:35:25 +0200 Subject: [PATCH] matter: samples: Restore IPC thread priority in Matter samples We noticed that IPC priority on nRF5340 is not set by default. We need to set it in DTS to be sure that the IPC thread does not collide with other threads. Signed-off-by: Arkadiusz Balys --- .../configuration/thingy53_nrf5340_cpuapp/app.overlay | 7 +++++++ .../light_bulb/boards/nrf5340dk_nrf5340_cpuapp.overlay | 7 +++++++ .../light_bulb/boards/nrf7002dk_nrf5340_cpuapp.overlay | 7 +++++++ .../light_switch/boards/nrf5340dk_nrf5340_cpuapp.overlay | 7 +++++++ .../light_switch/boards/nrf7002dk_nrf5340_cpuapp.overlay | 7 +++++++ .../matter/lock/boards/nrf5340dk_nrf5340_cpuapp.overlay | 7 +++++++ .../matter/lock/boards/nrf7002dk_nrf5340_cpuapp.overlay | 7 +++++++ .../template/boards/nrf5340dk_nrf5340_cpuapp.overlay | 7 +++++++ .../template/boards/nrf7002dk_nrf5340_cpuapp.overlay | 7 +++++++ .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 7 +++++++ 10 files changed, 70 insertions(+) diff --git a/applications/matter_weather_station/configuration/thingy53_nrf5340_cpuapp/app.overlay b/applications/matter_weather_station/configuration/thingy53_nrf5340_cpuapp/app.overlay index 5d9bbae3eb8..dd55bc75161 100644 --- a/applications/matter_weather_station/configuration/thingy53_nrf5340_cpuapp/app.overlay +++ b/applications/matter_weather_station/configuration/thingy53_nrf5340_cpuapp/app.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { zephyr,user { battery-charge-gpios = <&gpio1 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; @@ -24,6 +26,11 @@ }; }; +/* Set IPC thread priority to the highest value to not collide with other threads. */ +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; +}; + &i2c1 { bme688@76 { compatible = "bosch,bme680"; diff --git a/samples/matter/light_bulb/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/matter/light_bulb/boards/nrf5340dk_nrf5340_cpuapp.overlay index ac99bed4307..77d60d7e72e 100644 --- a/samples/matter/light_bulb/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/samples/matter/light_bulb/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; @@ -26,6 +28,11 @@ }; }; +/* Set IPC thread priority to the highest value to not collide with other threads. */ +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; +}; + &pwm0 { pinctrl-0 = <&pwm0_default_alt>; pinctrl-1 = <&pwm0_sleep_alt>; diff --git a/samples/matter/light_bulb/boards/nrf7002dk_nrf5340_cpuapp.overlay b/samples/matter/light_bulb/boards/nrf7002dk_nrf5340_cpuapp.overlay index db953f062fa..b8b77dc32e0 100644 --- a/samples/matter/light_bulb/boards/nrf7002dk_nrf5340_cpuapp.overlay +++ b/samples/matter/light_bulb/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; @@ -26,6 +28,11 @@ }; }; +/* Set IPC thread priority to the highest value to not collide with other threads. */ +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; +}; + &pwm0 { pinctrl-0 = <&pwm0_default_alt>; pinctrl-1 = <&pwm0_sleep_alt>; diff --git a/samples/matter/light_switch/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/matter/light_switch/boards/nrf5340dk_nrf5340_cpuapp.overlay index 38c54b95952..b2f9923aa7e 100644 --- a/samples/matter/light_switch/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/samples/matter/light_switch/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -4,12 +4,19 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; }; }; +/* Set IPC thread priority to the highest value to not collide with other threads. */ +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; +}; + /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; diff --git a/samples/matter/light_switch/boards/nrf7002dk_nrf5340_cpuapp.overlay b/samples/matter/light_switch/boards/nrf7002dk_nrf5340_cpuapp.overlay index 9fdd3786bd4..41eb23d8437 100644 --- a/samples/matter/light_switch/boards/nrf7002dk_nrf5340_cpuapp.overlay +++ b/samples/matter/light_switch/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -4,8 +4,15 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; }; }; + +/* Set IPC thread priority to the highest value to not collide with other threads. */ +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; +}; diff --git a/samples/matter/lock/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/matter/lock/boards/nrf5340dk_nrf5340_cpuapp.overlay index 38c54b95952..b2f9923aa7e 100644 --- a/samples/matter/lock/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/samples/matter/lock/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -4,12 +4,19 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; }; }; +/* Set IPC thread priority to the highest value to not collide with other threads. */ +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; +}; + /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; diff --git a/samples/matter/lock/boards/nrf7002dk_nrf5340_cpuapp.overlay b/samples/matter/lock/boards/nrf7002dk_nrf5340_cpuapp.overlay index 9fdd3786bd4..41eb23d8437 100644 --- a/samples/matter/lock/boards/nrf7002dk_nrf5340_cpuapp.overlay +++ b/samples/matter/lock/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -4,8 +4,15 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; }; }; + +/* Set IPC thread priority to the highest value to not collide with other threads. */ +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; +}; diff --git a/samples/matter/template/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/matter/template/boards/nrf5340dk_nrf5340_cpuapp.overlay index 38c54b95952..b2f9923aa7e 100644 --- a/samples/matter/template/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/samples/matter/template/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -4,12 +4,19 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; }; }; +/* Set IPC thread priority to the highest value to not collide with other threads. */ +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; +}; + /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; diff --git a/samples/matter/template/boards/nrf7002dk_nrf5340_cpuapp.overlay b/samples/matter/template/boards/nrf7002dk_nrf5340_cpuapp.overlay index 9fdd3786bd4..41eb23d8437 100644 --- a/samples/matter/template/boards/nrf7002dk_nrf5340_cpuapp.overlay +++ b/samples/matter/template/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -4,8 +4,15 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; }; }; + +/* Set IPC thread priority to the highest value to not collide with other threads. */ +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; +}; diff --git a/samples/matter/window_covering/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/matter/window_covering/boards/nrf5340dk_nrf5340_cpuapp.overlay index b4fff1356e0..765764531f5 100644 --- a/samples/matter/window_covering/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/samples/matter/window_covering/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -4,6 +4,8 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ +#include + / { chosen { nordic,pm-ext-flash = &mx25r64; @@ -29,6 +31,11 @@ }; }; +/* Set IPC thread priority to the highest value to not collide with other threads. */ +&ipc0 { + zephyr,priority = <0 PRIO_COOP>; +}; + /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled";