PCF85363A time register

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

PCF85363A time register

977 Views
thomasarvidsson
Contributor I

Hi! We have a problem when reading the time registers. We are reading all registers continuously approx 6 times per 100th second. We are checking the 100th second values and approx once per minute or so we get wrong values. Some examples: 100th seconds go from:

57,58,79,80... or 50,51,53,54... or 20,21,23,24... or 62,63,67,68.... i.e. some values are skipped.

We also see some cases with the following series: 36,37,3F,30,31... 16,17,1F,10,11..... When we see the series with 0xF involved it has always been from x7->xF and then start over from x0. This does not seem to be the correction described in the datasheet. Is this behavior something known? We see the same thing on different components so it is not an individual problem.

Best regards,Thomas Arvidsson

Tags (1)
0 Kudos
4 Replies

729 Views
thomasarvidsson
Contributor I

We bought the evaluation board OM13514 and wrote a simple C-program running on a Raspberry PI with the bcm2835 I2C. The program reads all registers in the circuit continuously (at 400 kHz) and checks the 100th seconds. We see the same result here. Here are some read values (100th seconds) with a line break when there is an error. The time then continuous from the new time, so it is not single errors.

Error 1:

45 45 45 45 45 45 45 45 45 45 46 46 46 46 46 46 46 47 47 47 47 47 47 47 47 47 47
4f 4f 4f 4f 4f 4f 40 40 40 40 40 40 40 40 40 40 41 41 41 41 41 41 41 41 41 41 42 42 42 42 42 42 42

Error 2:

40 40 40 40 40 40 40 41 41 41 41 41 41 41 41 41 41 42 42 42 42 42 42 42 43 43 43 43 43 43 43 43 43 43
47 47 47 47 47 48 48 48 48 48 48 48 48 48 48 48 48 48 48 49 49 49 49 49 49 49 50 50 50 50 50 50

Regards,

Thomas

0 Kudos

729 Views
thomasarvidsson
Contributor I

Hello David, thank you for your answer.

We thought we had an acceptable solution for the problem, but now we have seen that the time can jump up to 3 seconds and that is not acceptable. We are using the circuit PCF85363A http://www.nxp.com/docs/en/data-sheet/PCF85363A.pdf so slightly different from the one you referred to. But we are reading the time as stated in 8.2.6. We are using an FPGA with a i2c implementation that has been well tested, and we can also see that the i2c accesses towards the RTC circuit is done correctly. The i2c bus transfer is performed at 397 kHz. We are reading the circuit continuously, i.e. we read all registers from 00h to 2Fh in one consecutive read, and then we wait for a short time (2,5 us) before we start a new read of all registers. So we do approximately 8 read cycles per 100th second. Every few minutes we see that the time jumps forward or backwards. We cannot see anywhere in the data sheet that we do anything wrong, but could it be a problem that we read the circuit so often? That is the only thing i can think of. The i2c access looks perfectly good and we do the reading according to the data sheet.

Best regards,

Thomas

0 Kudos

729 Views
david_diaz
NXP Employee
NXP Employee

Hello Thomas,

My apologies for the delayed response.

In this case, The RTC circuit just requires one external part: a tuning fork quartz as resonator. The oscillation capacitors are integrated and therefore there is no need for external capacitors. The quartz crystal must be placed close to the RTC circuit, avoiding long lines which may pick up noise. Avoid any tracks with high frequency signals (fast edges) close to the RTC, quartz, or quartz interconnect.

Do you have such resonator? Can you please send me a waveform of the CLK pin?

Regards,

David

0 Kudos

729 Views
david_diaz
NXP Employee
NXP Employee

Hello Thomas,

Thank you for writing.

Please review the chapter 8.5 at the PCF8563 datasheet. The chapter mentioned shows the recommended method for reading the time. So, I recommend to use it as a reference for your design. Are you reading the time correctly?

Also, check whether the I2C bus transfer is performed at highest possible (400kHz) speed. Using highest transfer speed is prefered to avoid non-monolitic counter increment.

Please keep me updated about your project.

 

I hope this information helps.

Regards,

David

0 Kudos