eyejae.blogg.se

Raspberry pi clock
Raspberry pi clock












raspberry pi clock raspberry pi clock

One year after setting the hardware clock, it will be 95 seconds off at max. So, 3 of each 1 million seconds may be wrong. The hardware clock I use, a RasClock, is said to lose 3 ppm (parts per million). This is a Raspberry Pi with a hardware clockĬlock accuracy is defined in terms of ppm (parts per million) and it gives a way of comparing accuracies. In a previous blog post, I explained how to set this up. But it is fairly simple to add a hardware clock using the GPIO ports. Just like virtual hardware, the Raspberry Pi has no hardware clock. Linux uses a clocksource to maintain time, several of which exist, mostly depending on the available hardware. At shutdown, the system time is used to set the hardware clock as a way to ‘save’ the time between reboots. At boot time, the hardware clock is used to set the system clock and from that point onwards the system clock is used to track time. The second clock is called the ‘system clock’, maintained by the operating system, Linux in our case. This is the battery backed clock on the motherboard that keeps time even when the machine is shut down. Two clocks are important in Linux: a ‘hardware clock’, also known as RTC (Real Time Clock), CMOS or BIOS clock. Let’s start with some background before we answer the question.

raspberry pi clock

So, how accurately can the Raspberry Pi keep time? The Raspberry Pi is physical hardware with a very small footprint. This is unfortunate because NTP is a light-wight protocol, so using physical hardware for it may sound wasteful. The clock compensation technique built into NTP was never designed to handle anything but a static drift factor. Recently I was wondering if a Raspberry Pi would be able to run an accurate clock and provide a stable NTP service.Ī virtual machine can’t do it, because its system clock has a changing drift factor.














Raspberry pi clock