2020-01-23 12:44 AM
Hi,
I'm working on STM32F779NI MCU. For our PCB, we have used 32768 Hz LSE crystal for RTC, which has a tolerance of +/-20 ppm. However on long-run testing, a time gain of around 6 sec in 25 hrs was observed, which is higher than the stated tolerance. I would like to know, if anyone has noticed such behaviour. For now, I've worked around the issue using HAL_RTCEx_SetSmoothCalib, however I'm doubtful if that needs to be done, in the first place, as the time-gain is beyond the stated tolerance. Any help with the probable cause(s) & solution, is highly appreciated. Thank you.
2020-01-23 01:01 AM
Remember you only get that tolerance if the capacitance matching of the crystal is exact. CL = (C1 * C2) / (C1 + C2) + Cstray. CStray depends on your PCB layout and is both difficult to measure and tune. However, assuming it is the same on all PCBs of the same design and the capacitors are reasonably accurate the calibration required should also be roughly the same on each PCB. In the old days we used a variable capacitor on one of the legs to tune the timing but now the processors can do it in software.
Another factor is the drive current, for 6pf crystals is should probably be low and then medium-low for 12pf versions
2020-01-23 01:13 AM
> capacitance matching of the crystal
And for these details, read AN2867.
JW
PS. Temperature plays its role, too - are you running the crystal at room temperature?
2020-01-23 01:14 AM
Thanks @Community member for your inputs, will check on the drive current.
2020-01-23 01:19 AM
Thanks @Community member , yes we are running it at 23-25 deg C. Will check AN2867.