Jump to content

Recommended Posts

Posted

Hi
I am having issues getting an external RTC (DS1307) to work properly on the OrangePi + 2E
I am using the current version of ARMBIAN 5.6.5 (Stretch)
The hardware side of things works perfectly.

If I use i2cdetect -y 0, I see the I2C bus transaction on an oscilloscope and I also see the device as shown

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

The problem is when I try and attach a driver to this device permanently, it seems to work until I have to reboot or power down. When I reboot, the device is again displaying as above. I do not see "UU" as I would expect.
I followed the steps here, but it doesn't work. It does seem to work, however on older versions of Armbian.

https://forum.armbian.com/topic/4074-real-time-clock-ds3231/

 

I have done all the steps as per the thread, I also made changes to rc.local, but none of these work. All that happens is the OrangePi boots up to some arbitrary time until it can get the correct time via NTP.

 

So obviously the driver is not being loaded at boot and the rest of the system fails to get time from it so it falls back to NTP.

 

Any suggestions or perhaps the correct way of doing this?

 

Posted

did you insert

rtc-ds1307

in /etc/modules?

and 

echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device 

hwclock -s

in /etc/rc.local?

Posted

Thank you

There's the first mistake...
/etc/modules is missing.. I didn't know it had to go in there.

Will change that and then test again

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines