cancel
Showing results for 
Search instead for 
Did you mean: 

What is VDDA_Charac on the STM32F072?

BWKidd
Associate II

Apologies if I've missed something simple (and I probably have!), but I'm trying to convert ADC readings on the STM32F072 into actual millivolts and I cannot seem to put all the pieces together.

Where I am currently stuck is the formula at the top of page 260 in the reference manual RM0091 Rev 10:

VDDA = VDDA_Charac x VREFINT_CAL / VREFINT_DATA

According to the note just under that formula, "VDDA_Charac is the value of VDDA voltage characterized at VREFINT during the manufacturing process. It is specified in the device datasheet."

I've been all over the STM32F072xB (DS9826 Rev 6) datasheet and I cannot find any reference to such a thing as VDDA_Charac or the voltage at which the VREFINT_CAL is characterized at. Am I supposed to assume it is 3.3V? Is there some constant in the HAL that I should be referencing? I found a "VDD_VALUE" in stm32f0xx_hal_conf.h, but I don't think that's it.

Thank you for any guidance you can provide.

 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

The VREFINT_CAL value is taken when VDDA = 3.3V. This is the voltage it's referring to.

TDK_0-1707322224258.png

 

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

View solution in original post

4 REPLIES 4
TDK
Guru

The VREFINT_CAL value is taken when VDDA = 3.3V. This is the voltage it's referring to.

TDK_0-1707322224258.png

 

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

Thank you TDK! I knew it was simple/*** on my part.

Check, if you have already the macros provided to do all this calibration and conversion, e.g. on my STM32U5xx with ADC I use this:

VRefInt 	= __HAL_ADC_CALC_VREFANALOG_VOLTAGE(hadc, ADC_Val[0], hadc.Init.Resolution);
	VBat 		= __HAL_ADC_CALC_DATA_TO_VOLTAGE(hadc, VRefInt, ADC_Val[1], hadc.Init.Resolution);
	TSensor	    = __HAL_ADC_CALC_TEMPERATURE(hadc, VRefInt, ADC_Val[2], hadc.Init.Resolution);

This should take already the formula and the CALibration into account.

Sorry for the late reply. As far as I can tell, those macros are not available for the processor I'm using (STM32F072), but thank you for the suggestion!