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