goshdarnharris / 3u-module

3u microcontroller module. Intended for use with keyboards.
Other
3 stars 0 forks source link

HSI Oscillator runs ~13% slower than rated with factory trim #1

Open goshdarnharris opened 5 years ago

goshdarnharris commented 5 years ago

Calibrating the HSI with the factory-programmed values (setting HSICalibrationValue to 16 while initializing RCC) results in a clock rate of approx. 14 MHz rather than the rated 16 MHz.

This error is well outside of the rated bounds of +/- ~1.5%.

Setting HSICalibrationValue to 64 brings the clock into line. I've seen this on two boards and the STM32G431 NUCLEO-64 from ST.

goshdarnharris commented 5 years ago

Marking this as errata until I have reason to think it's a design error on my part.

For future boards, keep an eye on this in case it's a lot issue.