Skip to main content
j.villar
Associate
February 13, 2023
Solved

Why does BLE stop advertising when STM32WB enters low power mode (STOP2)?

Hello,

 

I am trying to configure a custom board with STM32WB5MMG in STOP2 low power mode. For that, the program calls the PWR_ExitStopMode() function when a timer reaches 10 seconds and exits when EXTI0 interrupts by calling PWR_ExitStopMode().

 

The MCU goes into and exits from STOP2 mode correctly, but I need the board remain connectable even when the MCU is in low power mode; however, BLE stops advertising when the board is in STOP2 mode.

 

If the connection has been established before the board goes into stop mode, then BLE works fine until a disconnection occurs, then I have the same problem.

 

I also tried using sleep mode and got the same results.

 

Code:

__weak void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)

{

if(GPIO_Pin == BTN_Pin)

{

PWR_ExitSleepMode();

//SystemClock_Config();

HAL_TIM_Base_Start_IT(&htim2);

printf("WAKE UP FROM EXTI\r\n");

}

}

 

in main:

 

if(timer_1s>=10)

{

PWR_EnterStopMode();

printf("GOING INTO STOP2 MODE\r\n");

}

 

What I'm missing?

Thanks in advance!

This topic has been closed for replies.
Remy ISSALYS
Remy ISSALYSBest answer
ST Technical Moderator
February 17, 2023

Hello,

See my response in this thread:

Why does BLE become not discoverable when STM32WB goes into low power mode?

Best Regards

2 replies

Remy ISSALYS
Remy ISSALYSBest answer
ST Technical Moderator
February 17, 2023

Hello,

See my response in this thread:

Why does BLE become not discoverable when STM32WB goes into low power mode?

Best Regards

j.villar
j.villarAuthor
Associate
February 20, 2023

Hi,

Sorry I've duplicate the question unintentionally!