This is an old revision of the document!


General Purpose Input

  • The output buffer is disabled.
  • The Schmitt trigger input is active.
  • The pull-up and -down resistors are active, according to PUPDR.
  • Input data is sampled every AHB clock.
  • Input data register holds I/O state.




Make sure the peripheral is enabled:

  • Enable GPIOx in RCC→AHBENR[0].

Configure the MODE and PUPDR register, for every pin that should act as digital input:

  • Write 0x00 to the corresponding fields in GPIOx→MODE.
  • Configure pull-up / -down in GPIOx→PUPDR.


Hardware Abstraction Layer
Registry Types
InES GPIO HAL Interface


Mode register




Pin x00Input mode (reset state)

Push-up / pull-down register




Pin x00No pull-up, pull-down (reset state)
01Pull-up
10Pull-down

Input data register




* Register is read only




  • stm32/peripherals/gpio_input.1478592490.txt.gz
  • Last modified: 2016/11/08 08:08
  • by feur