cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a RTC Wakeup event to wake up the MCU from sleep mode?

BCora.1
Associate III

I'm using a Nucleo L152RE.

I've read the 900 pages manual multiple times but I still miss a clear view of what needs to be done to create a RTC Wakeup event.

I read in the manual:

"""

To enable the RTC Wakeup interrupt, the following sequence is required:

1. Configure and enable the EXTI Line 20 in interrupt mode and select the rising edge

   sensitivity.

2. Configure and enable the RTC_WKUP IRQ channel in the NVIC.

3. Configure the RTC to generate the RTC wakeup timer event.

"""

But I don't understand what all that means.

Could you translate it for me in terms of operations that need to be done?

All of the three tasks I quoted start with "configure", this is way too vague for me. What does that mean, "configure" ? What needs to be done? I guess some registers, or bits somewhere must be modified. Which ones? How exactly do you "configure" those things?

Maybe all the 3 steps is too much, so, let's start with step 1:

"Configure and enable the EXTI Line 20 in interrupt mode"

What does that mean? What do I do?

"and select the rising edge sensitivity"

What is that? How do I select it?

Just step 1 will do for now.

Please help.

The whole manual is like that.

30 REPLIES 30
BCora.1
Associate III

False alarm. I think I can still wake up from "sleep" mode, which is different from stop mode but is still a lower power mode. I'm not going to throw all the "ck_spree" thing away yet.