A GPIO pin may look like one of the simplest peripherals in a microcontroller, but configuring it incorrectly can cause unexpected current consumption, signal-integrity problems, electromagnetic interference (EMI), and even hardware failures.
In embedded systems, GPIO configuration is not just about setting a pin HIGH or LOW. Firmware engineers must understand the internal GPIO architecture, electrical characteristics, output drive capability, pull resistors, alternate functions, and timing requirements.
Having worked with microcontrollers ranging from the classic 8051 and PIC families to modern STM32 devices, I have seen how small GPIO configuration mistakes can create significant problems during hardware validation and product certification.
In this STM32 GPIO tutorial, we will explore STM32 GPIO architecture, configuration registers, operating modes, electrical behavior, and practical design considerations, with particular attention to the STM32H5 family.
Whether you are developing bare-metal firmware, using STM32 HAL, or building production-level embedded applications, understanding these fundamentals will help you design more reliable systems.
What is GPIO in STM32 Microcontrollers?
In STM32 microcontrollers, General-Purpose Input/Output (GPIO) pins are among the most frequently used peripherals. They provide a configurable interface between the microcontroller and external hardware, allowing the microcontroller to interact with the outside world.
Unlike dedicated peripheral pins, GPIO pins can be configured for multiple operating modes, including digital input, digital output, analog input, and alternate-function mode. This flexibility allows the same physical pin to serve different purposes depending on the application and configuration.
For example:
- Read a push-button state.
- Control an LED.
- Drive a chip-select signal.
- Receive an external interrupt.
- Connect an external sensor.
- Provide UART, SPI, I2C or timer signals through alternate functions.
STM32 GPIO Port Organization:
STM32 microcontrollers organize GPIO pins into groups called GPIO ports, typically identified as GPIOA, GPIOB, GPIOC, GPIOD, and so on.
Each GPIO port generally provides 16 pin positions, numbered from GPIO_PIN_0 to GPIO_PIN_15. However, the actual number of available GPIO pins depends on the specific STM32 microcontroller and its package.
For example, a microcontroller may support GPIOA through GPIOG, but not every pin position in every port is necessarily available or bonded out in a particular package.
Fundamental GPIO Configuration Parameters:
Before using a GPIO pin, firmware engineers must understand four fundamental configuration parameters:
- Mode: Determines whether the pin operates as Input, Output, Alternate Function, or Analog.
- Output Type: Determines whether the output driver operates in Push-Pull or Open-Drain mode.
- Pull Configuration: Selects No-Pull, Pull-Up, or Pull-Down configuration.
- Output Speed: Controls the output driver’s transition characteristics (Low, Medium, High, or Very High, depending on the STM32 family).
These parameters determine the electrical behavior and functionality of a GPIO pin. Understanding them is essential for configuring GPIO correctly and avoiding common hardware interface problems.
GPIO Functional Description:

Each GPIO pin on the STM32H5 can be individually configured through firmware (Pin mode, output type and pull configuration are controlled independently through GPIO configuration registers). Depending on the selected mode, output type and internal pull configuration, a pin can operate in the following configurations:
- Input: Floating, Pull-Up or Pull-Down.
- Output: Push-Pull or Open-Drain, with optional Pull-Up/Pull-Down.
- Alternate Function: Push-Pull or Open-Drain, with optional Pull-Up/Pull-Down.
- Analog: Analog input/output functionality, depending on pin capabilities.
STM32 GPIO Pin Structure:
A GPIO pin is much more than a simple digital input or output. It defines how a physical pin interacts with external signals and the microcontroller’s internal peripherals.
Internally, each GPIO pin consists of several circuit blocks, including protection diodes, configurable pull-up/pull-down resistors, a Schmitt trigger input buffer, and output driver transistors.
Understanding this internal architecture helps firmware engineers configure GPIO pins correctly and understand their impact on signal integrity, power consumption, and hardware reliability.

I/O Protection Diodes in GPIO Pins:
GPIO pins have built-in protection circuits to protect the internal circuitry from electrostatic discharge (ESD) and abnormal input voltages.
These protection circuits connect the GPIO pin to VDD and ground (VSS) through protective paths, helping protect the internal circuitry when the input voltage goes beyond the allowed limits.
For example, consider an STM32 running at 3.3 V. If the voltage at a GPIO pin goes too high, the upper protection circuit may start conducting. Similarly, if the voltage goes below ground, the lower protection circuit may conduct.
This allows current to flow towards the supply or ground, helping protect the internal circuitry.
Example:
- Positive voltage: When the input voltage rises above the allowed limit, the upper protection circuit may conduct.
- Negative voltage: When the input voltage falls below ground, the lower protection circuit may conduct.
Points to remember:
- Always follow the input voltage limits specified in the datasheet.
- Check the positive and negative injection current limits.
- Verify whether the GPIO pin supports 5 V input.
- Consider the case when the MCU is powered off but an external signal is still present.
Input Driver (Schmitt Trigger):
When a GPIO pin is configured as an input, the external voltage is processed by the digital input circuitry before being interpreted as a logic HIGH or LOW.
Many microcontrollers use Schmitt-trigger characteristics in their digital input circuitry to improve noise immunity.
A Schmitt trigger introduces a property called hysteresis, which means it uses two different switching thresholds:
- Upper threshold (VTH+): The input must rise above this voltage to be recognized as HIGH.
- Lower threshold (VTH-): The input must fall below this voltage to be recognized as LOW.
The difference between these two thresholds is called hysteresis.
Why is this important?
Consider a push button connected to a GPIO pin. When you press or release the button, its contacts may open and close several times very quickly. This can cause the voltage at the GPIO pin to fluctuate.
If the voltage keeps changing around the switching threshold, the microcontroller may detect unwanted HIGH and LOW transitions.
A Schmitt trigger helps avoid this problem by using two different voltage thresholds. Once the input is detected as HIGH, it stays HIGH until the voltage drops below the lower threshold. Similarly, once detected as LOW, it stays LOW until the voltage rises above the upper threshold.
This helps the microcontroller read a more stable digital signal, even when small voltage fluctuations are present.
Once processed by the digital input circuitry, the resulting logic state can be read through the Input Data Register (IDR), provided the GPIO input path is enabled.
Output Driver (P-MOS & N-MOS)
When a GPIO pin is configured as an output, its voltage is controlled by an internal output driver. In a typical CMOS push-pull output stage, this driver consists of two MOSFETs:
- P-channel MOSFET (P-MOS): Connected towards the positive supply (VDD).
- N-channel MOSFET (N-MOS): Connected towards ground (VSS).
By controlling these transistors, the microcontroller can drive the GPIO pin HIGH or LOW.
Push-Pull Mode:
In push-pull mode, the output driver actively controls both logic states:
- The P-MOS transistor turns ON to drive the pin HIGH.
- The N-MOS transistor turns ON to drive the pin LOW.
Only one transistor is intended to conduct at a time during normal operation.
Since the output is actively driven in both states, push-pull mode provides relatively fast switching and low output impedance.
Common applications include:
- LED control.
- Chip-select signals (SPI).
- SPI clock and data signals.
- General-purpose digital control signals.
Open-Drain Mode:
In open-drain mode, the P-MOS transistor is disabled, and the N-MOS transistor controls the output.
The pin can actively pull the signal LOW, but it cannot actively drive the signal HIGH. A pull-up resistor, either internal or external, is required to establish the HIGH state.
When the N-MOS transistor turns ON, it pulls the pin towards ground. When it turns OFF, the pull-up resistor brings the pin towards VDD.
This arrangement allows multiple devices to share a communication line without directly driving conflicting logic levels. For this reason, open-drain outputs are commonly used in communication buses such as I²C, shared interrupt lines, and wired-AND/wired-OR logic, provided the electrical requirements are satisfied.
Common applications include:
- I²C communication (SDA and SCL).
- Wired-AND signaling.
- Shared interrupt lines.
- Multi-device communication buses.
Practical Examples:
- Driving an LED through a GPIO configured as push-pull.
- Connecting multiple devices to an I²C bus using open-drain outputs and pull-up resistors.
Pull-Up and Pull-Down Resistors:
A GPIO input pin needs a defined voltage level to work reliably. Internal pull-up and pull-down resistors help maintain this voltage when nothing is actively driving the pin.
- Pull-up resistor: Connects the GPIO pin weakly to the supply voltage (VDD).
- Pull-down resistor: Connects the GPIO pin weakly to ground (GND).
Example: Push Button with an Internal Pull-Up
Consider a push button connected between a GPIO pin and ground.
When the internal pull-up resistor is enabled:
- Button released: The pull-up resistor keeps the GPIO pin HIGH.
- Button pressed: The button connects the pin to ground, so the GPIO reads LOW.
Without a pull-up or pull-down resistor, the pin may be left floating when the button is released. This means its voltage is not properly defined, and the GPIO may read unpredictable HIGH and LOW values.
Internal pull resistors are convenient because they eliminate the need for additional external components in many applications.
However, their resistance is not very precise and can vary between devices. For applications with strict electrical requirements, an external pull-up or pull-down resistor may be a better choice.
Alternate Function Multiplexer (AF Mux):
A GPIO pin on an STM32 microcontroller can serve different purposes depending on how it is configured. Besides general-purpose input and output, a pin can also be connected to an internal peripheral such as USART, SPI, I2C or a timer.
The Alternate Function Multiplexer (AF Mux) handles this signal routing. It selects which internal peripheral signal is connected to a particular physical GPIO pin.
For example, consider PA9 on an STM32 microcontroller:
- GPIO mode: PA9 can be configured as a general-purpose input or output.
- Alternate function mode: If supported by the particular device, PA9 can be configured as USART1_TX to transmit serial data through the USART peripheral.
Other commonly supported alternate functions include:
- USART transmit and receive signals.
- SPI clock, data input and data output signals.
- I2C clock and data signals.
- Timer input capture and output compare signals.
The alternate function selection is configured through the GPIO alternate function registers (AFRL and AFRH). Each supported alternate function is identified by an AF number.
STM32 GPIO Modes Explained:
STM32 GPIO pins can be configured to perform different functions depending on how they are used in an application. A pin might read the state of a push button, drive an LED, generate a PWM signal, communicate with an external device, or receive an analog voltage.
The GPIO mode determines how the pin interacts with the internal circuitry of the microcontroller and the external circuit connected to it.
STM32 microcontrollers provide four primary GPIO modes:
- Input mode.
- Output mode.
- Alternate Function mode.
- Analog mode.
Let’s understand how each mode works, what happens internally, and where it is commonly used.
Input Mode:
Input mode is used when the microcontroller needs to read an external digital signal. In this configuration, the output driver is disabled, while the input path remains active to detect the logic level present on the pin.
For example, consider a push button connected to an STM32 GPIO pin. When the button is pressed or released, the firmware reads the corresponding pin state through the GPIO input data register (IDR).
STM32 supports three common input configurations.
Floating Input
In floating input configuration, neither an internal pull-up nor a pull-down resistor is enabled.
The pin voltage is determined entirely by the external circuit. If nothing drives the pin, its voltage can fluctuate due to electrical noise, resulting in unpredictable logic readings.
Typical use cases:
- Reading a push-pull output from another microcontroller.
- Interfacing with an external digital sensor that actively drives both logic states.
- Reading signals from external circuits that already provide a defined logic level.
Important: Never leave an unused digital input floating unless the hardware design specifically requires it. An undefined input level can cause unnecessary switching activity and unpredictable behavior.
Pull-Up Input
In pull-up configuration, an internal resistor connects the GPIO pin weakly towards the I/O supply voltage (VDD).
When no external circuit drives the pin, the pull-up resistor establishes a default HIGH state.
A common application is an active-low push button connected between the GPIO pin and ground.
- Button released: GPIO reads HIGH.
- Button pressed: GPIO reads LOW.
Typical use cases:
- Active-low push buttons.
- Open-drain interrupt outputs.
- Digital signals that require a default HIGH state.
Pull-Down Input
In pull-down configuration, an internal resistor connects the GPIO pin weakly towards ground.
When the external circuit does not drive the pin, the pull-down resistor establishes a default LOW state.
For an active-high push button connected between the supply and the GPIO pin:
- Button released: GPIO reads LOW.
- Button pressed: GPIO reads HIGH.
Typical use cases:
- Active-high push buttons.
- Digital inputs requiring a default LOW state.
- External signals that need a defined inactive state.
The internal pull-up and pull-down resistors are relatively weak. Their resistance and electrical characteristics should be checked in the STM32 datasheet when designing the external circuit, particularly when signal integrity and timing matter.
Output Mode:
Output mode is used when the microcontroller needs to control the electrical state of a GPIO pin.
In this configuration, the output driver controls the pin voltage according to the value written to the GPIO output data register (ODR), or through the bit set/reset register (BSRR).
For example, firmware can turn an LED ON or OFF by changing the corresponding GPIO output state.
STM32 supports two output configurations.
Push-Pull Output
A push-pull output uses both high-side and low-side output transistors.
- When the output is HIGH, the high-side transistor drives the pin towards VDD.
- When the output is LOW, the low-side transistor drives the pin towards ground.
In other words, the microcontroller actively drives both logic states. The pin can source current in the HIGH state and sink current in the LOW state, within the electrical limits specified in the datasheet.
Typical use cases:
- LED control.
- Chip-select signals for SPI devices.
- Digital control signals.
- General-purpose output signals.
- Clock signals where GPIO output mode is appropriate.
Open-Drain Output
Unlike push-pull configuration, an open-drain output uses only the low-side output transistor to pull the pin towards ground.
When the transistor is enabled, the pin is driven LOW. When it is disabled, the output becomes high impedance (Hi-Z).
Therefore, an external or internal pull-up resistor is required to establish the HIGH state.
A common example is the I2C communication bus, where multiple devices share the same SDA and SCL lines.
Typical use cases:
- I2C communication.
- Wired-AND signaling.
- Shared interrupt lines.
- Multiple devices sharing a common signaling line.
Note: Selecting open-drain mode does not automatically provide a suitable pull-up resistor. The pull-up resistance must be selected according to bus capacitance, operating voltage, and required signal rise time.
Alternate Function Mode:
STM32 GPIO pins are multiplexed, meaning that a single physical pin can serve different purposes depending on its configuration.
For example, a particular pin might support GPIO operation, UART transmission, SPI clock output, or a timer channel.
When Alternate Function (AF) mode is selected, the GPIO pin is connected to the selected peripheral signal instead of being controlled directly as a standard GPIO.
Some common examples include:
- USART_TX and USART_RX for serial communication.
- SPI_SCK, SPI_MOSI and SPI_MISO for SPI communication.
- I2C_SCL and I2C_SDA for I2C communication.
- TIM PWM output channels.
- Timer input capture signals.
How does it work?
STM32 provides an internal alternate-function multiplexer that routes peripheral signals to the corresponding GPIO pins.
The alternate function selection is configured using the GPIO alternate function registers:
- AFRL: Configures alternate functions for pins 0 to 7.
- AFRH: Configures alternate functions for pins 8 to 15.
Each pin has its own alternate function selection field.
However, selecting an alternate function is only part of the configuration. The corresponding peripheral must also be configured and enabled.
For example, configuring a pin as USART_TX requires:
- Enabling the GPIO port clock.
- Configuring the pin in Alternate Function mode.
- Selecting the correct USART alternate function.
- Configuring the required electrical settings.
- Initializing and enabling the USART peripheral.
Note: The available alternate functions are not identical across all STM32 devices. Always refer to the datasheet’s alternate function mapping table for the exact MCU and package being used.
Analog Mode:
Analog mode is used when a GPIO pin needs to handle an analog signal rather than a digital logic level.
In this configuration, the digital GPIO input and output functions are disabled, allowing the pin to be used by supported analog circuitry.
Typical applications include:
- ADC input channels.
- DAC output channels.
- Operational amplifier inputs.
- Comparator inputs.
For example, when an external voltage sensor is connected to an STM32 ADC input, the corresponding GPIO pin must be configured in Analog mode before performing the analog measurement.
Why use Analog mode?
There are several reasons:
- Reduced digital switching activity: Disabling the digital input path avoids unnecessary digital transitions caused by changes in the analog voltage.
- Reduced power consumption: Disabling unused digital circuitry can reduce power consumption.
- Reduced digital input leakage: Disabling the digital input path can reduce associated leakage current.
- Suitable analog operation: It allows the pin to be used by the corresponding analog peripheral.
Analog mode is also commonly recommended for unused GPIO pins when appropriate for the particular STM32 device and application.
However, do not assume that Analog mode is automatically the best configuration for every unused pin. Always check the MCU datasheet and reference manual, especially when configuring pins used during low-power modes or connected to external circuitry.
STM32 GPIO Registers:
STM32 GPIO peripherals are controlled through memory-mapped registers.
For STM32H5 devices covered by RM0481, important GPIO registers include the following.
Configuration Registers
| Register | Purpose |
|---|---|
| MODER | Selects GPIO operating mode. |
| OTYPER | Selects Push-Pull or Open-Drain output type. |
| OSPEEDR | Controls output speed characteristics. |
| PUPDR | Configures pull-up and pull-down resistors. |
| AFRL | Selects alternate functions for pins 0–7. |
| AFRH | Selects alternate functions for pins 8–15. |
| SECCFGR | Configures GPIO security attribution. |
| HSLVR | Controls high-speed low-voltage configuration. |
Data Registers
| Register | Purpose |
|---|---|
| IDR | Reads the current input pin states. |
| ODR | Stores the output data states. |
Set and Reset Registers
| Register | Purpose |
|---|---|
| BSRR | Atomically sets or resets output bits. |
| BRR | Resets output bits. |
Control Registers:
| Register | Purpose |
|---|---|
| LCKR | Locks GPIO configuration to prevent further changes. |
STM32 Electrical behavior & speed:
STM32 GPIO electrical behavior and speed settings control how fast a pin switches and how it interacts with external circuitry. Output speed, drive type, and pull resistors directly affect EMI, power consumption, and signal reliability. Here are a few important GPIO points you should understand before initialization.
1. GPIO Output-Speed Configuration
GPIO speed settings control the rising and falling edges when the pin switches state (from HIGH to LOW or vice versa).
- Low Speed → Best for very slow toggling (e.g., an LED blinking at 1 Hz).
- Medium Speed → Balanced for general-purpose signals.
- High / Very High Speed → Required for fast peripherals (e.g., SPI running at 45 MHz).
2. Electrical Characteristics:
STM32 GPIO pins are more than simple digital switches—they come with configurable electrical properties:
- Push-Pull or Open-Drain outputs.
-
- Push-Pull: Actively drives both high and low levels, ideal for general-purpose digital outputs.
- Open-Drain: Only pulls the line low, requiring an external pull-up resistor. Useful for wired-AND logic or communication protocols like I²C.
-
- Pull-Up / Pull-Down resistors for stable input levels.
- Output speed & slew rate control for reducing EMI.
- Current sourcing/sinking limits per pin and per port.
3. Integration with External Interrupts (EXTI)
- GPIO pins can be linked to EXTI lines.
- This allows events like button presses to trigger interrupts or wake the MCU from low-power modes.
4. Security and Low-Power Features (STM32H5 Specific)
- TrustZone support ensures some GPIOs can only be controlled by secure firmware.
- HSLVR enables high-speed operation even at reduced supply voltages.
- GPIOs can be configured as wake-up sources in low-power modes.
GPIO Initialization:
Before using GPIO pins, you need to enable the clock for the corresponding GPIO port and configure the pin’s properties.
1. Input Configuration:
When configured as input, STM32H5 GPIOs support:
- Floating Input – High impedance, but highly sensitive to noise.
- Pull-Up / Pull-Down – Controlled via PUPDR register. Internal resistors are weak; use external resistors for critical signals.
Issue:
Internal pulls change with voltage and temperature. A pin that looks stable HIGH under normal conditions may drop LOW at −40 °C. So never rely only on internal pulls—always use external resistors for critical signals.
2. Output Configuration:
When you set a GPIO pin as an output, you need to decide two things:
- Output Type – how the pin drives signals (Push-Pull or Open-Drain).
- Drive Strength – how much current the pin can safely source (drive high) or sink (drive low).
Output mode requires setting the OTYPER register:
- Push-Pull – Drives strong high and low states. Best for LEDs, digital logic, and low-impedance loads.
- Open-Drain – Pulls only low, requires external pull-up for high. Essential for I²C, multi-master buses, or wired-OR logic.
Current Sinking / Sourcing
- Sink Current (driving low): up to 8–20 mA depending on the pin and package.
- Source Current (driving high): slightly weaker than sinking in most STM32 devices.
- Always consult the I/O Characteristics section of the datasheet; exceeding ratings leads to long-term degradation, not just immediate failure.
3. Alternate Functions
GPIO pins on the STM32H5 can take on different roles through the Alternate Function Registers (AFR). This mapping connects internal peripherals — such as UART, SPI, I²C, timers, and CAN — to the physical pin.
Common Pitfalls:
- Wrong AF index: Choosing the incorrect alternate function silently breaks the connection; the peripheral will not work.
- Package differences: Not every alternate function is available on every package. Always cross-check the datasheet pinout.
- Pin conflicts: More than one peripheral may need the same pin. These conflicts must be resolved during PCB design, not after the board is made.
Tips When working on STM32 GPIO:
Here are a few tips that can save you a lot of time when working with STM32xxx GPIO. However, I strongly recommend checking your MCU’s datasheet before applying any of these tips.
1. Always Configure All Pins
- On some STM32 families (e.g., STM32F1/F4), after reset pins default to input-floating.
- On newer families like STM32H5, most pins default to Analog mode, which helps reduce leakage current.
Problem: Floating inputs (if left unconfigured) can pick up noise and increase current consumption, especially in low-power modes.
Best Practice: Regardless of defaults, always explicitly configure all unused pins to Analog mode. This disables the input buffer and pull resistors, minimizing power and avoiding undefined states.
2. Use External Pull Resistors for Critical Inputs
- Internal pull-ups/downs are weak (≈30–50 kΩ) and vary with temperature and voltage.
- For safety-critical signals (reset, enable, interrupts), always use external resistors.
3. Control Slew Rate for EMI Compliance
- Output speed (OSPEEDR) controls edge rate, not toggle frequency.
- Use the lowest speed that meets your timing requirements.
- Avoid setting all pins to Very High speed — this is a common cause of EMI test failures.
4. Protect Debug Pins
- Pins PA13/PA14 (SWDIO/SWCLK) are vital for debugging.
- Reconfiguring them as GPIO too early will lock you out of the chip.
- Leave them as default until production firmware is finalized.
5. Use BSRR for Atomic Pin Updates
- Writing to ODR can cause race conditions if interrupts modify the same register.
- The BSRR register allows atomic set/reset operations per pin — safer and faster.
6. Debounce Inputs Properly
- EXTI interrupts can trigger multiple times due to mechanical bounce or noise.
- Use hardware RC filters for push buttons or software debounce logic.
7. Check Current Drive Capability
- Each GPIO can sink/source up to ~8–20 mA (varies by package).
- Avoid driving relays, high-power LEDs, or long traces directly.
- Use external drivers or buffers when higher current is needed.
8. Handle Reset State Hazards
- Default behavior: After reset, some STM32 GPIOs are configured as high-impedance inputs.
- Risk: External hardware like motors, MOSFETs, relays, or level-sensitive ICs may float and activate unintentionally.
Best practice:
- Use external pull-up or pull-down resistors to force a known logic state.
- Add fail-safe circuits (e.g., series resistors, gate protection, or logic buffers) where accidental activation could cause damage.
- Review datasheet “reset state” section to confirm the exact pin default for your STM32 family.
9. Review Electrical Domains Carefully
STM32H5 supports multiple I/O voltage domains.
- Ensure connected peripherals use the same logic level.
- Driving beyond tolerance (e.g., 5 V input on a 3.3 V pin) can permanently damage the MCU.
10. Always Read the Errata
- Many GPIO quirks are already documented by ST (e.g., EXTI glitches, leakage in STOP mode).
- Errata sheets are as important as datasheets.
- Make it a habit: check errata before every tape-out or certification run.
Advanced GPIO Testing:
Advanced GPIO testing goes far beyond just toggling an LED. It is about validating signal integrity, timing behavior, EMC performance, and robustness under real-world conditions.
Over the years, I have seen projects fail not because of complex logic, but due to overlooked GPIO-related issues. Problems often show up at the EMC lab, during cellular interoperability testing, or—worse—later in the field, where debugging is far more costly.
That is why it is critical to have a structured approach to GPIO testing and validation before certification.
In this series, I will highlight some of the most important GPIO tests you should always perform and verify. Each topic will be explained in a separate, detailed blog post to make the learning more practical and interesting.
Now times to explore the key considerations for building a robust GPIO design and ensuring thorough testing.
- EMC Conformance and Radiated Emission.
- Cellular IOP (Inter-Operability) Testing.
- Signal Integrity (SI) Testing.
- Signaling & Logic Level Compatibility.
- Leakage Current Minimization.
- Timing and Synchronization.
- Troubleshooting Workflow.
Frequently Asked Questions (FAQ):
- What are GPIO modes in STM32?
- How do I configure STM32 GPIO without HAL?
- What is alternate function in STM32 GPIO?
- Why GPIO speed matters in STM32?
- What is the difference between Push-Pull and Open-Drain?
- Why should I use BSRR instead of ODR?
- What happens if I don’t enable the GPIO Clock?
- How much current can an STM32 GPIO pin sink or source?