Showing results for 
Search instead for 
Did you mean: 

Stop 2 WFI, disabling specific interrupt


Hello everyone, I am working on a custom device that is using an stm32 L433. One of its peripherals is set to generate interrupts to wakeup the device from the stop mode, but there are certain instances where I need it to stop for 30 seconds or so and ignore this specific interrupt.

I enter the stop 2 mode with HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI), and it works exactly like I want it to under normal conditions.

But when I need to do the special case of ignoring the Interrupt I first tried disabling the IRQ for the pin using HAL_NVIC_DisableIrq(); and it still woke up. Completely de-initializing the pin with HAL_GPIO_DeInit(); does do the job.

But what's throwing me off is in the reference manual RM0394 Table 27 describing stop 2 mode states the following for Mode exit

"If WFI or Return from ISR was used for entry:

 Any EXTI line configured in Interrupt mode (the corresponding EXTI interrupt vector must be enabled in the NVIC). The interrupt source can be external interrupts or peripherals with wakeup capability."


The comment in the parenthesis makes it sound that if it is not enabled in the NVIC then it should not be able to wake the device. Am I just misunderstanding it and ANY interrupt signal going into the MCU can wake it up from stop 2? Is deiniting the pin the way to go about this?