2018-05-31 10:43 AM
I'm using CubeMX and don't see a way to enable the EXTI0 IRQ. I'm assuming I need to have that interrupt enabled in order to use the PA0 pin as a wakeup pin.
I've set that pin to SYS_WKUP1 in the pin configuration. What else do I need to do?
Thanks.
Solved! Go to Solution.
2018-05-31 03:30 PM
OK. Nevermind. I got it working - thanks to this page:
https://www.waveshare.com/wiki/STM32CubeMX_Tutorial_Series:_EXTI
It turns out I needed to set the pin in CubeMX to 'GPIO_EXTI0' - not 'SYS_WKUP1'. Once I did that, the IRQ magically appeared and now my code successfully sleeps and wakes up.
2018-05-31 03:04 PM
I guess my real question is: How do I enable PA0 to be SYS_WKUP1? And what code do I have to include in my app? I could find no examples.
Thanks.
2018-05-31 03:30 PM
OK. Nevermind. I got it working - thanks to this page:
https://www.waveshare.com/wiki/STM32CubeMX_Tutorial_Series:_EXTI
It turns out I needed to set the pin in CubeMX to 'GPIO_EXTI0' - not 'SYS_WKUP1'. Once I did that, the IRQ magically appeared and now my code successfully sleeps and wakes up.