2018-05-31 02:34 AM
Hi, everyone. I've been using STM32F030F4P6 for a project.
While prototyping the circuit that I am going to use on my project, I shorted Vdda and Vdd pins together with 10uF and 100nF capacitors to the ground. I am giving exact 3.3V to these pins with an DC power supply.
The problem is my voltage readings are usually
�
50mV off. My ADC configuration; continuous mode with software trigger with only EOC interrupt, SMPR set to highest (111). I've also used Vref to calibrate Vdda. Using Vref made results a bit better (Not that much). But it didn't make a lot of sense to me since Vref_int data was 1472 and Vref_cal was 1536. This tells me Vdda that I'm giving is 3.44V which is not true at all.How can I improve this MCU's ADC? Should I seperate Vdda - Vdd and give a voltage reference to Vdda? Would these improve my readings that much?
#adc-supply #stm32f030 #stm32f0 #adc-configuration #adc-calibration2018-05-31 02:38 AM
Hi
nuppo
,I recommend you to have a look to the
Application note aboutHow to get the best ADC accuracy in STM32 microcontrollers.-Nesrine-
2018-05-31 03:07 AM
'
The problem is my voltage readings are usually
±
50mV off.'
1. have the right expectation;
2. use calibration;
3. some of the chips, i think F0 is one of them, have adc calibration stored in the chip. that greatly improve the accuracy.
4. make sure you are measuring right.
2018-05-31 08:24 AM
Yes F0 has the calibration function and it works well.
final results are close to only 1mV error.
2019-01-09 01:13 PM
I am having the exact same problem on an STM32F070. tie the VDDA pin to VDD through a ferrite bead (to filter the input to VDDA) which is 3.319V. My analog input is a solid 0.6V (verified by 2x multimeters and an O-Scope). The MCU ADC measures 679 counts and it calcuates out to be approx 0.55V. According to my math at 0.6V I should be getting 740 counts. This is approx. 60 count / 50mV difference.
Have you found a solution to your problem that you can share?
2019-01-09 02:51 PM
The ADC reads the sample & hold capacitor, which is not accessible to a multi meter. Ensure you have a low impedance signal, or set the sampling time high as explained in Nesrine's application note reference. Grounding unused ADC channel pins can also help.
Cheers, Hal
2019-01-10 04:10 AM
Hal,
Thank you for responding, when I said I used a multimeter I meant I checked he incoming signal...not the inaccessible internal caps. I do have a low impedance signal, I am running the signal through a unity gain buffer (opamp). I have also tried changing he sampling rate with no effect.
I did speak with a person that works for ST Microelectronics after posting here and he said it sounds like I have to calibrate the ADC. I am going to try that and see if it fixes the issue.
Nick
2019-01-10 05:00 AM
Ran the HAL_ADCEx_Calibration_Start(&hadc) command and that fixed it. ADC Is reading very accurate now.