MPC8309 get precise time from rtc

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MPC8309 get precise time from rtc

跳至解决方案
2,034 次查看
威杨
Contributor III

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

标签 (1)
0 项奖励
回复
1 解答
1,745 次查看
yipingwang
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,746 次查看
yipingwang
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复