9 Replies Latest reply on Dec 18, 2014 2:08 PM by Helmut64

    RTC clock alarm to boot up the Edison

    Helmut64

      Has anyone found out if the Edison RTC clock can be programmed to boot the Edison?

       

      I have not found any documentation regarding it.

        • 1. Re: RTC clock alarm to boot up the Edison
          deium

          Helmut64,

          the Hardware RTC is not powered by a battery by default, system time is timesync'd and then pushed from sys to the RTC.

          I have not attached a battery to Edison, or the RTC yet, so I haven't tried to use the RTC timer.

          And yes, maybe we might get more documentation soon.

          • 2. Re: RTC clock alarm to boot up the Edison
            deium

            Doc: 331189-002 - Page 11 - Edison Module Hardware Guide Sept 2014 states

            32.768 kHz RTC for backup time.

            Alarm timer interrupt.

            (as separate entries)

             

            I haven't seen anything yet on how to change sleep/power states except by the manual physical button.

             

            the /proc/driver/rtc

            tc_time        : 21:10:28

            rtc_date        : 2014-12-07

            alrm_time       : 00:00:16

            alrm_date       : 2000-01-02

            alarm_IRQ       : no

            alrm_pending    : no

            update IRQ enabled      : no

            periodic IRQ enabled    : no

            periodic IRQ frequency  : 1024

            max user IRQ frequency  : 64

            24hr            : yes

            periodic_IRQ    : no

            update_IRQ      : no

            HPET_emulated   : no

            BCD             : yes

            DST_enable      : no

            periodic_freq   : 1024

            batt_status     : okay

            might suggest it could be programmed

            • 3. Re: RTC clock alarm to boot up the Edison
              Helmut64

              With the breakout board and a connected battery there is power on the RTC backup battery input. Regarding the sleep/power states I believe a click on the button has no effect with the latest release. Yes sleeping with 17mw and wakeup configured by an alarm timer would be great. Even a complete boot-up via alarm allows for periodic processing.

               

              We need to look into the kernel source to investigate about the button behaviour, I still have not found how to get the kernel source or in which package it is saved. I downloaded the Linux kernel source "linux-3.17.4" from kernel.org but it seems that the Edison support is not in there.

              • 4. Re: RTC clock alarm to boot up the Edison
                deium

                Helmut64, I am digging through sources too.  The latest release was 3.10.17, at least for the Yocto kernel

                • 5. Re: RTC clock alarm to boot up the Edison
                  deium

                  DiegoV_Intel, do you have some knowledge to add here?

                  • 6. Re: RTC clock alarm to boot up the Edison
                    DiegoV_Intel

                    Hi all,

                     

                    I'm not sure, but let me investigate about it and if I am able to find something useful I will post it here.

                     

                    Regards,

                    Diego.

                    • 7. Re: RTC clock alarm to boot up the Edison
                      DiegoV_Intel

                      Hi all,

                       

                      I'm back. I have been trying to set the RTC alarm but I haven't been able to do it. Let me explain what I have been doing:

                       

                      First I look the time settings using /proc/driver/rtc, and I got the following:

                       

                      rtc_time        : 19:09:38
                      rtc_date        : 2014-12-18
                      alrm_time      : 00:00:07
                      alrm_date      : 2000-01-02
                      alarm_IRQ      : no
                      alrm_pending    : no
                      update IRQ enabled      : no
                      periodic IRQ enabled    : no
                      periodic IRQ frequency  : 1024
                      max user IRQ frequency  : 64
                      24hr            : yes
                      periodic_IRQ    : no
                      update_IRQ      : no
                      HPET_emulated  : no
                      BCD            : yes
                      DST_enable      : no
                      periodic_freq  : 1024
                      batt_status    : okay
                      

                       

                      So I tried to set the alrm_time and alrm_date. Those values are modified when you boot the Edison, and the alarm is set one day after the current date. If you run the reboot command and check again the settings, you will find other values. Check below the values I got this time:

                       

                      rtc_time        : 19:23:12
                      rtc_date        : 2014-12-18
                      alrm_time      : 19:17:24
                      alrm_date      : 2014-12-19
                      alarm_IRQ      : no
                      alrm_pending    : no
                      update IRQ enabled      : no
                      periodic IRQ enabled    : no
                      periodic IRQ frequency  : 1024
                      max user IRQ frequency  : 64
                      24hr            : yes
                      periodic_IRQ    : no
                      update_IRQ      : no
                      HPET_emulated  : no
                      BCD            : yes
                      DST_enable      : no
                      periodic_freq  : 1024
                      batt_status    : okay
                      

                       

                      However since alarm_IRQ is set to "no", the alarm is not active. I found you have to write the desired alarm date in /sys/class/rtc/rtc0/wakealarm. Check these links:

                      Wake Up Linux With an RTC Alarm Clock | Linux.com

                      wake up - how to disable an RTC alarm in linux (once sheduled) - Super User

                      https://www.kernel.org/doc/Documentation/rtc.txt

                       

                      I looked for it but there is no wakealarm under that directory. Then, I found here: http://www.mythtv.org/wiki/ACPI_Wakeup#Using_.2Fsys.2Fclass.2Frtc.2Frtc0.2Fwakealarm, that the RTC module could not be loaded, and there is a suggestion to load it but I haven't tried it. I also found this other site, I think it is useful too; if you want to check it: https://wiki.archlinux.org/index.php/Time.

                       

                      I hope you find this information useful, at least as a starting point. If you are able to set the RTC alarm I invite you to post the results in the thread so other users can take advantage of them.

                       

                      Regards,

                      Diego.

                      • 8. Re: RTC clock alarm to boot up the Edison
                        deium

                        DiegoV_Intel   Thanks a million.

                        • 9. Re: RTC clock alarm to boot up the Edison
                          Helmut64

                          Hi Diego,

                           

                          thank you very much for your investigation. I will also spend some time to look into this.

                           

                          I believe what is needed this the circuit diagram how the clock chip is connected with the other Edison components, than looking into the data sheets/specs, after this we can investigate into this further by looking into the Linux drivers and what needs to be adjusted.