Skip to main content
WPong.1
Associate II
August 19, 2022
Solved

How to set RTC calendar for STM32F105RB.

  • August 19, 2022
  • 2 replies
  • 1768 views

How to set RTC calendar for STM32F105RB. I see on reference manual but no RTC register that can set calendar.

0693W00000QO4TYQA1.png

This topic has been closed for replies.
Best answer by Peter BENSCH

The STM32F105 does not yet have dedicated registers for date or time and handles everything in binary in the RTC_CNTH and RTC_CNTL registers.

Regards

/Peter

2 replies

Peter BENSCH
Peter BENSCHBest answer
ST Technical Moderator
August 19, 2022

The STM32F105 does not yet have dedicated registers for date or time and handles everything in binary in the RTC_CNTH and RTC_CNTL registers.

Regards

/Peter

In order 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.
waclawek.jan
Super User
August 19, 2022

AN2821 would be the material to point at, but the calendar description there is utter garbage reflecting the SPL implementation (which is the same garbage) without making a reference to it.

AN2821 also fails to discuss the atomicity issues when reading out a 32-bit counter through two 16-bit registers.

I wonder if Cube is already written to use the normal epoch-time and <time.h> facilities, or retains this "counting days" nonsense... [EDIT] yep, I checked, still the day-counting... and no provision for the nonatomic CNT read either...congrats, ST [/EDIT]

JW