cancel
Showing results for 
Search instead for 
Did you mean: 

RTC is not working properly. (Vbat related problem)

Seyoung
Visitor

We are making a board using stm32f767nih6. There seems to be a problem with RTC and Vbat while testing the board.

First, we are using LSE with a 32.768Khz external crystal oscillator. However, there is a symptom that it slows down by about 10 seconds during approximately 40 minutes.

Second, we have set up Vbat to supply 3.3V using a coin battery. However, when the power is turned off and turned on after a certain period of time, the RTC restarts around the point where the power was turned off.

For example, when the power is turned off at 10:00 and turned on at 10:30, the time displayed on the device is 10:00.

 

Seyoung_0-1730892683758.png

 

5 REPLIES 5
Andrew Neil
Evangelist III

@Seyoung wrote:

we are using LSE with a 32.768Khz external crystal oscillator.

AndrewNeil_0-1730893207538.png

That's just a crystal - not a crystal oscillator:

https://community.st.com/t5/stm32-mcus-products/stm32f4-osc-problem/m-p/664136/highlight/true#M241592

PGump.1
Senior III

Hi,

I think that you don't have the LSE enabled.

Kind regards
Pedro

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.
Peter BENSCH
ST Employee

@Seyoung The behaviour sounds very unusual. At first I assumed that you were inadvertently using the free-running LSI instead of the LSE as the clock source for the RTC. However, 10s deviation within 40min, which corresponds to 4167ppm, is far too much even for LSI. Perhaps you should add the programming of the RTC and LSE here.

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.
Seyoung
Visitor

1 (1).jpg

3.jpg

2 (1).jpg

   

Hi,

I'm going to suggest the crystal capacitance loading is far too high, making it run slow, and when it switches to VBAT it stalls...

Kind regards
Pedro

 

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.