MPC8309 get precise time from rtc

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC8309 get precise time from rtc

Jump to solution
1,481 Views
威杨
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

Labels (1)
0 Kudos
Reply
1 Solution
1,192 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
1 Reply
1,193 Views
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 Kudos
Reply