cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U073CC - VREFINT calibration data (missing value / wrong documentation)

SZano
Associate III

As explained in the reference manual RM0503 rev2, §14.10, the MCU has an internal bandgap voltage reference, which can be measured by the ADC peripheral. This reading can be compared to the one performed by ST in the factory (and stored in flash), so that we can infer the ADC voltage reference (VREF+).
The datasheet DS14548 rev2 says that VREFINT is (1.182V, 1.212V, 1.232V) (min, typ, max), in Table 25.
The DS also says (Table 6) that the VREFINT calibration value is found in flash @ 0x1FFF6EA4-0x1FFF6EA5, and that it is measured at 30°C+-5°C, with VDDA=VREF+=3.0V+-10mV
Also, the ADC has a resolution of at most 12-bit (I assume the measurement is 12 bits, not less, which is true for other MCU families, at least).

So, I would expect the value stored in flash to be around ([1.182V, 1.212V, 1.232V] / 3.0 * 4096) = [1613, 1655, 1682] = [0x064D, 0x0677, 0x0692]
(only occupying the lower 12 bits of the 16 bits available at the specified address).

The HAL library agrees with the datasheet: stm32u0xx_ll_adc.h defines these symbols:
#define VREFINT_CAL_ADDR ((uint16_t*) (0x1FFF6EA4UL))
#define VREFINT_CAL_VREF ( 3000UL)

However, at that address, I find 0xFFFF, as if the calibration value was never stored.
What's going on? Is it possible for it to be missing, maybe in some early revision of the MCU?

================

The following is the flash content of my MCU, around the address of interest (byte-by-byte, not reinterpreted as 32-bit words):

0x1FFF6E00 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6E10 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6E20 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6E30 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6E40 FFFFFFFF FFFFFFFF F0141C07 F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ÿÿÿÿÿÿÿÿÿ

I can see that the temperature calibration values are there (@ 0x1FFF6E68 and @ 0x1FFF6E8A: 0x0405 and 0x055D).
I have 0xFFFF in 0x1FFF6EA4, and also a 0x0100 in 0x1FFF6EA0 (as well as other numbers) which I don't know how to interpret (maybe the VREFINT calibration is stored somewhere else in this vicinity?)

Also, I see a value 0x06F3 (which is plausible as the VREFINT calibration, though a bit high) at address 0x1FFF6E82.

However, on another chip, that value is identical (so maybe it's not the calibration value, after all). Its memory is the following:

0x1FFF6E00 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6E10 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6E20 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6E30 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6E40 FFFFFFFF FFFFFFFF F0141C07 FFFFFFFF ÿÿÿÿÿÿÿÿð...ÿÿÿÿ
0x1FFF6E50 3A000600 12503639 4E373720 FFFFFFFF :....P69N77 ÿÿÿÿ
0x1FFF6E60 FFFFFFFF FFFFFFFF 1204FFFF FFFFFFFF ÿÿÿÿÿÿÿÿ..ÿÿÿÿÿÿ
0x1FFF6E70 FFFFFFFF FFFFFFFF FFFFFFFF FFFFF20D ÿÿÿÿÿÿÿÿÿÿÿÿÿÿò.
0x1FFF6E80 FC78F306 FFFFFFFF FFFF6505 FFFFFFFF üxó.ÿÿÿÿÿÿe.ÿÿÿÿ
0x1FFF6E90 FFFFFFFF FFFF28D7 F3D85207 FFFFFFFF ÿÿÿÿÿÿ(×óØR.ÿÿÿÿ
0x1FFF6EA0 0001FFFF FFFFFFFF FFFFFFFF FFFFFFFF ..ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6EB0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6EC0 FFFFFFFF FFFFFFFF FFFFFFFF FFFF5EA1 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿ^¡
0x1FFF6ED0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6EE0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6EF0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6F00 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6F10 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6F20 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6F30 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6F40 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6F50 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6F60 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6F70 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6F80 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6F90 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6FA0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6FB0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6FC0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6FD0 FFFFFFFF FFFFFFFF FFFFFFFF 37330000 ÿÿÿÿÿÿÿÿÿÿÿÿ73..
0x1FFF6FE0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
0x1FFF6FF0 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ

Related to this: the RM in Figure 2 says that addresses 0x1FFF6C00-0x1FFF6FFF contain "engineering bytes", but only a handful of them are described in the datasheet, such as the VREFINT calibration and temperature calibration. The same address range is referenced in Table 2.
What do the other bytes contain?

1 ACCEPTED SOLUTION

Accepted Solutions
KDJEM.1
ST Employee

Hello @SZano ,

 

Could you please take a look at this errata sheet and precisely 2.1.2 Internal voltage reference calibration value not programmed during production errata   

KDJEM1_0-1725550384565.png

 

Could you please share a photo of the part marking? 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
KDJEM.1
ST Employee

Hello @SZano ,

 

Could you please take a look at this errata sheet and precisely 2.1.2 Internal voltage reference calibration value not programmed during production errata   

KDJEM1_0-1725550384565.png

 

Could you please share a photo of the part marking? 

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

img.jpg

My package is UFQFPN48.
The date seems to be 345, so it must be this errata.

Thanks