2018-02-23 05:49 AM
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.2018-02-23 05:58 AM
Product isn't 37000 is it?
You should perhaps also quantify LSI via MCO pin
2018-02-23 07:08 AM
2018-02-23 07:09 AM
above image RTC Clock is 37khz
2018-02-23 11:30 AM
>>
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
Typical 38 KHz, with a range 26-56 KHz
2018-02-24 07:40 AM
I have stm32l0 rtc clock LSI with 37khz PREDIV_A=125 and PREDIV_S =296
125*296=37000
same problem
2018-02-24 07:50 AM
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.
2018-02-25 10:37 PM
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
2018-02-25 11:01 PM
hi,
frequency of our device is 4Mhz
2018-02-26 01:25 AM
hi,
how to solve this problem without external RTC