cancel
Showing results for 
Search instead for 
Did you mean: 

Vbat on RTC

Hi everyone,

 

I'm using a STWINBX1.

Some documentation say that RTC can be plug to Vbat. In my case, my board won't be plug to current and will only work with a battery.
My question is simple, is RTC can "remember" date and time if the battery run out of energy ?

I read that some RTC on modern computer can work without battery, with a crystal. But I can't find a similar information for my board.

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

Most of STM32 MCUs have Vbat pin on which you can connect a battery or supercapacitor.

This is an example from STM32L476-EVAL board:

SofLit_0-1708967906903.png

If JP12 position is 2-3. Vbat pin is connected to the battery.

Internally, there is an internal power switch that controls which power supply will feed the backup domain (that includes RTC) and there is a power low level detection mechanism that monitors VDD. If VDD is available, backup domain is powered from VDD, but if the latter is lost, the switch status changes and will let backup domain to be powered from Vbat (battery).

SofLit_1-1708968161663.png

PS: you can connect CR2032 to Vbat pin.

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.

View solution in original post

12 REPLIES 12
Peter BENSCH
ST Employee

An RTC always requires a power source, even the modern computers you mentioned. There, a 2032 is usually the power source and usually lasts for the entire utilisation time, so that the normal user does not notice its presence.

Embedded systems therefore also require a power source, for which the VBAT connection is intended. If VBAT is connected directly to VDD for reasons of simplification, the RTC will forget the set time and date information.

Hope that answers your question?

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.

As an alternative to battery, in some cases a supercapacitor can be used (with all the consequences - limited run time and requirement to charge, mainly).

JW

Thanks !

 

« If Vbat us connected directly to Vdd »

im a newbie in electronics, but there is others possibilities ?

And St have both design ? Like

RTC connected to a 2032 

or

RTC connected to Vdd who is connected to Vbat ?

I guese I can find that information in the datasheet of the MCU ?

Hello,

Most of STM32 MCUs have Vbat pin on which you can connect a battery or supercapacitor.

This is an example from STM32L476-EVAL board:

SofLit_0-1708967906903.png

If JP12 position is 2-3. Vbat pin is connected to the battery.

Internally, there is an internal power switch that controls which power supply will feed the backup domain (that includes RTC) and there is a power low level detection mechanism that monitors VDD. If VDD is available, backup domain is powered from VDD, but if the latter is lost, the switch status changes and will let backup domain to be powered from Vbat (battery).

SofLit_1-1708968161663.png

PS: you can connect CR2032 to Vbat pin.

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.

Thanks you so much for this accurate answer !

I definitely need to work on my electronics skills in order to design my software

I checked both datasheets of my MCU (STM32U585xx) and my Board (STEVAL-STWINBX1), and there is no mention of "2032".

When you say "PS: you can connect CR2032 to Vbat pin.", you mean that we can physically add something to the hardware ? Or there is some software feature to use a 2032 that is already installed ?

CR2032 is just an example. The board may not contain a battery and Vbat is connected to VDD by HW. My comment was regarding the MCU itself where you need an external voltage source like a battery or supercapacitor and there is no software configuration to set or indicate the voltage source. 

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.

My board contain a battery. I checked the power supply schemes of my MCU and

"VBAT is the power supply for RTC, (through power switch) when VDD is not present."

There is no mention of external voltage source.

So if I understand, If I can't add CR2032 (or equivalent), I can't have guarantee to hold date/time if my battery run out of energy ?