2026-03-16 12:46 AM - last edited on 2026-03-16 2:34 AM by Gyessine
Hello, I have come across an issue with the RTC in my project.
In my project I am using the following:-
I will discuss the issue here, I wrote a program that uses the RTC and print the current time and I tested it straight for 72 hours, what I noticed since the second day that there was a constant drift in time, which kept on changing, and on the last day I observed that there was a total drift of 13 seconds since I started the test. This drift is really concerning for the product that we have made, and that product is already out for field operations. This issue was earlier reported and a ticket was created on ST's online support forum the ticket id is 00255958. They replied to the issue that was reported and asked us to perform the test that I described above, and report this issue over here at ST Community.
Please do reply to this message if anyone has any solution for this issue. It is a matter of urgency
I am attaching my code, the schematics, and also providing the link for the RTC crystal that has been used.
Link for the RTC crystal:- https://www.digikey.in/en/products/detail/abracon-llc/ABS05-32-768KHZ-9-T/3508064?s=N4IgTCBcDaIIICEDKAGArAWgMxgHQHYA2ADgGkAJALQwE4MAVEAXQF8g
Thanks
2026-03-21 8:02 PM
Not sure if this helps, but you can use the Pulse per second (PPS) output of GPS modules/units to discipline your timers - I used this to create a super accurate sine generator. Meanwhile I would be testing cut down versions of your software on a nucleo board (or similar) that already has a 32.768KHz crystal installed - just for comparison (also check out their schematics and layout)
2026-03-22 1:19 AM - edited 2026-03-22 1:45 AM
Can you print real time capture of all RTC registers ? I trust you set all correctly at start but someone could have been corrupted during operation.
Like this
Do not forget RCC_BDCR aka *0x58024470.