Dear All,
I am new to the MPC world and facing a problem,.i want to get a precise time from the rtc,time accuracy is 1 ms,but the rtc is 1s , i refer to the kernel module ieee 1588 source code,from it can get 1ms,but i can‘t use it sepreate the module.can you support some examples that can tell how to use the rtc ?
Thanks & Regards
yang
Solved! Go to Solution.
The accuracy of the RTC depends on its clock source. The RTC block is just timer which counts clock cycles from the clock source.
The IEEE 1588 protocol is used to synchronize the clocks of two systems, hardware provide time stamping but software compare time stamps, you could refer to http://cache.freescale.com/files/32bit/doc/app_note/AN3423.pdf .
For your purpose, probably you could refer to arch/powerpc/kernel/time.c, regarding generating precise time in Linux Kernel. If you only want to generate 1ms count, you also could use Timer.
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
The accuracy of the RTC depends on its clock source. The RTC block is just timer which counts clock cycles from the clock source.
The IEEE 1588 protocol is used to synchronize the clocks of two systems, hardware provide time stamping but software compare time stamps, you could refer to http://cache.freescale.com/files/32bit/doc/app_note/AN3423.pdf .
For your purpose, probably you could refer to arch/powerpc/kernel/time.c, regarding generating precise time in Linux Kernel. If you only want to generate 1ms count, you also could use Timer.
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------