RTC - Charging Super Capacitor

The documentation says to call

rtc.EnableChargeMode(BatteryChargeMode.Fast);

to charge the super capacitor. I have done this and it works.

But, I have a question…

It appears that this method sets bits in register PWR_CR3 of the STM32 to set the charging mode for the RTC. Is this register setting persistent, or must it be set at boot time?

Another discovery…

The documentation says:

The system clock starts running at power up, but until you set the clock, the time and date will be incorrect.

Currently, this is not required. If the RTC has had its time set, then the system clock is set from the RTC at boot without any action by the program.

Of course, if the RTC is reset during the running of the program, then the system clock should also be reset.

Endpoint is fun when you have the time to play with it…

3 Likes
  1. It needs to be set at boot. Disconnect power then this bit is reset.
  2. You are right. We will update the doc.
1 Like