cancel
Showing results for 
Search instead for 
Did you mean: 

Wake up from Standby by RTC AlarmA in STM32U575

Joaam
Associate

Hi!

I’m currently building an application where I need to periodically wake up my NUCLEO-U575ZI-Q from Standby mode using RTC alarms. I’m aware of the Wake-Up Timers, but I’ve been specifically asked to use alarms. This will be integrated into a FreeRTOS system, but for now I’m trying to get it working in a plain project. I’m using IAR 9.50.1 as the IDE.

I’ve tried everything, but nothing works. I’ve cleared all the required flags, set the others, but I still can’t get it to wake up from an alarm. I’ve been able to wake the MCU using the user button and another wake-up pin, but not via alarms.

This is the code I’m currently working with: main.c

And this is an auxiliary rtc.c file used to initialize the RTC: rtc.c

All the important flags seem to be set correctly. For example, in RTC_SR: ALRAF/ALRBF/WUTF/TSF/TSOVF/ITSF/SSRUF = 0. In RTC_CR: ALRAIE = 1 and ALRAE = 1. In RCC_BDCR: RTCEN = 1.
In PWR, all WUFx flags are clear.

I’m also attaching the current values of the RTC, RCC, and PWR registers for reference.

What can I do? Why isn’t it working?



1 REPLY 1
Gyessine
ST Employee

Hello, @Joaam 
Apologies for the delay.
You can refer to this WIKI or this firmware example and base your project on it.
I attempted to replicate your case from my end, but I did not encounter this issue.

BR
Gyessine

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.