Despite the fact STM32CubeMX gives 37kHz for the LSI, the real frequency is in the range of 26...56kHz, typically 38kHz, i.e. -31...+47%. Please check the datasheet of the STM32L051, section 6.3.7, currently page 71: LSI oscillator characteristics.
This clock source is based on an RC oscillator and is completely independent of the other clock sources to provide additional security when used in conjunction with the IWDG (Independent Watchdog).
Please use one of the other clock sources if you need an accurate clock, e.g. the LSE with an external crystal of 32.768kHz.
When your question is answered, please close this topic by choosing Select as Best.
/Peter
In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.