Skip to main content
AZube.2
Associate III
July 20, 2022
Solved

User constants in End Node application

  • July 20, 2022
  • 2 replies
  • 2682 views

Anyone can explain me where do the following constants come from and what is their function in the RTC?

0693W00000QLbYaQAL.png 

I am starting my own application and I would like to know if these values suit my own application.

This topic has been closed for replies.
Best answer by Louis AUDOLY

Hello,

These constants are prescalers used to perform time operations

The constant RTC_N_PREDIV_S and RTC_PREDIV_S are used when you want to get the time to calculate the second and millisecond.

For RTC_PREDIV_A is used to increment the calendar value with a frequency of 1 Hz

I suggest you to check the section relative to RTC in the reference manual of your board for more information about those two variables.

Best regards

2 replies

Louis AUDOLY
Louis AUDOLYBest answer
ST Employee
July 20, 2022

Hello,

These constants are prescalers used to perform time operations

The constant RTC_N_PREDIV_S and RTC_PREDIV_S are used when you want to get the time to calculate the second and millisecond.

For RTC_PREDIV_A is used to increment the calendar value with a frequency of 1 Hz

I suggest you to check the section relative to RTC in the reference manual of your board for more information about those two variables.

Best regards

AZube.2
AZube.2Author
Associate III
July 20, 2022

Got it! Thank you so much:)