Analog Input (GPIO)

  • The output buffer is disabled.
  • The Schmitt trigger input is inactive.
  • The pull-up and -down resitors are inactive.
  • Reading IDR returns “0”.


Make sure the peripheral is enabled:

  • Enable GPIOx in RCC→AHBENR[0].

Configure the MODE register, for every pin that should act as analog input:

  • Write 0x10 to the corresponding fields in GPIOx→MODE.





Pin x11Analog input mode
  • stm32/peripherals/gpio_analog.txt
  • Last modified: 2022/12/28 08:18
  • by ruan