3
\$\begingroup\$

I am working on my hobbyist project and need to develop the alarm timings. And RTC and Timer are new for me and I am confused in RTC Alarm time setting. I need to make alarm with RTC for five different times(as we are doing in the mobile). So, I am looking for the same thing with my mcu. Looking forward for the kind support ... (I am using STM32 Nucleo Board, KEIL-IDE, CubeMX)

Thanks

\$\endgroup\$

2 Answers 2

7
\$\begingroup\$

Check AN3371 at the official website of ST.

However, according to paragraph 2 there are only 2 alarms (A and B).

Alternatives:

  • Keep 5 alarms in your own code, set the first alarm (A) as alarm 1. When this fires, program A as for the next alarm (2) etc. Alarm B is not needed.
  • Do not use the alarm of the RTC, but a timer (not sure if the timer can be set for a long period).
\$\endgroup\$
1
  • \$\begingroup\$ Alternative number one is best if you want to use Low Power modes in your controller because the RTC can run on the external 32kHz crystal even if your main clock is stopped. \$\endgroup\$
    – A.R.C.
    Commented Jan 23, 2019 at 8:03
0
\$\begingroup\$

There are only two Alarms but you can always make a software alarm and implement that (different discussion on the details of that)

I got this on the keil website and it helped me to understand the RTC functionality a bit better: http://www.keil.com/download/docs/356.asp

I know it is not for the STM32F0 but I had to modify only a little bit of code in order to get it going

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.