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.

RTC s3539 - hwclock

Other Parts Discussed in Thread: AM3517

Hello,

I get trouble with using hwclock on the AM3517 evalboard. The tool wait on a RTC tick for about ~5 sec before going in time out. Problem is that the driver set the update rate to 1/minute.

I'm using the last TI BSP kernel. Is there any patch or informations ?

Had anyone success with hwclock ?

regards

david

 

  • Hi David,

    If I understand correctly, on S35390 RTC, I do not think 1 sec interrupt is possible. The only possible options we have is,

     - interrupt for every minute

     - Alarm interrupt also accepts minimum granularity of minute.

     

    Thanks,

    Vaibhav

  • Hi Vaibhav,

    Right, 1 sec is not possible. Actually the interrupt is set to 1 min for update and to user-frequency else. But seems thats the user-frequency is0 per default.

    So, how do I set the system time from RTC ? Using "hwclock -- hctosys is the standard way on debian.  Have I to write own code ?

    Thanks

    David

  • To be honest with you, I have not tried these application you are referring to and also I do not know how its being implemented. But if it is standard Linux application, I believe it should work without any issues.

    FYI, I have validated RTC functionality with "Documents/rtc.txt" and it does work perfectly fine without any issues.

     

    Thanks,

    Vaibhav

  • I have this problem too. My first testing steps were made with Buildroot and busybox. in this case hwclock doesn't make clock sync before reading RTC, so hwclock is working without problems. But standard util-linux make this sync.

    The simplest way is to get rid of the interrupt in the board file. Just don't define it in RTC related structure.  In this case hwclock knows you have no interrupt and just simulates the update routine. This means you won't have RTC as wakeup event source.