STM32F3Discovery: RTC clock is late

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
User avatar
part1zan_
Posts: 44
Joined: Sun Sep 08, 2013 9:04 pm

STM32F3Discovery: RTC clock is late

Post 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?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F3Discovery: RTC clock is late

Post 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
User avatar
part1zan_
Posts: 44
Joined: Sun Sep 08, 2013 9:04 pm

Re: STM32F3Discovery: RTC clock is late

Post 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?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F3Discovery: RTC clock is late

Post by Giovanni »

Correct, you have to mount the quartz and two caps on the PCB if I remember well, see the schematic.

Giovanni
User avatar
part1zan_
Posts: 44
Joined: Sun Sep 08, 2013 9:04 pm

Re: STM32F3Discovery: RTC clock is late

Post by part1zan_ »

Thank you very much, you're extremely helpful, as always.
Post Reply