cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F072 LSI Calibration

Ismet
Associate

Hello, I recently started with embedded programming and currently I'm tasked with LSI Calibration based on LSE clock, this would be useful when the device enters low power mode. Based on this reference manual:

https://www.st.com/content/ccc/resource/technical/document/reference_manual/c2/f8/8a/f2/18/e6/43/96/DM00031936.pdf/files/DM00031936.pdf/jcr:content/translations/en.DM00031936.pdf

I don't see any registers for LSI calibration like the ones HSICAL, HSI14CAL...

Does this mean the calibration for LSI is not achievable before using it as RTC Clock ?

Thanks.

2 REPLIES 2
Uwe Bonnes
Principal II

LSI has no calibration. Why do you need LSI calibrated if you have LSE?

Jack Peacock_2
Senior III

If you intend to use the LSI as the source clock for the RTC you can apply a coarse calibration when calculating the prescaler for RTCCLK. Adjust the synchronous divider to vary the number of LSI ticks per second (fewer to speed up RTCCLK, more to slow it down). It's not ideal but you can get a reasonable time of day sing the prescaler technique.

As to why calibrate LSI? The IWDG watchdog uses it, so if you like to touch the watchdog just in time you need a fairly stable source to handle tolerances between parts. And if you rely on LSI as the fallback if LSE fails then you need a calibrated RTCCLK source. ST recognized this , which is why the STM32L4 series does have hardware LSI calibration.

Jack Peacock