HAL_PWR_DisableWakeUpPin API not working as expected
Hi,
I am working on STM32WB55RG MCU and I wanted to enable one pin for Wakeup from Shutdown mode. That works fine.
But, when another EXTI pin is initialized, I am not able to disable it. The MCU wakes up when this pin (connector) state is changed, even while it is disabled using the HAP API.
In the code below, I want to enable wakeup for PIN1, which is a switch. But disable PIN4.
bool LowPower_EnterShutdownMode(void)
{
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN4);
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1_LOW);
HAL_PWREx_EnterSHUTDOWNMode();
NVIC_SystemReset();
}
it also does not work when all the rest of the pins are made analog as well.

#define STAT_Pin GPIO_PIN_4
#define STAT_GPIO_Port GPIOE
#define USR_BTN_Pin GPIO_PIN_0
#define USR_BTN_GPIO_Port GPIOA
/*Configure GPIO pin : PtPin */
GPIO_InitStruct.Pin = USR_BTN_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(USR_BTN_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pin : PtPin */
GPIO_InitStruct.Pin = STAT_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(STAT_GPIO_Port, &GPIO_InitStruct);
Am I missing something here?
Best regards,
Navin
