Skip to content

Commit

Permalink
tests: benchmarks: power_consumption: qdec: enable PM_DEVICE
Browse files Browse the repository at this point in the history
Define sleep configuration.

Signed-off-by: Piotr Kosycarz <[email protected]>
(cherry picked from commit f090408)
  • Loading branch information
nordic-piks authored and rlubos committed Nov 6, 2024
1 parent d221214 commit 0d508a9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
CONFIG_NRFS=y

# Enable runtime power management for peripheral
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=y

CONFIG_PM=y
CONFIG_PM_S2RAM=y
CONFIG_POWEROFF=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
<NRF_PSEL(QDEC_B, 1, 10)>;
};
};

qdec_sleep_pinctrl: qdec_sleep_pinctrl {
group1 {
psels = <NRF_PSEL(QDEC_A, 1, 8)>,
<NRF_PSEL(QDEC_B, 1, 10)>;
low-power-enable;
};
};
};

&gpio1 {
Expand All @@ -37,7 +45,9 @@
&qdec20 {
status = "okay";
pinctrl-0 = <&qdec_pinctrl>;
pinctrl-names = "default";
pinctrl-1 = <&qdec_sleep_pinctrl>;
pinctrl-names = "default", "sleep";
steps = <127>;
led-pre = <500>;
zephyr,pm-device-runtime-auto;
};
4 changes: 4 additions & 0 deletions tests/benchmarks/power_consumption/qdec/prj.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
CONFIG_SENSOR=y

# Enable runtime power management for peripheral
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_RUNTIME=y

CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n
CONFIG_SERIAL=n
Expand Down

0 comments on commit 0d508a9

Please sign in to comment.