cancel
Showing results for 
Search instead for 
Did you mean: 

How can we set the RTC date counted when the system is off in the F103 controller? Thanks

YEU
Associate II
 
7 REPLIES 7

Not clear what you're asking.

Initially? Via some user interface, modem or data connection.

To maintain? A battery and an LSE clock crystal.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Don't use Cube/HAL (nor SPL).

Simply use the 32-bit RTC counter as a UNIX (or any other) epoch counter, and use the standard C library facilities from <time.h> to convert it to date and time.

JW

Hello there

I can save RTC date, but this date is not updated the next day with battery connected

Clock is ok.

Not sure I recall all requirements but should be examples in SPL of putting F1 in STANDBY.

Abruptly removing primary power, not so sure.

Need to make sure not to reset/clear RTC at next start.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Clive,

the SPL and Cube/HAL implementation of 'F1xx RTC handling is dumb - they limit the RTC to within one day's worth of seconds, and handle date manually, while storing it in one of the backup registers. This of course won't work across midnights with VDD off.

JW

Are there any examples of this? Where can I find it , Thanks

> Are there any examples of this?

I don't know any.

JW