cancel
Showing results for 
Search instead for 
Did you mean: 

How to get 12 sec time using RTC

MBhir.11
Associate III

Hi ,

I not used RTC earlier and new to RTC.

I am using STM32L151RCT6 MCU and creating the project in STM32Cube IDE.

what are the settings i need to do to get RTC timing of 12 sec..

I searched and got some information about alarm time setting and alarm interrupt....

using that how can achieve my requirements?

2 REPLIES 2
Markus GIRDLAND
ST Employee

Hello!

I would suggest following this video, posted by STMicroelectronics on YouTube.

It's a good starting point for using RTC. The video is using a bit of an older version of CubeMX than the integrated one in STM32CubeIDE but the same options used in the video are still available but they might be located in a different spot.

HI thanks,

I started implementing RTC in STM32Cube IDE for STM32L151RCT6 MCU...

After addition of RTC module i enabled activate clock source, activate calender and kept all default settings , only i changed alarm settings : sec: 12 sec and generated the project and took 2 functions out ;

Set alarm and set time : my requirement is after doing some calculation i need to start 12 sec timer and in that time collecting samples and after 12 sec doing the average calculation..... i am not getting how to use set alarm function , if directly i used without setting time means will it work?

please help me to resolve it.

0693W00000ANcNnQAL.pngSet time :0693W00000ANcNiQAL.png