Results 1 to 2 of 2

Thread: Orange Pi One and external DS3231 RTC on rtc1

  1. #1
    Join Date
    Apr 2017
    Posts
    5
    Post Thanks / Like

    Default Orange Pi One and external DS3231 RTC on rtc1

    Hello

    There is a problem with external RTC on Orange Pi One board, because it has onboard RTC (rtc0) and if I use external one it doesn't work because FPP tries to read from rtc0. How can I change rtc0 to rtc1 and i2c1 to itc0?

    If anyone would try to use Orange Pi with RTC here is what I had to do to even have external DS3231 RTC working:

    sudo armbian-config
    turn on i2c (default is off)
    sudo nano /etc/modules
    write:
    g_serial
    rtc-ds1307
    sudo nano /etc/rc.local
    write before "exit":
    echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device hwclock -s

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

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

    sudo hwclock -r -f /dev/rtc0
    1970-01-01 01:01:55.479533+01:00

    sudo hwclock -r -f /dev/rtc1
    2023-03-12 21:46:39.992017+01:00

    dsmeg
    [ 2.177274] sun6i-rtc 1f00000.rtc: registered as rtc0
    [ 2.177312] sun6i-rtc 1f00000.rtc: setting system clock to 1970-01-01T00:00:10 UTC (10)
    [ 2.177435] sun6i-rtc 1f00000.rtc: RTC enabled
    [ 61.883505] rtc-ds1307 0-0068: registered as rtc1
    [ 61.883788] i2c i2c-0: new_device: Instantiated device ds1307 at 0x68


    I tried to edit:
    /opt/fpp/scripts/piRTC
    /opt/fpp/etc/update-RTC
    but still FPP is loading time from rtc0. Any idea what file I should edit?

  2. #2
    Join Date
    Feb 2008
    Location
    Warminster, PA
    Posts
    1,944
    Post Thanks / Like

    Default Re: Orange Pi One and external DS3231 RTC on rtc1

    I think you'll have better luck getting an answer over at the falconchristmas forums. I know there are discussions of OrangePi boards over there.
    Chris
    [URL="http://www.maloneylights.com"]http://www.maloneylights.com[/URL]
    [URL="http://halloween.maloneylights.com"]http://halloween.maloneylights.com[/URL]
    [URL="http://ctm.maloneylights.com"]http://ctm.maloneylights.com[/URL]

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •