This document provides an overview of general purpose input/output (GPIO) hardware and registers for the STM32 microcontroller. It describes GPIO voltage levels, terminology like high impedance and pull-up/pull-down resistors. It also explains the difference between push-pull and open-drain output. Finally, it outlines the various GPIO registers for configuration, data, and alternate functions on each STM32 port.
This document provides an overview of general purpose input/output (GPIO) hardware and registers for the STM32 microcontroller. It describes GPIO voltage levels, terminology like high impedance and pull-up/pull-down resistors. It also explains the difference between push-pull and open-drain output. Finally, it outlines the various GPIO registers for configuration, data, and alternate functions on each STM32 port.
This document provides an overview of general purpose input/output (GPIO) hardware and registers for the STM32 microcontroller. It describes GPIO voltage levels, terminology like high impedance and pull-up/pull-down resistors. It also explains the difference between push-pull and open-drain output. Finally, it outlines the various GPIO registers for configuration, data, and alternate functions on each STM32 port.
Outline ● GPIO Hardware ○ Voltage Levels ○ Terminology ○ Push-Pull vs. Open-drain ● STM32 GPIO Registers GPIO: Hardware GPIO: Voltage Levels GPIO: Configuration Terminology ● High impedance (High-Z, Hi-Z) ○ Influence on the electrical circuit it is connected to. ● Floating pin ○ Unconnected and is also not driven by a circuit inside the integrated circuit. ○ Its voltage level is undefined and unpredictable. ● Pull-up and pull-down resistors ○ Specify logic level (0 or 1) at a floating pin GPIO: Push-Pull vs Open Drain STM32 Registers ● GPIO Ports ○ Designated by letters A, B, C, D, and F ○ Number of ports changes between chip families processors ● Each general-purpose I/O port has four 32-bit configuration registers ○ GPIOx_MODER, ○ GPIOx_OTYPER ○ GPIOx_OSPEEDR ○ GPIOx_PUPDR ● Two 32-bit data registers ○ GPIOx_IDR ○ GPIOx_ODR ● 32-bit set/reset register (GPIOx_BSRR) ● 32-bit locking register (GPIOx_LCKR) ● two 32-bit alternate function selection registers ○ GPIOx_AFRH ○ GPIOx_AFRL Reference ● https://www.st.com/resource/en/reference_manual/rm0316-stm32f303xbcde-stm32f303x68-stm32f328x8-stm32f358 xc-stm32f398xe-advanced-armbased-mcus-stmicroelectronics.pdf