STM32wb55 - SHUTDOWN MODE / STANDBY MODE wake up with SYSWKUP pin
Hi,
I am currently using stm32wb 55 and I want to achive the shutdown/standby mode with WKUP pin functionality, I tried Several ways but it seems its not working, also there is not any example for the same,Below code is for your reference ....
BSP_LED_Init(LED2);
BSP_LED_Init(LED3);
SystemClock_Config();
WkupPin1_Config();
if (__HAL_PWR_GET_FLAG(PWR_FLAG_SB) != RESET)
{
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);
}
HAL_Delay(5000);
BSP_LED_DeInit(LED2);
BSP_LED_DeInit(LED3);
/* Enable WakeUp Pin PWR_WAKEUP_PIN1 connected to PA0 */
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1_LOW);
/* Clear all related wakeup flags*/
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF1);
/* Enter the Standby mode */
HAL_PWR_EnterSTANDBYMode();
======================================
/* USER CODE BEGIN 4 */
static void WkupPin1_Config(void)
{
/* Configure Button pin and unmask Wakeup with Interrupt request from line 0.*/
BSP_PB_Init(BUTTON_SW1, BUTTON_MODE_EXTI);
/* Enable wake-up pin pull-up state in Standby mode.*/
HAL_PWREx_EnableGPIOPullUp(PWR_GPIO_A, PWR_GPIO_BIT_0);
HAL_PWREx_EnablePullUpPullDownConfig();
}
