Jump to content

Recommended Posts

Posted

Good morning,

I have made a board where I have put an RTC DS1307 to a Neo core nanopi.

From what I have been able to see, the system loads some kind of RTC module called sun6i-rtc. this module "occupies" the / dev / rtc0 so when loading the DS1307 it assigns it / dev / rtc1.
Can the sun6i-rtc be disabled in some way?

On the other hand, if I do this command.

hwclock -w -f /dev/rtc1 --verbose
hwclock from util-linux 2.37.154-c2ca2
System Time: 1625751906.401974
Using the rtc interface to the clock.
Last drift adjustment done at 1625751901 seconds after 1969
Last calibration done at 1625751901 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
RTC type: 'rtc-ds1307'
Using delay: 0.000000 seconds
missed it - 1625751906.405792 is too far past 1625751906.000000 (0.405792 > 0.001000)
1625751907.000000 is close enough to 1625751907.000000 (0.000000 < 0.002000)
Set RTC to 1625751907 (1625751906 + 1; refsystime = 1625751906.000000)
Setting Hardware Clock to 13:45:07 = 1625751907 seconds since 1969
ioctl(RTC_SET_TIME) was successful.
Not adjusting drift factor because the --update-drift option was not used.
New /etc/adjtime data:
0.000000 1625751906 0.000000
1625751906
UTC


it works correctly, but if I want to read,

 

hwclock -r -f /dev/rtc1 --verbose

it gives me this error.

hwclock from util-linux 2.37.154-c2ca2
System Time: 1625751969.137899
Using the rtc interface to the clock.
Last drift adjustment done at 1625751906 seconds after 1969
Last calibration done at 1625751906 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
ioctl(3, RTC_UIE_ON, 0): Invalid argument
Waiting in loop for time from /dev/rtc1 to change
hwclock: Timed out waiting for time change.
...synchronization failed

the battery is charged, the i2c works well and detects it correctly. Any ideas?

Thanks and best regards.

Armbianmonitor

http://ix.io/3siu

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines