Skip to content

Commit

Permalink
matter: samples: Restore IPC thread priority in Matter samples
Browse files Browse the repository at this point in the history
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 <arkadiusz.balys@nordicsemi.no>
  • Loading branch information
ArekBalysNordic committed Jul 3, 2023
1 parent 2290084 commit 219a85a
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <zephyr/dt-bindings/ipc_service/static_vrings.h>

/ {
zephyr,user {
battery-charge-gpios = <&gpio1 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
Expand All @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <zephyr/dt-bindings/ipc_service/static_vrings.h>

/ {
chosen {
nordic,pm-ext-flash = &mx25r64;
Expand All @@ -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>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <zephyr/dt-bindings/ipc_service/static_vrings.h>

/ {
chosen {
nordic,pm-ext-flash = &mx25r64;
Expand All @@ -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>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <zephyr/dt-bindings/ipc_service/static_vrings.h>

/ {
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <zephyr/dt-bindings/ipc_service/static_vrings.h>

/ {
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>;
};
7 changes: 7 additions & 0 deletions samples/matter/lock/boards/nrf5340dk_nrf5340_cpuapp.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <zephyr/dt-bindings/ipc_service/static_vrings.h>

/ {
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";
Expand Down
7 changes: 7 additions & 0 deletions samples/matter/lock/boards/nrf7002dk_nrf5340_cpuapp.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <zephyr/dt-bindings/ipc_service/static_vrings.h>

/ {
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>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <zephyr/dt-bindings/ipc_service/static_vrings.h>

/ {
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <zephyr/dt-bindings/ipc_service/static_vrings.h>

/ {
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>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <zephyr/dt-bindings/ipc_service/static_vrings.h>

/ {
chosen {
nordic,pm-ext-flash = &mx25r64;
Expand All @@ -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";
Expand Down

0 comments on commit 219a85a

Please sign in to comment.