HSI Factory Calibration Value
Posted: Wed Jul 28, 2021 3:10 am
I normally upload codes via SWD but until recently when I attempted DFU uploading on STM32F4, I noticed the process was not reliable. I have 3 boards but not all of them could be recognized as ST bootloader. Even for the same board which was ok, the success rate was not 100%.
A quick search tells me the problem is due to the limitation of the HSI accuracy in deriving the HSE. ST application notes also recommend to use a lower HSE say 4 to 8MHz for better reliability. However most Blackpills come with 25MHz HSE which is embarrassing for those who prefer DFU uploading. Moreover the factory calibrated HSI is temperature dependent and will also drift after soldering.
The user is able to trim the HSI by adding an offset to the factory calibrated value but this is only possible after your code is loaded and running.
My question is: are we able to alter the factory calibrated value so that it achieves the expected accuracy upon reset?
A quick search tells me the problem is due to the limitation of the HSI accuracy in deriving the HSE. ST application notes also recommend to use a lower HSE say 4 to 8MHz for better reliability. However most Blackpills come with 25MHz HSE which is embarrassing for those who prefer DFU uploading. Moreover the factory calibrated HSI is temperature dependent and will also drift after soldering.
The user is able to trim the HSI by adding an offset to the factory calibrated value but this is only possible after your code is loaded and running.
My question is: are we able to alter the factory calibrated value so that it achieves the expected accuracy upon reset?