cancel
Showing results for 
Search instead for 
Did you mean: 

What is RTC_CR.WUTIE for (STM32L476)?

HermannKleier
Associate II
Posted on March 21, 2017 at 23:41

I require a periodic wakeup from shutdown-mode. For that I found two recipes: AN4759 (table 7) and RM0351 (section 3.7). Essentially they provide the same info. Unfortunately it did not work until I tripped over “When the periodic wakeup interrupt is enabled by setting the WUTIE bit in the RTC_CR2 register, it can exit the device from low-power modes.�? (RM0351, section 3.6)

I added “

LL_RTC_EnableIT_WUT (RTC);

�? and it worked as expected.

I was puzzled because the NVIC is powered off in shutdown mode. So there are no interrupts.

Isn’t there something missing in the recipes? Is WUTIE really required?

7 REPLIES 7
turboscrew
Senior III
Posted on September 22, 2017 at 18:00

Old thread, but...

Yes, WUTIE is needed. It lets the RTC to generate interrupt requests. I low power mode NVIC is, indeed, 'OFF', but it's 'replaced' by a low power interrupt controller that can wake the system up. That was metioned somewhere in the documentation, but I can't find it right away.

The WUTIE controls whether or not there is a 'timer underrun signal' from the WUT at all.

Posted on September 22, 2017 at 19:39

First of all, thank you for reading and answering and confirming my assumption.

The STM32L4 is a really powerful and complex beast which can only be tamed by a diligent documentation. But far too often the docs are ambiguous (e.g., like you mentioned in “RM0351 RTC Wakeup�). And far too often STM does not fix the issues. The current revision (5) of RM0351 still writes about the non-existent “RTC_CR2� register and still has not fixed the recipe for enabling cyclic wakeups (RTC_WUTIE still missing). So does AN4759. As you said: Old thread �? I say: nothing happened. ☹

Other parts of the RM0351 (table 213) suggest that there is such a thing as a “low power interrupt controller� which monitors RTC_WUTIE.

Posted on September 22, 2017 at 20:22

I think STM is not very enthusiatic for supporting bare metal low level programmers. They push their HAL.

Posted on September 22, 2017 at 20:40

I don't think ST cares what you do, plenty of people do register level coding but it requires reading and interpreting documentation, and connecting the dots where necessary.

The amount of documentation explodes with each new part or variant released, got to be a royal pain...

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on September 23, 2017 at 01:29

“Pushing their HAL�, they have to do lots of low level programming covering all peripherals in all states of the MCU. That way, they should really put their feet in it. Meaning, they find all inconsistencies between documentation and implementation (euphemistic for errors). Doing their job professionally, they must give a feedback to the maintainers of the docs. I.e., “pushing their HAL� is no excuse. But, there are so many pages… ☺

Posted on September 23, 2017 at 01:35

“… connecting the dots where necessary.�? Exactly. I couldn’t have said it better. ☺!

Imen.D
ST Employee
Posted on September 27, 2017 at 18:14

Hello,

Thank you for bringing the typo errors to our attention.

I will report your feedback and errors to the appropriate team.

Kind Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen