STM32F1 - calibrating LSI
Posted: Sun Oct 16, 2022 3:45 pm
I was quite impressed with W801's feature to automatically calibrate its 32,768Hz RC oscillator - see here: https://dannyelectronics.wordpress.com/ ... libration/
This reminds me of the LSI on STM32F1 chips: a nominal frequency of 40Khz but a range of 30Khz - 60Khz. Thanks, ST
Here is my attempt at calibrating it: https://dannyelectronics.wordpress.com/ ... g-the-lsi/
in the end, I measured the LSI to be around 37Khz and brought down the error rate to < 100ppm.
the basic code isn't directly portable to STM32duino but the basic concept is. Hope it helps.
This reminds me of the LSI on STM32F1 chips: a nominal frequency of 40Khz but a range of 30Khz - 60Khz. Thanks, ST

Here is my attempt at calibrating it: https://dannyelectronics.wordpress.com/ ... g-the-lsi/
in the end, I measured the LSI to be around 37Khz and brought down the error rate to < 100ppm.
the basic code isn't directly portable to STM32duino but the basic concept is. Hope it helps.