0

I went through the data sheet of STM32F4 and found the pin configuration of GPIOs. I don't understand the difference between these configurations:

  • Input floating
  • Input pull-up
  • Input-pull-down
  • Analog
  • Output open-drain with pull-up or pull-down capability
  • Output push-pull with pull-up or pull-down capability

I have used some of these configurations by vaguely understanding it. Could you help me to understand how this works? What is the difference between these configurations?

wovano
  • 161
  • 2
  • 11
seetharaman
  • 476
  • 1
  • 6
  • 17

1 Answers1

2

Input floating: Input Floating means Pin can be used as a input and it is not "tied" to anything (means neither pull up nor pull Down) hence called as floating.

Input pull-up: Input pin which is internally pulled up with a resistor (Pin connected with VCC Via a resistor). Resister value can be found in the datasheet.

Input-pull-down: Input pin which is internally pulled down with a resistor (Pin connected with GND Via a resistor). Resister value can be found in the datasheet.

Analog: Analog pin might be connected with an internal DAC or ADC. and can be used for analog application like voltage sensing or controlling the brightness of an LCD.

Output open-drain with pull-up or pull-down capability: Open Drain output can be treated as transistor's collector, to get high state requires a pullup resistor.

Output push-pull with pull-up or pull-down capability: push-pull structure generally refers to two transistors (One PNP and other NPN) are controlled by two complementary signals.Either of the transistor gets on while the other turns off.

Sanjeev Kumar
  • 1,474
  • 11
  • 19