2019-11-05 08:52 PM
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.
2019-11-06 02:12 AM
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.
2019-11-06 06:40 AM
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?
2019-11-06 07:37 AM
I don't know your setup, but VREFINT_DATA should be what you measure on the LL_ADC_CHANNEL_VREFINT channel.
2019-11-06 07:42 AM
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.
2019-11-06 07:59 AM
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.