Skip to content

RTC PCF85063A (CM4 auf Waveshare CM4-IO-BASE-C) wird nicht korrekt genutzt #3082

Closed
@Baxxy13

Description

@Baxxy13

Describe the issue you are experiencing

Ich habe hier ein CM4 auf einem Waveshare CM4-IO-BASE-C - Board.
RaspberryMatic läuft wunderbar darauf, nur mit der integrierten RTC: PCF85063A klappt das nicht so recht.

Die RTC wird augenscheinlich korrekt erkannt, nur wird die Systemzeit nicht aus der RTC genutzt wenn kein Internet/NTP-Server beim booten verfügbar ist.

Describe the behavior you expected

Wäre schön wenn RaspberryMatic, bei fehlendem Internet/NTP-Server, die Zeit der RTC nutzen würde.

Steps to reproduce the issue

  1. System ohne Internet/NTP-Server starten
  2. Zeitstempel im Syslog kontrollieren

...

What is the version this bug report is based on?

3.81.5.20250330 (Nightly)

Which base platform are you running?

rpi4 (RaspberryPi4, ARM64/aarch64)

Which HomeMatic/homematicIP radio module are you using?

HM-MOD-RPI-PCB

Anything in the logs that might be useful for us?

Boot ohne angestecktes LAN-Kabel, dann LAN-Kabel eingesteckt:

Jan  1 01:03:31 RM80-CM4-4GB daemon.warn ifplugd(eth0)[1390]: client: eth0: link up, static, firewall, inet up, 192.168.113.80, 
Jan  1 01:03:31 RM80-CM4-4GB daemon.info ifplugd(eth0)[1390]: Program executed successfully.
Jan  1 01:03:33 RM80-CM4-4GB user.err monit[2027]: 'chronyd' failed to restart (exit status 0) -- '/etc/init.d/S46chronyd restart': Stopping chrony: FAIL Starting chrony: using default NTPs, could not sync to '0.de.pool.ntp.org 1.de.pool.ntp.org 2.de.pool.ntp.org 3.de.pool.ntp.org', FAIL
Jan  1 01:03:33 RM80-CM4-4GB user.err monit[2027]: 'hs485dEnabled' status failed (2) -- grep: /var/etc/hs485d.conf: No such file or directory
Jan  1 01:03:34 RM80-CM4-4GB user.err monit[2027]: 'hmlangwEnabled' status failed (1) -- no output
Jan  1 01:03:34 RM80-CM4-4GB user.err monit[2027]: 'eth0LinkCheck' status failed (1) -- no output
Jan  1 01:03:34 RM80-CM4-4GB user.err monit[2027]: 'hb_rf_eth-CheckEnabled' status failed (1) -- no output
Jan  1 01:03:34 RM80-CM4-4GB user.warn monit[2027]: 'rpi4usb3Check' status failed (1) -- no output
Jan  1 01:03:34 RM80-CM4-4GB user.err monit[2027]: 'tailscaleEnabled' status failed (1) -- no output
Jan  1 01:03:47 RM80-CM4-4GB user.err monit[2027]: 'chronyd' process is not running
Jan  1 01:03:47 RM80-CM4-4GB user.info monit[2027]: 'chronyd' trying to restart
Jan  1 01:03:47 RM80-CM4-4GB user.info monit[2027]: 'chronyd' restart: '/etc/init.d/S46chronyd restart'
Apr  2 17:09:23 RM80-CM4-4GB daemon.notice ntpdate[2476]: step time server 79.133.44.137 offset +1743606326.679924 sec
Apr  2 17:09:24 RM80-CM4-4GB daemon.info chronyd[2491]: chronyd version 4.6.1 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP -SCFILTER -SIGND +ASYNCDNS -NTS -SECHASH +IPV6 -DEBUG)
Apr  2 17:09:24 RM80-CM4-4GB daemon.info chronyd[2491]: Added source ID#0000000001 (0.de.pool.ntp.org)
Apr  2 17:09:24 RM80-CM4-4GB daemon.info chronyd[2491]: Added source ID#0000000002 (1.de.pool.ntp.org)
Apr  2 17:09:24 RM80-CM4-4GB daemon.info chronyd[2491]: Added source ID#0000000003 (2.de.pool.ntp.org)

Additional information

Eigentlich sind alle Vorraussetzungen erfüllt:
config.txt:

# special device tree options for Compute Module 4
[cm4]
dtoverlay=dwc2
dtparam=i2c_vc=on
dtoverlay=i2c-rtc,pcf85063a,i2c_csi_dsi

S02InitRTC:

  # check for PCF8563 RTC clock at 0x51
  if i2cget -y 1 0x51 0x00 2>/dev/null >/dev/null; then
    # check for PCF8563
    if modprobe i2c:pcf8563; then
      HM_RTC="pcf8563"
      [[ -c /dev/rtc0 ]] && return 0
      echo pcf8563 0x51 >/sys/class/i2c-adapter/i2c-1/new_device
      [[ -c /dev/rtc0 ]] && return 0
      echo 0x51 >/sys/class/i2c-dev/i2c-1/device/delete_device
    fi
  fi

dmesg:

# dmesg | grep rtc
[    9.333162] pl011_raw_uart fe201000.serial: Missing I2C driver of rtc device, trying to load
[    9.339298] rtc-ds1307: probe of 1-0032 failed with error -5
[    9.345808] rtc-ds1307: probe of 1-0032 failed with error -5
[    9.426663] rtc-pcf85063 10-0051: registered as rtc0

hwclock:

# hwclock -r
Wed Apr  2 15:27:59 2025  0.000000 seconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bug-reportSomething isn't working💻 hardware supportThis issue refs tickets/issue introducing/fixing some hardware support

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions