Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DS1307 i2c error

Featured Replies

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

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.