AnsweredAssumed Answered

Analog input pin for Discovery board

Question asked by crocker.lee on Jun 4, 2015
Latest reply on Jun 4, 2015 by Clive One
I'm trying to get an ADC input to work on the Discovery STM32L053 board. The VREF calibration value is 0x68D, reading channel 17 shows 0x5E9, which by my calculations makes VDD 3.325 volts, which matches what I read on the scope, so it seems like I'm getting that much right.

But now I want to measure an actual pin. When I measure PA7 (ADC_IN7), I get a value of about 0.6 volts, even with the pin tied to ground or with a voltage input. Apparently the Discovery board steals this one for the touch sensor. The best sample code I've found uses PC4, but that's not available on the Discovery board.

Should I be able to use PA7 and I'm doing something wrong, or is there a better pin I should use instead? I'm just doing simple one-shot software triggered readings.