Re:Debugging Hardware Is Hard
by readmodifywrite on Monday July 01, 2024 @12:49PM
(#40847621)
The lack of status bits on the auto-cal is really unfortunate.
Turning it off during a UART transaction definitely "fixes" it.
I'm somewhat tempted to do the manual calibration the HSI instead.
Yeah a PLL without a status flag to indicate it is locked isn't good. I think there are also issues with stabilisation when using it with stop modes https://community.st.com/t5/stm32-mcus-products/msi-pll-mode...
If you really need the accuracy then regularly time the LSE clock using a timer clocked from MSI and apply the best trim values as described in this app note file:///home/tom/Downloads/an4736-how-to-calibrate-stm32l4-series-microcontrollers-internal-rc-oscillator-stmicroelectronics-1.pdf
It's also possible that the design hasn't been thoroughly tested and the PLL doesn't lock in certain conditions which could leave you with an unstable clock.