Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi.
I have a embedded system running linux.
For some reason the system clock is not synchronised, it's running fast, every 45 seconds in the system clock is actually 60 seconds in the real world.
there is another strange thing, if I stop the system in the U-Boot and check the time there its working fine, synchronised and progress well.
I've checked the DTS file, cant find anything wrong there.
Normally you edit a /etc/ntp.conf file and set time from a government time server. There area lot of How To's online, search 'linux ntp.conf' or 'linux date'.
A clock running wild sounds more like a hardware issue. Any clock will drift a second or two, what you describes in not a simple drift.
It would help if you told us what hardware you are using, and what linux version and release. Without this basic info, we can not help more.
Hi.
The device running the linux is not connected to the WEB, therefore it's not possible to sync the clock using NTP server.
The device has a very reliable clock in the HW, it's not accurate like NTP but it's far better then running 33% faster then real time clock.
If you have another system that has internet connectivity, and does sync to a real time clock, you can use it as a server, your bedded system can be a client.
You need to provide better info on hardware and software.
You might be able to adjtimex to determine/adjust for the system clock drift rate and use hwclock via chron to sync the system clock to the hardware clock at a set interval.
My mistake the clock is running too slow not too fast. every 45Sec in the system clock it's actually 60Sec in real world time.
I don't think that the term "Drift" is best describe my situation.
The clock is running 25% slower then actual time, but his speed remain pretty constant.
Do you have any idea why in the Uboot the clock behave normal and in the linux it's start to run too slow?
I've tried to use adjtimex to adjust the time, for some reason it cause segmentation fault.
regarding adjusting it with cron from time to time, this will solve the small drift that every clock has, I will do it, but I first want to understand why its running so much slower at the beginning.
Last edited by ChangaManga; 11-12-2019 at 11:21 AM.
Hi.
I have a embedded system running linux.
For some reason the system clock is not synchronised, it's running fast, every 45 seconds in the system clock is actually 60 seconds in the real world.
there is another strange thing, if I stop the system in the U-Boot and check the time there its working fine, synchronised and progress well.
I've checked the DTS file, cant find anything wrong there.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.