cancel
Showing results for 
Search instead for 
Did you mean: 

RTC (LSE) Running very slow

gkg
Associate II

We are using STM32G030's internal RTC with LSE. The bypass capacitors we have used as shown in the schematic is 22pf (assuming 1.5pf stray capacitance). The crystal we used has Load Capacitance is 12.5pf. This resulted in the RTC being slow, 1 min per day.

We also tried with 17pf & 10pf the clock was still slow.

When we remove the load capacitors the RTC becomes fast.

So we used HAL_RTCEx_SetSmoothCalib function, which improved the results (2 seconds slow) when we tested at our lab. But when we send it to the field the RTC time again becomes slower by around 20sec per day.

Anything else can we do to improve the results?

16 REPLIES 16
Richard Li
Senior

Crystal is temperature sensitive parts, you said "field", what's the temperature?

Attached two documents for your reference. 

STOne-32
ST Employee

Dear @gkg ,

From

 software point of view : what is the LSE drive level used ? And also if you provide the layout 

Ciao

STOne-32

Hi, 

Without soldering any load capacitors, we tried with both low level and medium high the RTC still is fast. 

Attaching the layout.

 

 

Point of layout is, that the return from capacitors must go directly to the ground pin which is closest to the crystal pins. There must be no shared path with any other grounds. AN2867 illustrates this, read it carefully.

JW

Yes, hence we have used a ferrite bead to separate the crystal ground from the main ground (as shown in the schematic)

I don't see where that separated ground is connected to the processor's VSS pin.

JW

Hi,

The VSS connection is from the other side of the PCB.

 

 

As I've said: you need to return the capacitors directly and through a path as short as possible, avoiding sharing that path with any other circuitry.

You can't have the ferrite bead in that path.

JW

Ferrite Bead seems to have worked well for the other PCBs we have designed so far over the years. This time we have change the controller and consequently the layout. As far as this layout goes is there anything else we can do ?

 

Thanks