This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335X Starter Kit Hardware RTC Functionality

Hi

I am using AM335x Starter kit to check the hardware RTC functionality.

I want to make sure that even after the CPU is powered down (By holding the power button more than 8 seconds), as long as the power source is connected to the board, RTC is running and keeping the time.

This is what I have done to confirm above behaviour,

Pre condition : Power jack is always connected to the board.

1. Power up the CPU using power button, This boots the Linux (This Linux is the standard Linux image by TI in the SD card)

2. Read hardware RTC time

          $ cat /sys/class/rtc/rtc0/time   (this gives the current rtc time ex: 00:0047 )

3. Then I power down the CPU by holding the power button 8sec.

4. wait for a known time, lets say 5min

5. Then power up the CPU again using the power button, booting linux again.

6. Read hardware RTC time agai

          $ cat /sys/class/rtc/rtc0/time

Here the time reading is some thing around 00:1:52

My understanding is, since I waited more than 5min after power down the CPU in 3rd step, reading should be something around 00:6:57 (roughly).

Because power source is connected to the board and hence hardware RTC should keep running. And after the second boot in step 5 above, the reading should be that accumulated time.

Does this mean the hardware RTC is not running after the CPU powered down?

Please correct me if my understanding is wrong and Help me to understand why hardware RTC not giving what I expect.

Thanks inadvance

Nilan

 

  • Hi,

    Try setting the RTC first:

    1. At kernel prompt set the system date and time:
    date MMDDhhmmYYYY
    2. Update the RTC:
    hwclock -w
    3. For verification you can read the RTC with:
    hwclock -r
  • Thanks Biser,

    The result is same,

    I set system date and updated the RTC.
    Then powered down the CPU (holding power button 8sec) time was around 8:30:00 when powered down
    Waited 10min
    Powered up the CPU and read the RTC and the time was around 8:33:00

    That means RTC was not ticking during power down period?
  • Hi,

    Could you try with halt command?

    I used the steps bellow:

    1. date 033110082016

    2. hwclock -w

    3. hwclock -> Thu Mar 31 10:08:18 2016  0.000000 seconds

    4. halt -> waited a while

    5. pressed the power button fro ~8 secs (shut down the console, minicom disconnected)->pressed the power button again fro ~8sec to boot the board

    7. hwclock -> Thu Mar 31 10:16:46 2016  0.000000 seconds

    As you can see, the RTC is working, when I use this sequence. 

    Best Regards, 
    Yordan

  • Thanks Yordan,

    I will check halt command in the morning.

    But did you wait reasonable time after powering down the board in step 5 before powering up the board again.

    My problem is there, I want to confirm that even after I powered it down by holding the power button 8sec, TRC should be working.

    As the power source is plugged to the board, And according to the data sheet and the schematic, TRC-Only mode should be working.

    That means as long as power source is connected to the board TRC should be ticking even after all the other peripherals are powered down.

     If I explain it in another words,

    I want to make sure that RTC-Only mode of the processor is working.

    After the board powered down by holding the power button for 8sec. And if the power source is connected to the board,

    TRC rail of the PMIC chip should be alive  to keep the RTC ticking.  

  • The Starter Kit does not have the required connections to do this. Switching off the PMIC is not the proper way to enter RTC-only mode. See sections 8.1.4.3.5 and 20.3.3.8 from the AM335X TRM Rev. M. RTC-only mode is normally entered by the pmic_pwr_enable signal to the PMIC being driven low. This signal is not connected on the Starter Kit.

    And for your assurance, RTC-only mode is fully functional on the AM335X processor.