Contents RM0440
10/2126 RM0440 Rev 4
9.3.5 I/O data bitwise handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
9.3.6 GPIO locking mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
9.3.7 I/O alternate function input/output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
9.3.8 External interrupt/wakeup lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
9.3.9 Input configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
9.3.10 Output configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
9.3.11 Alternate function configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
9.3.12 Analog configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
9.3.13 Using the HSE or LSE oscillator pins as GPIOs . . . . . . . . . . . . . . . . . 358
9.3.14 Using the GPIO pins in the RTC supply domain . . . . . . . . . . . . . . . . . 358
9.3.15 Using PB8 as GPIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
9.3.16 Using PG10 as GPIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
9.4 GPIO registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
9.4.1 GPIO port mode register (GPIOx_MODER)
(x =A to G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
9.4.2 GPIO port output type register (GPIOx_OTYPER)
(x = A to G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
9.4.3 GPIO port output speed register (GPIOx_OSPEEDR)
(x = A to G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
9.4.4 GPIO port pull-up/pull-down register (GPIOx_PUPDR)
(x = A to G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
9.4.5 GPIO port input data register (GPIOx_IDR)
(x = A to G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
9.4.6 GPIO port output data register (GPIOx_ODR)
(x = A to G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
9.4.7 GPIO port bit set/reset register (GPIOx_BSRR)
(x = A to G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
9.4.8 GPIO port configuration lock register (GPIOx_LCKR)
(x = A to G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
9.4.9 GPIO alternate function low register (GPIOx_AFRL)
(x = A to G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
9.4.10 GPIO alternate function high register (GPIOx_AFRH)
(x = A to G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
9.4.11 GPIO port bit reset register (GPIOx_BRR) (x = A to G) . . . . . . . . . . . . 366
9.4.12 GPIO register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
10 System configuration controller (SYSCFG) . . . . . . . . . . . . . . . . . . . . 369
10.1 SYSCFG main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
10.2 SYSCFG registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
10.2.1 SYSCFG memory remap register (SYSCFG_MEMRMP) . . . . . . . . . . 369