cancel
Showing results for 
Search instead for 
Did you mean: 

rtc time faster ?

vitthal muddapur
Associate II
Posted on February 23, 2018 at 14:49

hi,

I have set internal clock frequency 1Hz but RTC time is faster than the real time

I have stm32l0 rtc clock LSI with 37khzPREDIV_A=125 andPREDIV_S =296

Note: this post was migrated and contained many threaded conversations, some content may be missing.
10 REPLIES 10
Posted on February 23, 2018 at 14:58

Product isn't 37000 is it?

You should perhaps also quantify LSI via MCO pin

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 23, 2018 at 15:08

0690X00000609XOQAY.png
Posted on February 23, 2018 at 15:09

above image RTC Clock is 37khz

Posted on February 23, 2018 at 19:30

>>

above image RTC Clock is 37khz

So, does that make the math work any better? 126*293 != 37000

a) You need to determine the frequency the LSI is actually clocking at

b) You need to review your options to trim that

c) You need to understand the gearing that divides that down

Perhaps review the Data Sheet

http://www.st.com/content/ccc/resource/technical/document/datasheet/b5/24/80/11/51/59/47/f7/DM00141136.pdf/files/DM00141136.pdf/jcr:content/translations/en.DM00141136.pdf

 

Typical 38 KHz, with a range 26-56 KHz

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 24, 2018 at 15:40

I have stm32l0 rtc clock LSI with 37khz PREDIV_A=125 and PREDIV_S =296

125*296=37000

 same problem

Posted on February 24, 2018 at 15:50

The formula is (

PREDIV_A + 1) * (PREDIV_S + 1), but have you MEASURED the frequency of your device?

If you want more accurate time use a crystal.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
T J
Lead
Posted on February 26, 2018 at 07:37

Let me suggest that you wouldn't depend on the accuracy of the processor RTC.

if you want to know the time of day accurately, I would suggest something like DS3232. with a temperature compensated embedded crystal.

http://datasheets.maximintegrated.com/en/ds/DS3232.pdf

 

also good for Storage of 256bytes of external R/W data

Posted on February 26, 2018 at 07:01

hi,

frequency of our device is 4Mhz

Posted on February 26, 2018 at 09:25

hi,

how to solve this problem without external RTC