Page 1 of 1

STM32F3Discovery: RTC clock is late

Posted: Tue Nov 19, 2013 8:02 pm
by part1zan_
I got an RTC clock working with ChibiOS/RT on my STM32F3Discovery, and I have an issue with it. The problem is that when I set the time at the device, in about five minutes the clock becomes late:

Code: Select all

#this is executed in ChibiOS console:
ch> time
current rtc time: 1384902068
which is 2013-11-19 23:01:08 MSK
# and this is executed in my shell @ the same time
$ date
Вт. нояб. 19 23:01:13 MSK 2013

When some time passes, the RTC clock becomes even more late. What can I do in that kind of situation?

Re: STM32F3Discovery: RTC clock is late

Posted: Tue Nov 19, 2013 8:14 pm
by Giovanni
What clock source are you using? if I remember well the STM32F3Discovery does not have a 32kHz external crystal. If you are using the internal oscillator then you should not expect precision.

Giovanni

Re: STM32F3Discovery: RTC clock is late

Posted: Tue Nov 19, 2013 8:16 pm
by part1zan_
I use the internal RTC. So if I want the clock to be precise, I need to get a quartz. Am I right?

Re: STM32F3Discovery: RTC clock is late

Posted: Tue Nov 19, 2013 8:58 pm
by Giovanni
Correct, you have to mount the quartz and two caps on the PCB if I remember well, see the schematic.

Giovanni

Re: STM32F3Discovery: RTC clock is late

Posted: Tue Nov 19, 2013 9:35 pm
by part1zan_
Thank you very much, you're extremely helpful, as always.