cancel
Showing results for 
Search instead for 
Did you mean: 

VREFINT_DATA

KLeon.875
Associate II

I'm using the STM32F0 Discovery (STM32F051R8T6) and trying to measure temperature via an ADC input. We're using the formula: VChannel = (3.3V * VREFINT_CAL * ADC_DATA) / (VREFINT_DATA * fullscale), but we are unsure what to use as the VREFINT_DATA value and how to acquire it.

5 REPLIES 5
Uwe Bonnes
Principal III

Your problem is not clear. Are you trying to aquire the internal temperature data? Then you should read the temperature adc channel after proper setup. Or are you trying to measure your VDDA? VREFINT_DATA is the reference temperature adc channel after proer setup.

KLeon.875
Associate II

No, we are using an external temperature sensor, but actually now after more testing, I realize we need the equation to measure our VDDA so instead we need the equation VDDA = 3.3V x VREFINT_CAL / VREFINT_DATA. Even then, in this case, what is VREFINT_DATA?

Mike_ST
ST Employee

I don't know your setup, but VREFINT_DATA should be what you measure on the LL_ADC_CHANNEL_VREFINT channel.

KLeon.875
Associate II

what is LL_ADC_CHANNEL_VREFINT? looking through the stm32f051t8 data sheet, we could not find it. We could only find how to access the value for the VREFINT_CAL.

Mike_ST
ST Employee

If you download the F0 drivers package, you will find it in stm32f0xx_ll_adc.h

Basically this is ADC channel 17 on F0. Please check RM0091/13.9 for more information.