Skip to main content
Nemonas
Associate
July 1, 2022
Solved

[STM32WB55] BLE On/Off function ?

  • July 1, 2022
  • 3 replies
  • 2803 views

[STM32WB55] Is there a BLE On/Off function?

I want to enable/disable the BLE function with a button

Best answer by Remy ISSALYS

Hello,

If there isn't any radio activity, the CPU2 is in low power mode. If you want to turn Off the BLE, you can create a task which call hci_reset function and set this task when you press your button. Then, to re enable the BLE, you have to perform the initialization (SHCI, GAP, GATT) again.

Best Regards

3 replies

Remy ISSALYS
Remy ISSALYSBest answer
Technical Moderator
July 6, 2022

Hello,

If there isn't any radio activity, the CPU2 is in low power mode. If you want to turn Off the BLE, you can create a task which call hci_reset function and set this task when you press your button. Then, to re enable the BLE, you have to perform the initialization (SHCI, GAP, GATT) again.

Best Regards

Visitor II
August 30, 2024

What if I don't want to turn off hci controller and just wanted to stop or kind of off the BLE stack when need to disable and again re-enable the BLE means re initialize the stack and all and BLE got diacovered.

ttnickb
Associate II
July 7, 2022

Hi Remy,

Is there any benefit to calling `LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN)` in addition to `hci_reset()`?

Remy ISSALYS
Technical Moderator
July 11, 2022

Hello,

In order to enter in shutdown mode, you must turn off the CPU2 before. When CPU2 is running, you shall not use LL_C2 command like the following: LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);

When you called hci_reset function, the CPU2 is running so you can't call the shutdown command.

Best Regards