2022-08-19 03:05 AM
How to set RTC calendar for STM32F105RB. I see on reference manual but no RTC register that can set calendar.
Solved! Go to Solution.
2022-08-19 03:25 AM
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
2022-08-19 03:25 AM
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
2022-08-19 04:33 AM
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