Assuming you mean that you have an analog voltage at the input to a digital gate, then (as already noted) it will sense a 'low' from Vss (usually ground) up to some threshold and a 'high' between some other voltage and Vdd (some positive voltage for most families of logic). Between these voltages the input is indeterminate; i.e. what the input is sensing cannot be guaranteed. The actual threshold is somewhere between the stated guaranteed levels, and varies significantly across batches and temperature.
The issue does not end here, however: if you are feeding a slow input (slower than perhaps 20 nsec / volt) to a CMOS gate, the part will experience significant class A conduction (i.e. both the input stage transistors are on at the same time) and could burn the part out. This has happened to many a person, some of them quite experienced.
When I have a slow signal that needs to enter the logic domain, I use a Schmitt trigger device.
Do a quick search on the implications of slowly changing inputs on CMOS logic.
Use two GPIO pins, alternate between input and output mode
Steps:
Discharge the capacitor
Charge one known resistor
Discharge capacitor
Charge the UNKNOWN resistor (the sensor)
http://www.doctormonk.com/2013/12/analog-sensors-without-analog-inputs-on.html
Use GPIO as input mode to detect the charge up reaching theshold (about mid point voltage)
This technique allow simple low cost MCU without build in ADC to read analogue sensor (variable resistance depending on sensed quality), including temperature (thermistor), humidity, light (CdS), force, etc.
Good absolute accuracy if the known resistor is high accuracy. Tolerance of capacitor is cancel out.
Widely used in consumer electronics device. Have excellent resolution, can be up to 16 to 20 bits or so. Typical conversion time in range of 100ms. Faster conversion can be traded with smaller resolution. Can use MCU hardware timer.
Raspberry Pi (vs Arduino) has no build in ADC and this technique is often used.
One pin version, lower absolute accuracy as affected by capacitor tolerance.
http://www.raspberrypi-spy.co.uk/2012/08/reading-analogue-sensors-with-one-gpio-pin/
Also, three pin version, use one pin for sensing (input mode) and quick discharge (output), for quicker conversion time.
Best Answer
There is no real difference between an analogue power supply and a digital power supply. They are separated because the digital power supply will supply current to digital switches which will switch on and off rapidly, putting large current demand spikes onto the power line, and hence cause momentary voltage drops and spikes on the line - these spikes are managed by decoupling capacitors local to the switching devices, and bulk capacitance at the power supply.
By keeping the two supply lines separate the circuit designer can isolate these current spikes from analogue circuitry which may be affected by small voltage drops - for example if the supply is used as a reference for an A2D. Often the two supplies are fed from the same source, but the analogue supply may have a small RC or inductive filter in line to remove digital noise present at the source.
So yes, the 3.3v pin of the STM32F4-discovery board could be used as an analog power source. I would just add a small series resistor (less than 0.05V drop at the current you are using) and additional capacitance to ground - to give a first order low pass filter frequency of about 1KHz - or whatever you deem appropriate.