Skip to main content
Associate
September 2, 2026
Solved

STM32G431: HSI16 — are fHSI16 (@30 °C) and Δtemp(HSI16) additive? (DS12589 Rev 2, Table 44)

  • September 2, 2026
  • 8 replies
  • 138 views

Hi,

I am using STM32G431CBU6 with HSI16 as the only clock source (no external crystal on the board), and I need to budget the resulting frequency error. I have a few questions about DS12589 Rev 2 (October 2019), Table 44 "HSI16 oscillator characteristics", page 107, and Figure 23 on the same page.

Q1 (main question) — Are fHSI16 and Δtemp(HSI16) additive, or is Δtemp inclusive?

Table 44 lists two separate parameters:

Symbol Conditions Min Max
fHSI16 VDD = 3.0 V, TA = 30 °C 15.88 MHz 16.08 MHz
Δtemp(HSI16) TA = 0 to 85 °C −1 % +1 %

For a single device over the 0 to 85 °C range, is the worst-case total frequency error:

  • (a) −7500 ppm − 10000 ppm = −17500 ppm … +5000 ppm + 10000 ppm = +15000 ppm (i.e. the two parameters add), or
  • (b) ±10000 ppm (i.e. Δtemp already includes the initial tolerance at 30 °C)?

This makes a large practical difference for bit-timing budgets, so I would like to be sure.

Q2 — Is a typical temperature coefficient (ppm/°C) available?

Figure 23 shows mean/min/max curves, but Table 44 contains no ppm/°C entry. Is a typical temperature coefficient available for the 25–50 °C region, or numerical data behind Figure 23?

For reference, I measured +26.3 ppm/°C on one device (43 samples over 7.35 h, die temperature range 4.5 °C, regression not statistically significant, r² = 0.03), so I cannot tell from my own data whether that is representative.

Q3 — Factory calibration conditions and part-to-part spread

Table 44 gives fHSI16 at VDD = 3.0 V, TA = 30 °C.

  1. Is the factory trim performed at 30 °C?
  2. Is the factory HSITRIM reset value per-die, or a fixed constant?
  3. Note (1) says "Guaranteed by characterization results" — does that mean fHSI16 is not tested per part in production?

I measured four devices at the default (reset) HSITRIM, at room temperature (22 °C), each the mean of 5 × 30 s windows: +2616, +832, −256, +1606 ppm (span ≈ 2870 ppm). All are inside the −7500/+5000 ppm window, but I would like to know whether that spread is expected.

Q4 — Is the HSITRIM step size temperature-independent?

Table 44 gives TRIM (HSI16 user trimming step) as 0.2 / 0.3 / 0.4 % when the trimming code is not a multiple of 64, and −4 / −6 / −8 % when the code is a multiple of 64.

  1. Is the step size constant over −40 to 125 °C? (i.e. does a trim performed at room temperature stay valid over the full range?)
  2. I measured the step from HSITRIM = 64 to 63 as −3093 ppm (≈ −0.31 %), which matches the "not a multiple of 64" row — but 64 is a multiple of 64, where the table says −4 to −8 %. Could you clarify how these two rows should be read?

Q5 (minor) — Does Figure 23 include VDD variation?

ΔVDD(HSI16) is listed separately as −0.1 / +0.05 %. Are the Figure 23 min/max envelopes taken at a fixed VDD = 3.0 V, or do they already include VDD variation?

Measurement method used above, in case it matters: the MCU's microsecond timestamp counter is derived from the same PLL branch as the peripheral I am timing; I compare "microseconds counted by the device" against "wall-clock seconds elapsed on the host" across a 30 s window. Single-point uncertainty is ±16 ppm (round-trip jitter / window length). Repeat-to-repeat scatter of the same device at 30 s intervals is ≈51 ppm, growing to ≈184 ppm at 10 min intervals, so the device's own short-term wander dominates over the measurement uncertainty.

Thanks!

Best answer by KDJEM.1

Hello ​@kobayashi ;

 

A1. No, Δtemp(HSI16) does not include the initial frequency tolerance. The initial accuracy and the temperature drift should be considered as separate contributors to the total frequency error.

A2. Sorry, no numerical ppm/°C specification is provided for the HSI16 oscillator.

A3. The HSI16 trimming is performed on each device during production testing at 30 °C.

     The observed span of approximately 2870 ppm is not unexpected and remains well within the datasheet limits of −7500 ppm to +5000 ppm.

    Guaranteed by characterization results only.

A4. No temperature-independent trim coefficient is guaranteed. Therefore, a trim performed at room temperature is not guaranteed to provide the exact same frequency correction over the full operating temperature range.

A5. No, Figure 23 does not include the effect of VDD variation. Voltage dependency is covered separately by the ΔVDD(HSI16) specification in the datasheet.

 

I hope this answer your request.

Thank you.

Kaouthar

8 replies

KDJEM.1
ST Technical Moderator
September 2, 2026

Hello ​@kobayashi and welcome to the community;

 

Thank you for sharing these questions, I will check internally and I will come back to you for more details as soon as possible.

Also, I noted that you used very old datasheet version “DS12589 Rev 2”, I recommend you to check the last datasheet version which is “DS12589 Rev 6”.

 

Internal ticket number CDM0065502 (This is an internal tracking number and is not accessible or usable by customers).

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
KDJEM.1
KDJEM.1Best answer
ST Technical Moderator
September 3, 2026

Hello ​@kobayashi ;

 

A1. No, Δtemp(HSI16) does not include the initial frequency tolerance. The initial accuracy and the temperature drift should be considered as separate contributors to the total frequency error.

A2. Sorry, no numerical ppm/°C specification is provided for the HSI16 oscillator.

A3. The HSI16 trimming is performed on each device during production testing at 30 °C.

     The observed span of approximately 2870 ppm is not unexpected and remains well within the datasheet limits of −7500 ppm to +5000 ppm.

    Guaranteed by characterization results only.

A4. No temperature-independent trim coefficient is guaranteed. Therefore, a trim performed at room temperature is not guaranteed to provide the exact same frequency correction over the full operating temperature range.

A5. No, Figure 23 does not include the effect of VDD variation. Voltage dependency is covered separately by the ΔVDD(HSI16) specification in the datasheet.

 

I hope this answer your request.

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
KDJEM.1
ST Technical Moderator
September 7, 2026

Hello ​@kobayashi ;

 

Is my reply answer your request?

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
kobayashiAuthor
Associate
September 14, 2026

Hi Kaouthar,

Thank you very much — this answers my questions clearly. To summarize what I have taken from your reply, so you can correct me if I misread anything:

- The total frequency error over the operating range is the sum of the three separate contributors: fHSI16 (initial accuracy at 30 °C), Δtemp(HSI16), and ΔVDD(HSI16).
- The factory trim is performed per device at 30 °C, guaranteed by characterization only, and no temperature-independent trim coefficient is guaranteed, so a user trim done at room temperature is not guaranteed to hold over the full temperature range.

One item from my Q4 is still open, and I would appreciate a short clarification:

Q4.2 — the two rows of the TRIM parameter (HSI16 user trimming step).
The table gives 0.2 / 0.3 / 0.4 % when the trimming code is not a multiple of 64, and −4 / −6 / −8 % when the code is a multiple of 64. I measured the step from HSITRIM = 64 (reset value) to HSITRIM = 63 as −3093 ppm (≈ −0.31 %), which matches the first row — but 64 itself is a multiple of 64, where the table lists −4 to −8 %.

How should these two rows be read? For example, does the second row describe the frequency change when the code crosses a multiple-of-64 boundary in a specific direction (e.g. 63 → 64), rather than the step size at a code that is a multiple of 64?

Thanks again for your help.

Best regards,
Kobayashi

KDJEM.1
ST Technical Moderator
September 14, 2026

Hello ​@kobayashi ;

 

For Q4.2 question, the key is that the HSITRIM transfer function is not continuous across the 64-code segment boundaries. The "user trimming step" entry is describing the frequency change produced by a +1 increment of the trim code, but there are two different cases:

  1. Inside a segment (trim code not a multiple of 64):

    • One LSB changes frequency by about ±0.3% typ.
    • Datasheet gives 0.2 / 0.3 / 0.4 %.
  2. At a segment boundary (trim code is a multiple of 64):

    • There is a large discontinuity.
    • A +1 code step produces a jump of about −6% typ.
    • Datasheet gives −4 / −6 / −8 %.

 

Applying it to your measurement

You measured:

  • HSITRIM = 64 → HSITRIM = 63
  • Δf ≈ −3093 ppm ≈ −0.309%

That matches the 0.3% typical fine step perfectly.

The reason is that although 64 is itself a multiple of 64, the transition 64 → 63 is not the discontinuity that the second row is referring to. You are moving within the same local slope and observe a normal trim step.

The large negative step is expected when incrementing through the boundary, for example:

  • 63 → 64

or, more generally,

  • 127 → 128
  • 191 → 192
  • etc.

At those points the internal coarse/fine decomposition changes and a large frequency drop occurs.

Why the wording is confusing

The table says:

"Trimming code is a multiple of 64"

but it does not explicitly state:

"...for the step that lands on (or crosses into) a code that is a multiple of 64."

If interpreted literally as "the step size at code 64", it appears to contradict measurements like yours.

A more useful way to read the table is:

Transition type Typical Δf
Normal adjacent codes +0.3% per code
Boundary crossing at n×64 −6% jump

Your measured 64 → 63 = −0.31% is exactly what would be expected for a normal trim step and is strong evidence that the second row is describing the boundary-crossing discontinuity, not the local derivative around every code that happens to be a multiple of 64.

One way to verify this experimentally would be to measure:

  • 62 → 63
  • 63 → 64
  • 64 → 65

If the interpretation is correct, you should see approximately:

  • +0.3%
  • −6%
  • +0.3%

I hope this answer your request!

 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
KDJEM.1
ST Technical Moderator
September 21, 2026

Hello ​@kobayashi ,

 

Is my last reply answer your request?

 

Thanks you.

Kaouthar

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.
waclawek.jan
Super User
September 21, 2026

The step in frequency occurs not when RCC_ICSCR.HSITRIM is multiple of 64, but when RCC_ICSCR.HSICAL (which is (initial/system-memory-stored-HSICAL + HSITRIM) mod 256) is multiple of 64.

JW

waclawek.jan
Super User
September 21, 2026

The following graph is from my own characterization of one particular STM32L053 (from a ‘L053 Disco), the oscillator is different, the technology is different, but the principle is similar. Note the changing slope and also the changing step at different (CAL+TRIM) values:

JW