Closed ecrin4102 closed 1 year ago
Hello @ecrin4102,
Firstly, thank you for this contribution. The EXTI enabling and disabling are handled at HAL_GPIO_Init() and HAL_GPIO_DeInit(). I hope you find in the explanations here a satisfying answer to your question.
Best Regards,
Hi @ecrin4102,
Please allow me to close this issue. Thank you again for your comprehension.
With regards,
In order to prevent a wake up from STOP mode from an exti line (connected to a GPIO for example), this is mandatory to mask the IRQ process on the EXTI stage. There is no other choice than using register directly with:
EXTI->IMR1 &= ~(EXTI_LINE_0)
Using only NVIC to disable IRQ will only prevent the execution of IrqHandler but will allow the wake up. As all other peripherals have an __HAL_XXXXX_DISABLE_IT macro, maybe __HAL_GPIO_EXT_DISABLE_IT can be created?