2017-01-31 06:52 AM
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 #wkup2017-01-31 07:54 AM
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.