Question
Problem with SHUTDOWN mode
Hello,
I have a board with stm32wb55. I can't enter to shutdown mode or can't to exit form shutdown.
I want to exit from this mode via wakeup pin 1 PA0. I use this code
if( (LL_PWR_IsActiveFlag_C1SB() == 0)
|| (LL_PWR_IsActiveFlag_C2SB() == 0)
)
{
/* Set the lowest low-power mode for CPU2: shutdown mode */
LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
}
HAL_PWREx_EnableGPIOPullUp(PWR_GPIO_A, PWR_GPIO_BIT_0);
HAL_PWREx_EnablePullUpPullDownConfig();
/* Disable used wakeup source: PWR_WAKEUP_PIN1 */
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN1);
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN2);
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN3);
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN4);
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN5);
/* Clear all related wakeup flags */
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF1);
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1_LOW);
HAL_PWREx_DisableInternalWakeUpLine();
/* enter shutdown */
HAL_PWREx_EnterSHUTDOWNMode();MCU enter to something mode (maybe it's shutdown) but I cant exit from it. Why? I don't understand. Before the entering I use this pin PA0 as input GPIO with pullup.