STM32 GPIO Lecture 6 : GPIO output mode with push pull state

  • Post author:
  • Post category:Blog

GPIO output mode with push pull state

 


 

GPIO (General Purpose Input/Output) pins on microcontrollers or single-board computers can be configured in various modes including input, output, and alternate function modes.

When configured as an output, GPIO pins can be set to operate in either push-pull or open-drain mode. In push-pull mode, the GPIO pin can both source (provide current) and sink (draw current) current, while in open-drain mode, the pin can only sink current.

 

GPIO output mode with push pull state
Figure1. GPIO output mode with push pull state

 

The push-pull state is the default configuration of any GPIO pin in output mode. When you enable GPIO port by default, its pin will be in input mode. But if you set any pin as the output mode, then by default it will be in push-pull configuration.

The name Push-pull output configuration because output will be pulled actively between low and high by using two transistors.

Push-pull configuration doesn’t need any pull-up/pull-down resistor. Push-pull output uses two transistors. Each will be on to drive the output to the appropriate level.

From Figure 1. The top transistor will be ON when the output has to be driven high. The bottom transistor will turn ON when the output has to go low.

 

The exact method for configuring a GPIO pin in push-pull output mode can vary depending on the specific microcontroller or single-board computer you are using. It’s always a good idea to consult the documentation for your particular device to ensure you’re using the correct registers and settings.

In the following article, let’s learn Optimizing I/O power consumption.

 

FastBit Embedded Brain Academy Courses,

Click here: https://fastbitlab.com/course1

 

 

FastBitLab

The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.

Leave a Reply