REXYGEN Community Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Login

    Permanently setting REXYGEN clock

    Monarco HAT
    2
    4
    528
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sadilekivan
      last edited by

      I have achieved setting the time easily with DATETIME block by using the block inputs and using the OS clock as output. The problem is this setting doesn't persist over shutting and starting of the device. It goes back to the REXYGEN clock (which is about 4 days late).

      I have read the documentation and I tried to sync these two times. Apparently it takes a while but even after further testing with another DATETIME block to sync the REXYGEN clock to the OS clock it doesn't seem to work as intended.

      Any suggestions?

      1 Reply Last reply Reply Quote 0
      • jaroslav_sobotaJ
        jaroslav_sobota
        last edited by

        Hello Ivan,
        the root cause of the problem is most probably in incorrect time stored in the RTC chip of your Monarco HAT. Because that's the only place where the system clock can survive a restart.

        Is your device connected to Internet (can it synchronize time from some NTP server)? What is the output of

        sudo timedatectl
        

        Do you perform a safe shutdown or a hard power cycle?

        Let me know.
        Jaroslav

        S 2 Replies Last reply Reply Quote 0
        • S
          sadilekivan @jaroslav_sobota
          last edited by sadilekivan

          @jaroslav_sobota
          Hello,

          The device wont be connected to the internet in its operation and the customer would like to set the time manually.

          Here is the output after a fresh restart:

          Local time: Sat 2020-03-14 16:26:24 GMT
                     Universal time: Sat 2020-03-14 16:26:24 UTC
                           RTC time: Thu 2020-03-19 10:38:38
                          Time zone: Europe/London (GMT, +0000)
          System clock synchronized: no
                        NTP service: active
                    RTC in local TZ: no
          

          Here is the output after I set the time with the Rexygen DATETIME block:

          Local time: Thu 2020-03-19 10:30:03 GMT
                     Universal time: Thu 2020-03-19 10:30:03 UTC
                           RTC time: Thu 2020-03-19 10:30:03
                          Time zone: Europe/London (GMT, +0000)
          System clock synchronized: no
                        NTP service: active
                    RTC in local TZ: no
          

          It seems that the RTC time is preserved which is neat, its just not offered in the rexygen selection as far as I looked.

          1 Reply Last reply Reply Quote 0
          • S
            sadilekivan @jaroslav_sobota
            last edited by sadilekivan

            @jaroslav_sobota

            Hello,

            Selecting the HW clock seems to fix the problem, I did try this as my first solution because it was obvious to try and get the time from the Real-time circuit, but I could swear it had some issues. Must have been some other mistake I fixed along the way.

            Anyway, everything works as intended, thanks for the swift support with the command, it proved the time was set correctly just read from the wrong source.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            This is a community forum for REXYGEN users and fans. Detailed information can be found at REXYGEN homepage.

            There is also an outdated REXYGEN community forum.

            Powered by NodeBB.