PCF85263A runs fast

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

PCF85263A runs fast

1,038 Views
chauhan_pandura
Contributor II

In one of our products, we have used PCF85263A RTC IC. With the default kernel driver and hardware design, it is observed that in 11 hours, RTC time was ahead by 20 seconds! So, we tried to adjust the time by writing into the offset register. But after trying 6 values, we are not able to have the RTC time correct with the current time.

In the kernel driver, I have set the fast mode for offset (OFFM=1) and tried these values: 4, -4, -9, -15, -21 and, -18. When I checked for load capacitance of oscillator, I found that in hardware design, no capacitor is connected. The oscillator datasheet shows that the Load Capacitance is 6pF.

Kindly guide me for the correct values to write into offset register (0x24) and Oscillator register (0x25).

Thanks and Regards.

Tags (1)
0 Kudos
4 Replies

997 Views
chauhan_pandura
Contributor II

Hi Jozef,

1. Can we know the relation of Load capacitance with RTC running behavior? I mean if the value of load capacitance is not matching with what should be required, what will be the effect on RTC run? If the load capacitance has higher value than required, will RTC run faster or slower?

2. For the Offset register, if the RTC runs faster, we should write a positive value, correct? Because

" A positive value written to the Offset Register will cause the RTC device to run slower and a negative value written to the Offset Register will cause the RTC device to run faster.

Kindly confirm.

Regards,
Pandurang

0 Kudos

1,024 Views
chauhan_pandura
Contributor II

Hello Jozef,

Thanks for your quick reply.

1. Load capacitance:

Yes. the kernel driver is not updating this and the default value is for 7pF. Ok. will update this for 6pF. Actually, I was confused because there is no external capacitor with an Oscillator in the design.

2. Offset calculation.

One pulse time observed is 30.60 uS. So, the calculation should be as below:

Dmeas = ((1/32768)*1000000 - 30.60 uS = −0.082421875 uS

Eppm = 10^6 * −0.082421875/30.60 = −2693.525326797.

Now, as we know this value is out of range for Offset register, so we cannot use this value, right?

The datasheet of the oscillator indicates that the ppm value is +/-20ppm.

According to this, the calculation results in 9.830425166.

the offset register should have 9 or 10 value in fast mode (OFFM = 1). Kindly confirm.

Regards,

Pandurang.

 

0 Kudos

932 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hello Pandurang,

 

1. Can we know the relation of Load capacitance with RTC running behavior? I mean if the value of load capacitance is not matching with what should be required, what will be the effect on RTC run? If the load capacitance has higher value than required, will RTC run faster or slower?

[A] If the load capacitance value is higher, than required the RTC should run slower, because it takes longer time to charge and discharge the capacitor, resulting in lower oscillator frequency. But in your case the crystal requires 6pF and you had the load capacitance set to default 7pF, which should result in negative deviation, but your deviation is positive. Could you please provide the crystal datasheet?

2. For the Offset register, if the RTC runs faster, we should write a positive value, correct?

[A] Yes, that is correct. 

3. Offset calculation.

One pulse time observed is 30.60 uS. So, the calculation should be as below:

Dmeas = ((1/32768)*1000000 - 30.60 uS = −0.082421875 uS

Eppm = 10^6 * −0.082421875/30.60 = −2693.525326797.

Now, as we know this value is out of range for Offset register, so we cannot use this value, right?

[A] I have checked your calculation and they are correct. The deviation is too large and cannot be corrected with the Offset register. Have you set the load capacitance to the 6pF as required per crystal? How did you measure the CLKOUT frequency?

The datasheet of the oscillator indicates that the ppm value is +/-20ppm.

According to this, the calculation results in 9.830425166.

the offset register should have 9 or 10 value in fast mode (OFFM = 1). Kindly confirm.

[A] You can test it, but I don't think it will correct the large deviation. A crystal with +/- 100ppm or better is recommended. Yours crystal has +/-20ppm, which is excellent. So there shouldn't be such large deviation. Could you please test another crystal? Another piece in case this one is faulty or from an other manufacturer.

With Best Regards,

Jozef

0 Kudos

1,031 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Dear Pandurang Chauhan,

The oscillator datasheet shows that the Load Capacitance is 6pF.

[A] Please set the Load Capacitance CL[1:0] bits in the oscillator control register (address 25h) to 01, to 6pF. By default 7pF load capacitance is set.

JozefKozon_0-1620974940450.png

Kindly guide me for the correct values to write into offset register (0x24) and Oscillator register (0x25).

[A] Please make sure you have the COF[2:0] bits in Function register address 28h to the default value. The output frequency on the CLK pin will be set to 32768 Hz.  

JozefKozon_1-1620975320678.pngJozefKozon_2-1620975370834.png

After that please follow the Offset calibration workflow, section 7.8.3 pages 32 and 33 in the datasheet. 

Measure the frequency on the CLK pin, convert to time, calculate the difference, calculate the ppm deviation and calculate the offset register value.

JozefKozon_4-1620975679441.png

 

With Best Regards,

Jozef

0 Kudos