2023-02-13 03:39 AM - last edited on 2023-11-30 06:40 AM by Amel NASRI
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!
Solved! Go to Solution.
2023-02-17 03:02 AM
Hello,
See my response in this thread:
Why does BLE become not discoverable when STM32WB goes into low power mode?
Best Regards
2023-02-17 03:02 AM
Hello,
See my response in this thread:
Why does BLE become not discoverable when STM32WB goes into low power mode?
Best Regards
2023-02-19 10:18 PM
Hi,
Sorry I've duplicate the question unintentionally!