cancel
Showing results for 
Search instead for 
Did you mean: 

use the internal LSE OSC 32Khz

franco2
Associate II
Posted on July 07, 2009 at 10:49

use the internal LSE OSC 32Khz

#lsi-rtc
6 REPLIES 6
franco2
Associate II
Posted on May 17, 2011 at 12:16

Hi at ALL

This is the my first project with STM32 and I have any question

1) is possible use the internal LSI oscillator for counter RTC? if yes what is the precision for HH;MM:SS?

Franco

16-32micros
Associate III
Posted on May 17, 2011 at 12:16

Dear Franco,

The internal RC of the LSI varies from 30kHz to 60Khz with a typical value

of about 40KHz.

You can refer as well to application Note AN2604 ''STM32F101xx and STM32F103xx RTC calibration'' for more details on RTC calibration methods.

Regards,

STOne-32.

domen2
Associate III
Posted on May 17, 2011 at 12:16

In case someone hits this old thread:

True, calibration register can delay clock for up to 120ppm, with 1ppm step, but don't forget there's also RTC_SetPrescaler, and with that you effectively have 30ppm steps in either direction.

john
Associate II
Posted on May 17, 2011 at 12:16

Using the RTC calibration register (BKP_RTCCR), you can at most skew

the clock to skip 127 cycles out of 2^20 (1048576),

which is 0.00012111663818359375 or 0.012111663818359375 %

thats not enough to be able to compensate for the range of 30 to 60 KHz

from a typical value of about 40 KHz.

I happen to be using the RTC to generate an 'event', so that I can wake

the CPU every 1ms - without the use of an external clock.

This means that my RTC prescaler is in the range of 40, which means a

single unit change produces a percentage change of 2.5 %.

So all in all, I can not see how to calibrate my system to something

like a 0.1 % accuracy.

It may not be possible by using the LSI - but does anyone have any ideas

as to how I might be able to do this ?

=> no external clock/crystal, using STOP/WFE to run in a low-power mode,

wake every 1ms, timing accuracy (over a long period) of 1% or better.

Thanks,

John.

ter
Associate II
Posted on March 01, 2013 at 13:38

Hi

If someone is interested, i made measures regarding this issue. Even after calibration, the LSI's frequency changes with temperature, therefore not accurate for most RTC applications

Measurement frequency shift over Temperature:0690X00000604yKQAQ.png

...over time

0690X000006053EQAQ.png

Regards

Posted on March 01, 2013 at 15:46

therefore not accurate for most RTC applications

Not least the fact that LSI can't maintain the RTC at all on battery.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..