Skip to main content
Khoo.B
Associate III
August 31, 2018
Question

Standby Mode of STM32L152.

  • August 31, 2018
  • 3 replies
  • 861 views

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?

    This topic has been closed for replies.

    3 replies

    Khoo.B
    Khoo.BAuthor
    Associate III
    September 1, 2018

    Any suggestions on this? Can Standby mode being wake up by the external switch and RTC?

    aa bb_2
    Associate II
    September 3, 2018

    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..

    Khoo.B
    Khoo.BAuthor
    Associate III
    September 3, 2018

    Ok, thanks! But can the uC takes 2 different interrupts? 1 RTC and 1 external interrupt? The external interrupt will have higher priority.