2024-10-20 08:17 AM
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?
2024-10-20 08:46 AM
2024-10-20 09:05 AM
Dear @gkg ,
From
software point of view : what is the LSE drive level used ? And also if you provide the layout
Ciao
STOne-32
2024-10-21 12:36 AM
2024-10-21 01:41 AM
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
2024-10-21 03:39 AM
Yes, hence we have used a ferrite bead to separate the crystal ground from the main ground (as shown in the schematic)
2024-10-21 06:54 AM
I don't see where that separated ground is connected to the processor's VSS pin.
JW
2024-10-23 08:11 AM
Hi,
The VSS connection is from the other side of the PCB.
2024-10-24 08:51 AM - edited 2024-10-24 08:51 AM
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
2024-10-24 08:58 AM
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