cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C071GBU6 ADC Question

ToddGilbert32
Associate II

STM32C071GBU6 PA2 (pin 8 on the UFQFPN28 device) is configured as ADC_IN2.  What voltage can be expected when the pin is unloaded?

1 ACCEPTED SOLUTION

Accepted Solutions

If by ‘the pin is reading’ you mean the ADC attempting to measure a voltage on this floating pin, then the result is unpredictable. Floating input pins, whether digital or analogue, always exhibit this behaviour. The designer of the system is responsible for ensuring that such a condition does not occur or is handled appropriately.

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

6 REPLIES 6
Peter BENSCH
ST Employee

Welcome @ToddGilbert32, to the community!

Well - if the pin is initialised as ADC_IN2 and nothing is connected to it, the pin floats and no defined voltage is to be expected there.

Does it answer your question ?

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
ToddGilbert32
Associate II

Thanks Peter.  I should have provided this information - the pin is reading 28mV.  Is this to be expected?

If by ‘the pin is reading’ you mean the ADC attempting to measure a voltage on this floating pin, then the result is unpredictable. Floating input pins, whether digital or analogue, always exhibit this behaviour. The designer of the system is responsible for ensuring that such a condition does not occur or is handled appropriately.

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Any voltage between 0 V and Vdd might be expected.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

Thanks Peter! :)

ToddGilbert32
Associate II

Thanks gbm! :)