Jump to content

Setup of Real-Time-Clock of HAT (hwclock: Cannot access the Hardware Clock via any known method.)


yvo

Recommended Posts

Dear List

I tried to get the Real-Time-Clock (RTC) of the HAT set to the current time. The setup is following:

  • RaspberryPi 3B+
  • HAT
  • Raspberry and HAT powered by the 5-28V input of the HAT providing about 21V
  • The entire setup is headless
  • Access of the Raspberry and HAT by the LAN-interface
  • The Raspberry is connected by WiFi-interface to the internet

Following the description, I tried to get the RTC configured.

With the command

dmesg

I receive the following information:

[   13.116016] rtc-pcf8523 1-0068: hctosys: unable to read the hardware clock
[  455.792146] rtc-pcf8523 1-0068: low voltage detected, time is unreliable

Using the following command:

hwclock --systohc

gives the output:

hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.

Question:

  • Does anyone can interpret the output? Why is the RTC not accessible?
  • What to do, to get the RTC running?

Looking for any suggestions and ideas.

Cheers,

Yvo

Link zu diesem Kommentar
Share on other sites

Am 17.4.2023 um 18:47 schrieb photron:

Do you have the latest firmware installed on the HAT Brick? You can check with brickv. It should be version 2.0.3. If not please update using brickv. On the HAT Brick tab in brickv in the bottom left you can switch the RTC chip type. Try changing it to the other one and reboot the Raspberry Pi.

Dear photron

Thank you very much for the replay. The HAT has already the new firmware installed.

Changing the RTC-driver to DS1338 seemed to solve the problem. After a reboot of the RaspberryPi, the command

dsmeg

got the probably correct answer back:

[   12.195400] rtc-ds1307 1-0068: registered as rtc0
[   12.219366] rtc-ds1307 1-0068: setting system clock to 2023-04-18T10:49:16 UTC (1681814956)

The date and time looks perfect now.

Cheers,

Yvo

Link zu diesem Kommentar
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...