cancel
Showing results for 
Search instead for 
Did you mean: 

RTC accuracy

llebotlan
Associate II
Posted on December 02, 2005 at 05:40

RTC accuracy

1 REPLY 1
llebotlan
Associate II
Posted on December 02, 2005 at 05:40

Hi,

We have got a accuracy problem with the RTC with our hardware.

We use the RTC to generate the ticks OS with the second interrupt that way :

/* RTC */

RTC_SetSecond(0);

RTC_PrescalerConfig ( 0x8000>>8 ); // environ 4 millisecondes

clock_startup = number of second from 1/1/1970

So the RTC counter count 1/256 seconds from the clock set.

to know what time is it, I do :

time = clock_startup+ (RTC_CounterValue() >> 8 );

If noticed that my clock lost 10 minutes a day.

Where is my mistake ?

Ludo