2016-11-06 01:37 PM
Hi,
I have the board nucleo STM32f03R8 and my analog signals are less than that expected value. I use the CubeMx to configure ADC, I selected it as in this tutorial (http://letanphuc.net/2016/07/stm32f0-adc/) but my board with low signals in analog input show value (0-4095) with error.example: 1.311V -> 1567 read the value expected is 1626example: 2.363V -> 2866 read the value expected is 2928The code of ADC configure is:hadc.Instance = ADC1; hadc.Init.ClockPrescaler = ADC_CLOCK_ASYNC_DIV1; hadc.Init.Resolution = ADC_RESOLUTION_12B; hadc.Init.DataAlign = ADC_DATAALIGN_RIGHT; hadc.Init.ScanConvMode = ADC_SCAN_DIRECTION_FORWARD; hadc.Init.EOCSelection = ADC_EOC_SINGLE_CONV; hadc.Init.LowPowerAutoWait = DISABLE; hadc.Init.LowPowerAutoPowerOff = DISABLE; hadc.Init.ContinuousConvMode = DISABLE; hadc.Init.DiscontinuousConvMode = DISABLE; hadc.Init.ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE; hadc.Init.DMAContinuousRequests = DISABLE; hadc.Init.Overrun = ADC_OVR_DATA_PRESERVED; HAL_ADC_Init(&hadc);Sorry for my english. Thanks #adc-error-vref-stm32f0-vrefint2016-11-06 01:52 PM
What is my problem? Please Help me
Tank you people...
You should perhaps reflect on the value reported for VREFINT, and that on the VREF+ pin. VREF+ on the DISCO is 3.0V, I think it is 3.3V on the NUCLEO, but you should check with a meter, it will impact the computation of the voltage vs the measurement. China Tanks it's people