RTC Compensation in Kinetis MK22

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

RTC Compensation in Kinetis MK22

444 Views
vaibhavi_padwal
Contributor II

Hi,

I am using custom board using MK22FX512AVLQ12. I am using RTC of the controller with external crystal of 32.768KHz. As the crystal frequency will not be this exact value, I am performing RTC compensation to avoid lag in RTC. 

I have already referred to How to Use the Kinetis RTC Time Compensation Register (RTC_TCR)? and I am able to perform the compensation by measuring RTC clock_out of 32.768KHz with a resolution of 0.1Hz.

But I am not sure how the precision in measurement of frequency will affect my values of TCR and CIR. How accurately should I measure the frequency for calculating the values of TCR and CIR? What would be the effect on those value if I measure the frequency with resolution of 1Hz vs 0.1Hz vs 0.01Hz?

Also I would like to know how can I calculate values of TCR and CIR using 1Hz signal on CLOCK_OUT instead of 32.768KHz?

Thanks & Regards,

Vaibhavi

Labels (1)
0 Kudos
1 Reply

421 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Vaibhavi,

I haven’t seen the the TCR and CIR calculation using the 1Hz signal instead of 32.768KHz but the overall process would be similar as the one described in AN4949.

As for the precision of the measurement, an increased resolution would lead to a finer compensation up to the actual resolution of the TCR and CIR, so in theory there would be a point in which a finer compensation would not be possible, but these registers allow for a very fine compensation that suits most application.

Regards,
Gustavo

0 Kudos