+1 500 000 products in offer

7000 packages per day

+300 000 clients from 150 countries

Quick Buy Favourites
Cart

How does the Raspberry Pi's real-time clock (RTC) work - is it built-in?

On the Raspberry Pi 5, the real-time clock (RTC) is built-in but requires an external lozenge battery to keep time when power is removed; older models do not have native RTC and rely on the network or external modules.

What is the RTC and how does it work on the Raspberry Pi?

An RTC is a chip that maintains date and time regardless of the main power state, usually powered by a small battery. On the Raspberry Pi 5 such a chip is integrated on the board and, when the Batteries are connected, it takes on the role of 'system clock', so that the keeps the correct time even when the device is fully powered off, without the need for immediate synchronisation with the Internet. Estimated backup time with a typical battery is in the order of several months of continuous RTC circuit operation.

How was it before and what does this mean in practice?

In earlier generations (e.g. Pi 3, Pi 4) RTC was not built-in. After a reboot, such devices set the time to the default value and only an NTP synchronisation (from a time server on the network) or an external RTC module on I²C restores the correct date and time. Consequently, offline systems needed additional hardware to keep time between restarts. The Pi 5 with built-in RTC simplifies this architecture: simply plug in the Batteries and synchronise the time once (e.g. with NTP) - from then on the time will be kept even without the network.

Integration with Raspberry Pi OS and accuracy

After booting the kernel reads the time from the RTC and sets the system clock even before the network services start. If Internet access is available, NTP (or chrony/systemd-timesyncd) corrects any drift and ensures long-term accuracy. The Raspberry Pi 5's RTC therefore acts as a stable time base between power sessions, while accuracy on a weekly and monthly basis is still best maintained by periodic network synchronisation, which is typical practice on Linux systems. From an application point of view, this means correct timestamps of logs, databases, files and encrypted communications from the very first seconds of operation, even in environments without network access.

Batteries installation and usage scenarios

To activate the RTC backup on the Pi 5, connect the appropriate lozenge battery (coin cell) to the provided connector on the board. Once the time and zone have been set once - whether manually or via NTP - the chip keeps time during shutdowns, which is important for mobile applications, remote locations and industrial installations where continuous connectivity is not guaranteed. Older models without built-in RTC can still achieve a similar effect by external RTC Modules on the I²C bus, but this requires additional wiring and configuration of the controllers.

Transfer Multisort Elektronik (TME) is one of the world’s largest global distributors of electronic components, electrotechnical parts, workshop equipment, and industrial automation. The catalog includes over 1,500,000 products from 1,300 leading manufacturers. TME’s modern logistics centers in Łódź and Rzgów (Poland), with a combined area of over 40,000 m², ship nearly 6,000 packages daily to customers in more than 150 countries.

TME also invests in the development of knowledge and skills of young engineers and electronics enthusiasts through the TME Education project, and supports the tech community by organizing the TechMasterEvent series, promoting innovation and experience exchange.

READ ALSO