Can we set the milliseconds when set the hardware clock? (K64 )

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Can we set the milliseconds when set the hardware clock? (K64 )

1,076件の閲覧回数
gaozida
Contributor II

The RTC Time Seconds Register only save the seconds, how to ensure the accuracy of the millisecond?

Thanks!

タグ(1)
0 件の賞賛
返信
2 返答(返信)

884件の閲覧回数
egoodii
Senior Contributor III

We need to differentiate 'accuracy' and 'precision'.  For precision:  If you stop the RTC, you can write the prescale-register (TPR) by multiplying your 'milliseconds' by 32768/1000.  With that simple extension your driver can easily read and write 'millisecond' precision.

As for accuracy, the default 32,768 divider CAN have the small adjustments mentioned (this would, however, negate the ability to convert TPR to ms with the simple 1000/32768 factor), and with that you could compensate the typical temperature-curve of watch-crystals, but ONLY if you are 'awake', at least periodically, to measure temperature and adjust the compensation appropriately.  Another way to get 12ppm accuracy (~1sec/day) is to use an external part that already does this real-time temperature-compensation: SiTime: SIT1552AC-JE-DCC-32.768D.  Takes a little more battery, but insures +/-10ppm 0-70C (extended temp versions available -40+85C, holds +/-13ppm).

0 件の賞賛
返信

884件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,

RTC has contain the compensation logic which provides an accurate and wide compensation range and can correct errors as high as 3906 ppm and as low as 0.12 ppm.

So I'd like to suggest you to learn the more information about the compensation operation from the K64' reference manual.
Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信