cancel
Showing results for 
Search instead for 
Did you mean: 

Problem calibrating MSI clock using LSE

VMoro.3
Associate

Hello, I've been trying to calibrate the system clock of a Nucleo-64 board (STM32l152) using approach proposed in AN3300 to compensate the temperature error.

The proposed solution works fine with HSI clock running at 32MHz. At room temperature the optimal trimming bits are set to the default value 16, and when the temperature changes and the clock starts to drift, the trimmming bits are updated to minize the error.

Unfortunately, similar approach doesn't work with MSI neither at 4194KHz nor 2097KHz. The optimal trimming bits at room temperature vary in range [0, 78], which makes the MSI clock drift even more than prior to the calibration. Is there a way to fix the problem?

Thank you in advance

2 REPLIES 2

What are the measured frequencies for various trim values?

JW

VMoro.3
Associate

I've measured the MSI frequency for the entire range of trimming bits. The results are not quite precise as the clock drifts. The table is attached