cancel
Showing results for 
Search instead for 
Did you mean: 

WKUP and EXTI

Jason Petras
Associate
Posted on January 31, 2017 at 15:52

Hello!

I have a basic question about the association between WKUP and EXTI signals in a STM32. I am using a STM32L467.

My system has a push button that I want to use to wake the mcu from the STANDBY power mode. I also want to use the button as a interrupt when the mcu is in RUN mode. 

Must I connect the push button to two different pins, a WKUP pin and a EXTI pin to do this, or is the WKUP pin enough?

Yes, this is a very basic question. I looked through the Reference Manual and it appears that I *would* have to connect the button to the two pins. However, I would appreciate at an opinion from the community. 

Thank you!

Jason

#exti #wkup
1 REPLY 1
Uwe Bonnes
Principal III
Posted on January 31, 2017 at 16:54

One button should be enough. Configure the buttom to generate an interrupt.  Inside the IRQ, if PWR_CR_CWUF is set this is a wakupevent and the last state was deepsleep and if PWR_CR_CWUF is not set, it is a normal button hit.