My ADC outputs values from 970 and above
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-04-06 7:36 AM
I 'm making a voltmeter - amp meter, this one...
I 'm using an STM32F030K6T6.
But when nothing is connected to the input, instead of outputing 0, the ADC gives me a value around 980.
VDDA is tied to VDD.
Boot0 is tied to GND.
These are the ADC 's settings:
ClockPrescaler = ADC_CLOCK_ASYNC_DIV1;
Resolution = ADC_RESOLUTION_12B;
DataAlign = ADC_DATAALIGN_RIGHT;
ScanConvMode = ADC_SCAN_DIRECTION_FORWARD;
EOCSelection = ADC_EOC_SINGLE_CONV;
LowPowerAutoWait = DISABLE;
LowPowerAutoPowerOff = DISABLE;
ContinuousConvMode = DISABLE;
DiscontinuousConvMode = DISABLE;
ExternalTrigConv = ADC_SOFTWARE_START;
ExternalTrigConvEdge = ADC_EXTERNALTRIGCONVEDGE_NONE;
DMAContinuousRequests = DISABLE;
Overrun = ADC_OVR_DATA_PRESERVED;
What have I done wrong?
Any help is welcome.
Solved! Go to Solution.
Labels:
- Labels:
-
ADC
-
STM32F0 Series
This discussion is locked. Please start a new topic to ask your question.
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-04-07 2:54 AM
Analog->ADC->Configuration->Parameter settings->ADC_Regular_ConverstionMode>-Sampling Time.
I changed it's value from 1.5 cycles to 239.5 cycles and works fine!!
It was so simple!

- « Previous
-
- 1
- 2
- Next »