Contents RM0390
6/1328 RM0390 Rev 4
7.3.4 I/O port data registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
7.3.5 I/O data bitwise handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
7.3.6 GPIO locking mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
7.3.7 I/O alternate function input/output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
7.3.8 External interrupt/wakeup lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
7.3.9 Input configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
7.3.10 Output configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
7.3.11 Alternate function configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
7.3.12 Analog configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
7.3.13 Using the OSC32_IN/OSC32_OUT pins as GPIO PC14/PC15
port pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
7.3.14 Using the OSC_IN/OSC_OUT pins as GPIO PH0/PH1 port pins . . . . 185
7.3.15 Selection of RTC additional_AF1 and RTC_AF2 alternate functions . 186
7.4 GPIO registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
7.4.1 GPIO port mode register (GPIOx_MODER) (x = A..H) . . . . . . . . . . . . 187
7.4.2 GPIO port output type register (GPIOx_OTYPER) (x = A..H) . . . . . . . 188
7.4.3 GPIO port output speed register (GPIOx_OSPEEDR) (x = A..H) . . . . 188
7.4.4 GPIO port pull-up/pull-down register (GPIOx_PUPDR) (x = A..H) . . . 189
7.4.5 GPIO port input data register (GPIOx_IDR) (x = A..H) . . . . . . . . . . . . 189
7.4.6 GPIO port output data register (GPIOx_ODR) (x = A..H) . . . . . . . . . . 190
7.4.7 GPIO port bit set/reset register (GPIOx_BSRR) (x = A..H) . . . . . . . . . 190
7.4.8 GPIO port configuration lock register (GPIOx_LCKR) (x = A..H) . . . . . 190
7.4.9 GPIO alternate function low register (GPIOx_AFRL) (x = A..H) . . . . . 192
7.4.10 GPIO alternate function high register (GPIOx_AFRH) (x = A..H) . . . . 192
7.4.11 GPIO register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
8 System configuration controller (SYSCFG) . . . . . . . . . . . . . . . . . . . . 195
8.1 I/O compensation cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
8.2 SYSCFG registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
8.2.1 SYSCFG memory remap register (SYSCFG_MEMRMP) . . . . . . . . . . 195
8.2.2 SYSCFG peripheral mode configuration register (SYSCFG_PMC) . . 197
8.2.3 SYSCFG external interrupt configuration register 1
(SYSCFG_EXTICR1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
8.2.4 SYSCFG external interrupt configuration register 2
(SYSCFG_EXTICR2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
8.2.5 SYSCFG external interrupt configuration register 3
(SYSCFG_EXTICR3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199