diff --git a/samples/boards/stm32/power_mgmt/stm32wb_ble/prj.conf b/samples/boards/stm32/power_mgmt/stm32wb_ble/prj.conf index de6fe12424b..583df4e6ee7 100644 --- a/samples/boards/stm32/power_mgmt/stm32wb_ble/prj.conf +++ b/samples/boards/stm32/power_mgmt/stm32wb_ble/prj.conf @@ -1,5 +1,5 @@ CONFIG_BT=y CONFIG_BT_DEVICE_NAME="Test beacon" -CONFIG_PM=y +CONFIG_POWEROFF=y #CONFIG_DEBUG=y diff --git a/samples/boards/stm32/power_mgmt/stm32wb_ble/src/main.c b/samples/boards/stm32/power_mgmt/stm32wb_ble/src/main.c index 14688c0c400..faabd4eda30 100644 --- a/samples/boards/stm32/power_mgmt/stm32wb_ble/src/main.c +++ b/samples/boards/stm32/power_mgmt/stm32wb_ble/src/main.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include @@ -146,7 +146,8 @@ int main(void) printk("Bluetooth disable failed (err %d)\n", err); } - printk("Shutdown\n"); - pm_state_force(0u, &(struct pm_state_info){PM_STATE_SOFT_OFF, 0, 0}); + printk("Powering off\n"); + sys_poweroff(); + return 0; }