-
Notifications
You must be signed in to change notification settings - Fork 7.6k
STM32WBAX PM rework to support STOP/STDBY modes with radio activity #92847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright (c) 2023 STMicroelectronics | ||
*/ | ||
|
||
/ { | ||
/* Change min residency time to ease power consumption measurement */ | ||
cpus { | ||
cpu0: cpu@0 { | ||
cpu-power-states = <&stop0 &stop1 &standby>; | ||
}; | ||
|
||
power-states { | ||
standby: state2 { | ||
compatible = "zephyr,power-state"; | ||
power-state-name = "suspend-to-ram"; | ||
substate-id = <1>; | ||
min-residency-us = <10000>; | ||
exit-latency-us = <1000>; | ||
}; | ||
}; | ||
}; | ||
|
||
}; | ||
|
||
&lptim1 { | ||
status = "okay"; | ||
}; | ||
Comment on lines
+1
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my opinion, all these changes should be moved in the dtsi file of the device since they are not board specific. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed and for LPTIM we could use PM config options to enable/disable LPTIM (board or soc dts ) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright (c) 2023 STMicroelectronics | ||
*/ | ||
|
||
/ { | ||
/* Change min residency time to ease power consumption measurement */ | ||
cpus { | ||
cpu0: cpu@0 { | ||
cpu-power-states = <&stop0 &stop1 &standby>; | ||
}; | ||
|
||
power-states { | ||
standby: state2 { | ||
compatible = "zephyr,power-state"; | ||
power-state-name = "suspend-to-ram"; | ||
substate-id = <1>; | ||
min-residency-us = <10000>; | ||
exit-latency-us = <1000>; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
&lptim1 { | ||
status = "okay"; | ||
}; | ||
Comment on lines
+1
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar considerations done for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as before |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,9 @@ CONFIG_BT_BAS=y | |
CONFIG_BT_HRS=y | ||
CONFIG_BT_DEVICE_NAME="Zephyr Heartrate Sensor" | ||
CONFIG_BT_DEVICE_APPEARANCE=833 | ||
|
||
CONFIG_PM=y | ||
CONFIG_PM_DEVICE=y | ||
CONFIG_PM_DEVICE_RUNTIME=y | ||
CONFIG_PM_DEVICE_SYSTEM_MANAGED=y | ||
CONFIG_PM_S2RAM=y | ||
Comment on lines
+11
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think these should be moved to a specific file related to the relevant NUCLEO, if we want to enable power management by default. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could just leave There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Or even better: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.