AnsweredAssumed Answered

STM32F030F4 ADC strange behaviour

Question asked by stokic.srdjan on Oct 8, 2015
Latest reply on Nov 1, 2015 by stokic.srdjan
Hello all,

I have a custom board with STM32F030F4. I'm trying to run the simplest example generated by STM32Cube, which is to sample Temperature sensor and VRef input using DMA.

Everything compiles and runs properly, but when I run the code all I get is 0xFFF as a result for both inputs.

Next I tried measuring a value from a PA4 input pin. I'm bringing a 0.5V signal to a PA4 pin, but when the ADC starts I see nasty oscillations on the PA4 pin which go between 0.5V and 1.1V. (The signal is coming through an buffer op-amp).
Same thing happens when I connect PA4 to GND over a 1K resistor. It almost looks like the pin is pulled "up" during the sampling period to this 1.1V rail (VRef?), and the ADC reports a value of around 1000 instead of values close to 0.

Can anyone explain what is happening?

Thank you..