This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RTC pcf8563

I wanted to know if the rtc module pcf8563 can be used with the Tinker Board? If yes what's the way to use it?

Smile Tinker a day, tinker everyday! Smile
I was using the DS3231 module flawlessly, after setting its overlay. But I'm not sure there's the same for pcf8563.
Light blue words might be a link. Have you try to click on them? Big Grin

I figured out how to build it and enable it on kernel by compiling it with light changes.

I followed instructions here "" but adapted to pcf8563. However I still get bad time for a few times before having it synced with RTC.

After start up (real time 2019-04-17 14:17:52):
linaro@tinkerboard:~$ date
Fri Jan 18 09:50:33 CET 2013
linaro@tinkerboard:~$ sudo hwclock --rtc=/dev/rtc1 --get
2019-04-17 14:17:52.257590+0200
linaro@tinkerboard:~$ sudo hwclock --rtc=/dev/rtc0 --get
2013-01-18 09:50:40.326774+0100

Here what I see in dmesg :
[    2.793726] rk808-rtc rk808-rtc: rtc core: registered rk808-rtc as rtc0
[    8.542186] rk808-rtc rk808-rtc: setting system clock to 2013-01-18 08:50:17 UTC (1358499017)
[    9.543125] rtc-pcf8563 1-0051: chip found, driver version 0.4.4
[    9.554620] rtc-pcf8563 1-0051: rtc core: registered rtc-pcf8563 as rtc1

/etc/default/hwclock :
# Defaults for the hwclock init script.  See hwclock(5) and hwclock(8).

# This is used to specify that the hardware clock incapable of storing
# years outside the range of 1994-1999.  Set to yes if the hardware is
# broken or no if working correctly.

# Set this to yes if it is possible to access the hardware clock,
# or no if it is not.

# Set this to any options you might need to give to hwclock, such
# as machine hardware clock type for Alphas.

# Set this to the hardware clock device you want to use, it should
# probably match the CONFIG_RTC_HCTOSYS_DEVICE kernel config option.

# Set the System Time from the Hardware Clock and set the kernel's timezone
# value to the local timezone when the kernel clock module is loaded.

#KERNEL=="rtc0", RUN+="/lib/udev/hwclock-set $root/$name"
KERNEL=="rtc1", RUN+="/lib/udev/hwclock-set $root/$name"

SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc"
#SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100"
SUBSYSTEM=="rtc", KERNEL=="rtc1", SYMLINK+="rtc", OPTIONS+="link_priority=-100"

#if [ -e /run/systemd/system ] ; then
#    exit 0

Is there a way to force sync with rtc1 instead of rtc0?
Smile Tinker a day, tinker everyday! Smile
udev rules, look the onward text. You might rename the device.
Light blue words might be a link. Have you try to click on them? Big Grin

Forum Jump:

Users browsing this thread: d12345, 1 Guest(s)