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.
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
Posted on May 17, 2011 at 12:16Using 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.
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.
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: ...over time Regards