cancel
Showing results for 
Search instead for 
Did you mean: 

HSI16 frequency user trimming (STM32G0)

AYash.1
Associate II

The datasheet states two things about HSI16:

  • Accuracy in the full temperature range: -2/+1.5%
  • HSI16 frequency user trimming step: +0.3% - positive steps, -3.8% and -6% - three negative steps.

The questions are:

  1. With the mentioned calibration step values (if we would draw a plot with all mentioned trimming steps for all possible HSITRIM and HSICAL values), the HSI16 calibration frequency range would be ridiculous 60%+! Who needs such a range knowing that the maximum inaccuracy is 2%?
  2. What is the purpose of those three negative steps in the calibration curve? Wouldn't it be more convenient to have a linear curve?


_legacyfs_online_stmicro_images_0693W00000bk0ONQAY.png

1 ACCEPTED SOLUTION

Accepted Solutions
Danish1
Lead II

The negative steps are because the full range of adjustment is provided in (at least) two different ways. Perhaps by varying current in the charging/discharging current, and switching in extra capacitors. Or maybe a resistor of a different shape (so it might be affected to a different degree by variations in production such as overetch).

Because of this, the coarse adjustment steps aren’t an exact multiple of the fine adjustment steps.

To guarantee that there are no missing frequencies, ST chose to ensure overlap by those negative steps. By design the coarse steps are slightly less than 64 x the size of a fine step - to ensure that they never are larger than that.

View solution in original post

4 REPLIES 4
AScha.3
Chief III
  1. no. 62 * 0,3% = 18,6% . "+"
  2. what would you do, if your hsi is +1,5% and you only have +0,3% steps ???

you need some neg. offset ! so you take the 64 -> - 4% and add (+1,5 - 4 = -2,5 ) 2,5/0,3 = 8 steps.

64+8 should make it close to perfect. so write : 64 for -4% and then 8 , to add 8 x 0,3 steps.

every write to HSITRIM is added to the actual trim value.

from rm :


_legacyfs_online_stmicro_images_0693W00000bk0c0QAA.png 

(this is just, as I understand it ) 

If you feel a post has answered your question, please click "Accept as Solution".
Danish1
Lead II

The negative steps are because the full range of adjustment is provided in (at least) two different ways. Perhaps by varying current in the charging/discharging current, and switching in extra capacitors. Or maybe a resistor of a different shape (so it might be affected to a different degree by variations in production such as overetch).

Because of this, the coarse adjustment steps aren’t an exact multiple of the fine adjustment steps.

To guarantee that there are no missing frequencies, ST chose to ensure overlap by those negative steps. By design the coarse steps are slightly less than 64 x the size of a fine step - to ensure that they never are larger than that.

  1. There are 128 trim values available to an end user (7 bit), but the full device calibration range is 8 bit (256 values), taking into account the factory base HSICAL value. On a second thought I think that +/-30% calibration range is OK for HSI knowing its nature (a tiny RC-oscillator built-in into a package).
  2. The default HSITRIM value lays in the middle of the trimming range (default HSITRIM = 64). So decreasing it would decrease the output frequency, so no problem here.

Makes sense, thanks! So these steps nature is solely technological (some STM32 products have fully linear dependency, so it confused me in the first place).