2018-08-31 09:30 AM
I am using STM32L152. It goes into a standby mode and uses RTC to wake up every 10 seconds to carry out some tasks.
Now, I would like to add an external interrupt (external switch) to the existing codes. In this case, the uC will exit the standby mode via both RTC and external switch. Would this be possible ? If so, could you please point me to any document/URL to write the codes?
2018-09-01 08:49 AM
Any suggestions on this? Can Standby mode being wake up by the external switch and RTC?
2018-09-03 01:21 AM
Hi,
Yes you can wakeup from STANDBY mode using external interrupts. You have to wire the external interrupt line to either WKUP0 or WKUP1. In the datasheet you should be able to find out where are those pins. Just set that pin in EXTI mode and that's it..
2018-09-03 09:22 AM
Ok, thanks! But can the uC takes 2 different interrupts? 1 RTC and 1 external interrupt? The external interrupt will have higher priority.