Question
STOP2 Mode
HLO
I am using STOP2 Mode in my controller is stm32l496 series it entering the stop2 mode but it's not coming out for waking up i use external interrupt .
interrupt is generating before entering stop2 mode but it not generated after the stop2 mode.
what is the problem.
HAL_SuspendTick();
// Optional: clear EXTI pending bit
__HAL_GPIO_EXTI_CLEAR_IT(GPIO_PIN_0); // Replace with your EXTI pin
// Go to STOP2
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
// Restore clocks
SystemClock_Config();
// Re-initialize GPIOs including EXTI pin
SystemReInit(); // or reconfigure the EXTI pin here manually
HAL_GPIO_WritePin(LED_RED_GPIO_Port, LED_RED_Pin, SET); // Debug
HAL_ResumeTick();
void EXTI0_IRQHandler(void)
{
/* USER CODE BEGIN EXTI0_IRQn 0 */
/* USER CODE END EXTI0_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_0);
/* USER CODE BEGIN EXTI0_IRQn 1 */
/* USER CODE END EXTI0_IRQn 1 */
}Code formatting applied - please see How to insert source code for future reference.
