cancel
Showing results for 
Search instead for 
Did you mean: 

Can the STM32F746 RTC generate an alarm interrupt every minute?

Rodo
Associate III

Hi all,
I'm making a clock and I wanted to update the display every minute (I do not display seconds) so I thought I'll set the alarm mask for minutes only but that didn't work. I read here that the RTC is more meant to trigger an alarm at specific time and date. I'm also going to need something like every Sunday at 3am but before I do that I need to do the every minute. I could just set up a regular timer for a minute but I thought the RTC should be able to do it. Am I wrong?

Can the RTC generate an interrupt when every minute is incremented regardless of date, hours, seconds, day of the week, etc?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
RBENF.1
ST Employee

Hello @Rodo 

RTC alarm is indeed meant to trigger at a specific time and date. Still, it is possible to trigger an alarm every minute with the RTC.
Please refer to this article which is made for seconds, but the principle remains the same for minutes.
The idea is to delay next alarm by 1 more minute each time the alarm is triggered.
You should still mask hours and days for it to work in the long run.

Regards, Ryan

View solution in original post

3 REPLIES 3
RBENF.1
ST Employee

Hello @Rodo 

RTC alarm is indeed meant to trigger at a specific time and date. Still, it is possible to trigger an alarm every minute with the RTC.
Please refer to this article which is made for seconds, but the principle remains the same for minutes.
The idea is to delay next alarm by 1 more minute each time the alarm is triggered.
You should still mask hours and days for it to work in the long run.

Regards, Ryan

Hi Ryan, @RBENF.1 

If in RTC_ALRMxR, MSK4, MSK3 and MSK2 are set, wouldn't alarm be triggered at every minute when seconds match the SU and ST fields?

JW

RBENF.1
ST Employee

Hello @waclawek.jan 

Yes, you are right this is a quick and efficient way. What I find interesting with the article's method is that it can help get a better grasp of how RTC alarms work and potentially tailor it for other requirements.

Regards, Ryan