HSI Factory Calibration Value

Post here first, or if you can't find a relevant section!
Post Reply
hobbya
Posts: 49
Joined: Thu Dec 19, 2019 3:27 pm
Answers: 1

HSI Factory Calibration Value

Post by hobbya »

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?
hobbya
Posts: 49
Joined: Thu Dec 19, 2019 3:27 pm
Answers: 1

Re: HSI Factory Calibration Value

Post by hobbya »

I used MCO to capture the HSI of my blackpill's and to my surprise:
HSI = 15.95MHz => DFU bootloader not recognized
HSI = 15.88MHz => DFU bootloader recognized

I am not going to mess with DFU bootloader further. I will always live with SWD uploading.
dannyf
Posts: 446
Joined: Sat Jul 04, 2020 7:46 pm

Re: HSI Factory Calibration Value

Post by dannyf »

That level of sensitivity seemed extreme.

If you want you can play with the calibration register until mco has the right frequency. But then hsi is temperature sensitive.

I have used hsi for iart (to 19.2k) without much problem.
Post Reply

Return to “General discussion”