From 925c84a75b77265860bc9560d43d7dbb61d17fc8 Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Wed, 2 Feb 2022 11:56:16 +0100 Subject: [PATCH] samples/boards/stm32: stm32_ble: Use bt_disable to reset the BLE stack Application is now supposed to explicitly shut down the ble stack before shutdown. Signed-off-by: Erwan Gouriou --- samples/boards/stm32/power_mgmt/stm32wb_ble/src/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 9a2273f6b37..ec5787e96d3 100644 --- a/samples/boards/stm32/power_mgmt/stm32wb_ble/src/main.c +++ b/samples/boards/stm32/power_mgmt/stm32wb_ble/src/main.c @@ -116,7 +116,12 @@ void main(void) k_sleep(K_SECONDS(6)); - printk("Device shutdown\n"); + printk("BLE disable\n"); + err = bt_disable(); + if (err) { + 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}); }