RTC

The Nagami module includes a basic Real-Time Clock (RTC) built into the SoC. This RTC is available as /dev/rtc0 and provides timekeeping capabilities while the system is powered on. It is not battery-backed, so it does not retain time across power cycles.

Device Name Description
/dev/rtc0 Internal RTC in SoC (non-persistent)

Notes

  • The internal RTC can track year, month, date, weekday, hour, minute, and seconds—but only while the system has power.
  • When the system is powered off or rebooted without syncing to a network time source (e.g. NTP), the RTC will reset to an undefined state.
  • There is no external RTC or VBAT pin on the Nagami for battery backup.

Accessing the RTC

You can inspect the RTC device using:

cat /sys/class/rtc/rtc0/name

Expected output:

sun6i-rtc 7090000.rtc

This confirms the presence of the Allwinner SoC's built-in RTC.

Setting the Time

To write the current system time to the RTC:

hwclock -w -f /dev/rtc0

To read the time from the RTC:

hwclock -r -f /dev/rtc0

Time Persistence Considerations

Because the RTC is not battery-backed:

  • You must set the time manually or use NTP after each power-up or reboot.
  • You may configure a systemd or init script to sync time on boot using a network time server.

Summary

The Nagami includes a basic RTC built into the Allwinner V3s SoC. It is sufficient for keeping time while the system is running, but does not retain time across reboots or power loss. If persistent timekeeping is needed, consider using an external battery-backed I2C RTC in your carrier board design.